mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-02-25 13:11:00 +00:00
[qfcc] Clean up function.h a little
And even remove a dead function.
This commit is contained in:
parent
0aab95eefe
commit
67c380e98d
3 changed files with 2 additions and 23 deletions
|
@ -199,8 +199,6 @@ void make_function (symbol_t *sym, const char *nice_name,
|
|||
struct defspace_s *space, enum storage_class_e storage);
|
||||
symbol_t *function_symbol (symbol_t *sym, specifier_t spec);
|
||||
const expr_t *find_function (const expr_t *fexpr, const expr_t *params);
|
||||
function_t *new_function (const char *name, const char *nice_name);
|
||||
void add_function (function_t *f);
|
||||
function_t *begin_function (symbol_t *sym, const char *nicename,
|
||||
symtab_t *parent, int far,
|
||||
enum storage_class_e storage);
|
||||
|
@ -210,7 +208,6 @@ function_t *build_builtin_function (symbol_t *sym,
|
|||
const expr_t *bi_val, int far,
|
||||
enum storage_class_e storage);
|
||||
void emit_function (function_t *f, expr_t *e);
|
||||
int function_parms (function_t *f, byte *parm_size);
|
||||
void clear_functions (void);
|
||||
|
||||
///@}
|
||||
|
|
|
@ -1037,7 +1037,7 @@ build_scope (symbol_t *fsym, symtab_t *parent)
|
|||
}
|
||||
}
|
||||
|
||||
function_t *
|
||||
static function_t *
|
||||
new_function (const char *name, const char *nice_name)
|
||||
{
|
||||
function_t *f;
|
||||
|
@ -1077,7 +1077,7 @@ make_function (symbol_t *sym, const char *nice_name, defspace_t *space,
|
|||
}
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
add_function (function_t *f)
|
||||
{
|
||||
*pr.func_tail = f;
|
||||
|
@ -1324,22 +1324,6 @@ emit_function (function_t *f, expr_t *e)
|
|||
emit_statements (f->sblock);
|
||||
}
|
||||
|
||||
int
|
||||
function_parms (function_t *f, byte *parm_size)
|
||||
{
|
||||
int count, i;
|
||||
auto func = &f->sym->type->func;
|
||||
|
||||
if (func->num_params >= 0)
|
||||
count = func->num_params;
|
||||
else
|
||||
count = -func->num_params - 1;
|
||||
|
||||
for (i = 0; i < count; i++)
|
||||
parm_size[i] = type_size (func->param_types[i]);
|
||||
return func->num_params;
|
||||
}
|
||||
|
||||
void
|
||||
clear_functions (void)
|
||||
{
|
||||
|
|
|
@ -13,7 +13,6 @@
|
|||
#include "tools/qfcc/include/defspace.h"
|
||||
#include "tools/qfcc/include/emit.h"
|
||||
#include "tools/qfcc/include/expr.h"
|
||||
#include "tools/qfcc/include/function.h"
|
||||
#include "tools/qfcc/include/obj_file.h"
|
||||
#include "tools/qfcc/include/obj_type.h"
|
||||
#include "tools/qfcc/include/options.h"
|
||||
|
@ -52,7 +51,6 @@ type_t *algebra_base_type (const type_t *type){return 0;}
|
|||
__attribute__((const)) pr_string_t ReuseString (const char *str) {return 0;}
|
||||
__attribute__((const)) codespace_t *codespace_new (void) {return 0;}
|
||||
void codespace_addcode (codespace_t *codespace, struct dstatement_s *code, int size) {}
|
||||
__attribute__((const)) int function_parms (function_t *f, byte *parm_size) {return 0;}
|
||||
void def_to_ddef (def_t *def, ddef_t *ddef, int aux) {}
|
||||
__attribute__((noreturn)) void _internal_error (const expr_t *e, const char *file, int line, const char *func, const char *fmt, ...) {abort();}
|
||||
void _warning (const expr_t *e, const char *file, int line, const char *func, const char *fmt, ...) {}
|
||||
|
|
Loading…
Reference in a new issue