Fix slice codegen inside calls. Add core_free_compiler

This commit is contained in:
Krzosa Karol
2023-02-10 09:59:06 +01:00
parent dd6dc60d8b
commit 27d9ad3ddc
2 changed files with 14 additions and 1 deletions

View File

@@ -1,4 +1,13 @@
//apifn
static void core_free_compiler() {
deallocate(pctx->heap, pctx->type_map.data);
deallocate(pctx->heap, pctx->interns.map.data);
arena_release(pctx->stage_arena);
arena_release(pctx->scratch);
arena_release(pctx->perm);
}
//apifn
static void core_init_compiler(Core_Ctx *ctx, Allocator *allocator) {
ctx->time.init_context = os_time();
@@ -160,7 +169,8 @@ pctx->op_info_table[19] = {pctx->intern("!"_s), "NOT"_s, TK_Not, 0, 1};
}
//apifn
static void core_bootstrap_compiler(Allocator *allocator) {
CORE_Static void
core_bootstrap_compiler(Allocator *allocator) {
Core_Ctx *ctx = allocate_struct(allocator, Core_Ctx);
core_init_compiler(ctx, allocator);
}