Fix slice codegen inside calls. Add core_free_compiler
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user