Compiling multiple examples
This commit is contained in:
@@ -9,15 +9,15 @@ global F64 init_ctx_time_end;
|
||||
function void
|
||||
begin_compilation(){
|
||||
init_ctx_time_begin = os_time();
|
||||
OS_Heap *heap = exp_alloc_type(&pernament_arena, OS_Heap);
|
||||
OS_Heap *heap = exp_alloc_type(&pernament_arena, OS_Heap, AF_ZeroMemory);
|
||||
*heap = win32_os_heap_create(false, mib(4), 0);
|
||||
Parse_Ctx *ctx = exp_alloc_type(&pernament_arena, Parse_Ctx);
|
||||
Parse_Ctx *ctx = exp_alloc_type(&pernament_arena, Parse_Ctx, AF_ZeroMemory);
|
||||
parse_init(ctx, &pernament_arena, heap);
|
||||
init_ctx_time_end = os_time();
|
||||
}
|
||||
|
||||
function void
|
||||
compiler_cleanup(){
|
||||
destroy_compiler(){
|
||||
exp_destroy(pctx->heap);
|
||||
exp_free_all(pctx->perm);
|
||||
}
|
||||
@@ -246,4 +246,5 @@ compile_file(String filename, U32 compile_flags = COMPILE_NULL){
|
||||
printf("\nresolving = %f", resolving_time_end - resolving_time_begin);
|
||||
printf("\ngeneratin = %f", generating_time_end - generating_time_begin);
|
||||
}
|
||||
destroy_compiler();
|
||||
}
|
||||
Reference in New Issue
Block a user