Removing heap allocations, Porting to Unix
This commit is contained in:
@@ -196,7 +196,6 @@ add_module(Token *pos, Intern_String filename, B32 command_line_module){
|
||||
result->debug_name = string_skip_to_last_slash(result->absolute_file_path);
|
||||
result->module = result; // @warning: self referential
|
||||
result->file = result; // @warning: self referential
|
||||
result->decls = {pctx->heap};
|
||||
result->parent_scope = 0;
|
||||
result->scope_id = pctx->scope_ids++;
|
||||
|
||||
@@ -210,11 +209,12 @@ resolve_everything_in_module(Ast_Module *module){
|
||||
if(module->state == MODULE_RESOLVED) return;
|
||||
resolving_time_begin = os_time();
|
||||
Iter_Named(&module->all_loaded_files, file){
|
||||
For(file.item[0]->decls){
|
||||
resolve_name(file.item[0], it->pos, it->name);
|
||||
Iter(&file.item[0]->decls){
|
||||
Ast_Decl *decl = it.item[0];
|
||||
resolve_name(file.item[0], decl->pos, decl->name);
|
||||
|
||||
if(it->kind == AST_STRUCT){
|
||||
type_complete(it->type_val);
|
||||
if(decl->kind == AST_STRUCT){
|
||||
type_complete(decl->type_val);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user