void pointer duck typing
This commit is contained in:
13
ccodegen.cpp
13
ccodegen.cpp
@@ -680,10 +680,13 @@ parse_all_modules(){
|
||||
function Ast_Module *
|
||||
add_module(Intern_String filename){
|
||||
For(pctx->modules){
|
||||
if(it->name == filename)
|
||||
if(it->name == filename){
|
||||
log_info("Returning registered module: %Q\n", filename);
|
||||
return it;
|
||||
}
|
||||
}
|
||||
|
||||
log_info("Adding module: %Q\n", filename);
|
||||
Ast_Module *result = ast_module(filename);
|
||||
register_ast_file(result->name, result, true);
|
||||
pctx->modules.add(result);
|
||||
@@ -722,7 +725,7 @@ begin_compilation(){
|
||||
global F64 generating_time_begin;
|
||||
global F64 generating_time_end;
|
||||
function String
|
||||
end_compilation(){
|
||||
get_compilation_result(){
|
||||
generating_time_begin = os_time();
|
||||
|
||||
#if 1
|
||||
@@ -806,7 +809,11 @@ typedef struct String{
|
||||
}
|
||||
|
||||
String string_result = string_flatten(pctx->perm, &pctx->gen);
|
||||
exp_destroy(pctx->heap);
|
||||
generating_time_end = os_time();
|
||||
return string_result;
|
||||
}
|
||||
|
||||
function void
|
||||
compiler_cleanup(){
|
||||
exp_destroy(pctx->heap);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user