Compiling with Type_Info
This commit is contained in:
15
ccodegen.cpp
15
ccodegen.cpp
@@ -677,6 +677,7 @@ parse_all_modules(){
|
||||
parsing_time_begin = os_time();
|
||||
for(S64 i = 0; i < pctx->modules.len; i++){
|
||||
Ast_Module *module = pctx->modules[i];
|
||||
if(module->state != MODULE_REGISTERED) continue;
|
||||
|
||||
for(S64 j = 0; j < module->all_loaded_files.len; j++){
|
||||
Ast_File *file = module->all_loaded_files.data[j];
|
||||
@@ -686,6 +687,7 @@ parse_all_modules(){
|
||||
if(module != pctx->language_base_module)
|
||||
module->implicit_imports.add(pctx->language_base_module);
|
||||
|
||||
module->state = MODULE_PARSED;
|
||||
}
|
||||
parsing_time_end = os_time();
|
||||
}
|
||||
@@ -710,6 +712,7 @@ global F64 resolving_time_begin;
|
||||
global F64 resolving_time_end;
|
||||
function void
|
||||
resolve_everything_in_module(Ast_Module *module){
|
||||
if(module->state == MODULE_RESOLVED) return;
|
||||
resolving_time_begin = os_time();
|
||||
for(S64 i = 0; i < module->all_loaded_files.len; i++){
|
||||
Ast_File *file = module->all_loaded_files[i];
|
||||
@@ -720,6 +723,7 @@ resolve_everything_in_module(Ast_Module *module){
|
||||
}
|
||||
}
|
||||
}
|
||||
module->state = MODULE_RESOLVED;
|
||||
resolving_time_end = os_time();
|
||||
}
|
||||
|
||||
@@ -823,7 +827,12 @@ typedef struct String{
|
||||
}
|
||||
}
|
||||
|
||||
#if 0
|
||||
for(S32 i = 0; i < pctx->base_language_ordered_decl_len; i++){
|
||||
Ast_Decl *it = pctx->ordered_decls[i];
|
||||
genln("");
|
||||
gen_ast(it);
|
||||
}
|
||||
|
||||
gen("Type_Info *type_infos = (Type_Info[]){");
|
||||
global_indent++;
|
||||
For(pctx->all_types){
|
||||
@@ -863,9 +872,9 @@ typedef struct String{
|
||||
}
|
||||
global_indent--;
|
||||
gen("};");
|
||||
#endif
|
||||
|
||||
For(pctx->ordered_decls){
|
||||
for(S32 i = pctx->base_language_ordered_decl_len; i < pctx->ordered_decls.len; i++){
|
||||
Ast_Decl *it = pctx->ordered_decls[i];
|
||||
genln("");
|
||||
gen_ast(it);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user