Less heap more List
This commit is contained in:
@@ -707,16 +707,16 @@ parse_enum(Token *pos){
|
||||
}
|
||||
|
||||
function void
|
||||
add_implicit_import(Ast_Scope *scope, Ast_Scope *add){
|
||||
add_implicit_import(Ast_Scope *scope, Ast_Scope *to_add){
|
||||
B32 found = false;
|
||||
For(scope->implicit_imports){
|
||||
if(it == add){
|
||||
Iter(&scope->implicit_imports){
|
||||
if(it.item[0] == to_add){
|
||||
found = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(!found){
|
||||
scope->implicit_imports.add(add);
|
||||
add(pctx->perm, &scope->implicit_imports, to_add);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -748,7 +748,6 @@ register_ast_file(Token *pos, String absolute_file_path, Ast_Module *module, B32
|
||||
file->parent_scope = 0;
|
||||
file->file = file; // @warning: self referential!
|
||||
file->decls = {pctx->heap};
|
||||
file->implicit_imports = {pctx->heap};
|
||||
file->pos = pos;
|
||||
file->debug_name = string_skip_to_last_slash(absolute_file_path);
|
||||
add(pctx->perm, &file->module->all_loaded_files, file);
|
||||
|
||||
Reference in New Issue
Block a user