Working on simplifying the allocation scheme
This commit is contained in:
@@ -1,8 +1,9 @@
|
||||
|
||||
CORE_Static void
|
||||
core_init_compiler(Parse_Ctx *ctx, Arena *perm, Allocator *heap) {
|
||||
core_init_compiler(Core_Ctx *ctx, Arena *perm, Allocator *heap) {
|
||||
ctx->init_ctx_time_begin = os_time();
|
||||
pctx = ctx;
|
||||
ctx->scratch = allocate_scratch_arena(perm, mib(1));
|
||||
ctx->perm = perm;
|
||||
ctx->heap = heap;
|
||||
ctx->type_map = map_make(heap, 2048);
|
||||
@@ -95,7 +96,7 @@ core_init_compiler(Parse_Ctx *ctx, Arena *perm, Allocator *heap) {
|
||||
|
||||
CORE_Static void
|
||||
core_bootstrap_compiler(Allocator *allocator) {
|
||||
Parse_Ctx *ctx = allocate_struct(allocator, Parse_Ctx);
|
||||
Core_Ctx *ctx = allocate_struct(allocator, Core_Ctx);
|
||||
|
||||
assert((uintptr_t)allocator->allocate == (uintptr_t)arena_push_size);
|
||||
core_init_compiler(ctx, (Arena *)allocator, allocator);
|
||||
|
||||
Reference in New Issue
Block a user