mirror of
https://github.com/DarkPlacesEngine/gmqcc.git
synced 2024-11-23 20:33:05 +00:00
ir_function stores max_varargs now
This commit is contained in:
parent
1861660585
commit
2a4ea74a97
3 changed files with 6 additions and 0 deletions
1
ast.c
1
ast.c
|
@ -1582,6 +1582,7 @@ bool ast_function_codegen(ast_function *self, ir_builder *ir)
|
|||
if (self->varargs) {
|
||||
if (!ast_local_codegen(self->varargs, self->ir_func, true))
|
||||
return false;
|
||||
irf->max_varargs = self->varargs->expression.count;
|
||||
}
|
||||
|
||||
if (self->builtin) {
|
||||
|
|
2
ir.c
2
ir.c
|
@ -485,6 +485,8 @@ ir_function* ir_function_new(ir_builder* owner, int outtype)
|
|||
self->values = NULL;
|
||||
self->locals = NULL;
|
||||
|
||||
self->max_varargs = NULL;
|
||||
|
||||
self->code_function_def = -1;
|
||||
self->allocated_locals = 0;
|
||||
self->globaltemps = 0;
|
||||
|
|
3
ir.h
3
ir.h
|
@ -273,6 +273,9 @@ typedef struct ir_function_s
|
|||
size_t run_id;
|
||||
|
||||
struct ir_builder_s *owner;
|
||||
|
||||
/* vararg support: */
|
||||
size_t max_varargs;
|
||||
} ir_function;
|
||||
#define IR_FLAG_HAS_ARRAYS (1<<1)
|
||||
#define IR_FLAG_HAS_UNINITIALIZED (1<<2)
|
||||
|
|
Loading…
Reference in a new issue