mirror of
https://github.com/DarkPlacesEngine/gmqcc.git
synced 2024-11-27 14:12:36 +00:00
While at it: moving generation of reserved:version to just before the functions so no global/immedate is generated _after_ it - at least from the parser's point of view
This commit is contained in:
parent
d78997599a
commit
c10d127fd7
1 changed files with 7 additions and 7 deletions
14
parser.c
14
parser.c
|
@ -5750,13 +5750,6 @@ bool parser_finish(const char *output)
|
|||
return false;
|
||||
}
|
||||
}
|
||||
if (parser->reserved_version &&
|
||||
!ast_global_codegen(parser->reserved_version, ir, false))
|
||||
{
|
||||
con_out("failed to generate reserved::version");
|
||||
ir_builder_delete(ir);
|
||||
return false;
|
||||
}
|
||||
/* Build function vararg accessor ast tree now before generating
|
||||
* immediates, because the accessors may add new immediates
|
||||
*/
|
||||
|
@ -5837,6 +5830,13 @@ bool parser_finish(const char *output)
|
|||
return false;
|
||||
}
|
||||
}
|
||||
if (parser->reserved_version &&
|
||||
!ast_global_codegen(parser->reserved_version, ir, false))
|
||||
{
|
||||
con_out("failed to generate reserved::version");
|
||||
ir_builder_delete(ir);
|
||||
return false;
|
||||
}
|
||||
for (i = 0; i < vec_size(parser->functions); ++i) {
|
||||
ast_function *f = parser->functions[i];
|
||||
if (!ast_function_codegen(f, ir)) {
|
||||
|
|
Loading…
Reference in a new issue