Fixing printing / memory issues, Add stage arena, printing types in errors properly
This commit is contained in:
@@ -179,6 +179,7 @@ Intern_String intern_flag;
|
||||
struct Parse_Ctx:Lexer{
|
||||
Allocator *perm; // Stores: AST, tokens, interns
|
||||
Allocator *heap;
|
||||
Arena stage_arena;
|
||||
|
||||
U64 type_ids;
|
||||
U64 unique_ids; // @Debug
|
||||
@@ -241,6 +242,7 @@ parse_init(Parse_Ctx *ctx, Allocator *perm_allocator, Allocator *heap_allocator)
|
||||
ctx->ordered_decls = {ctx->heap};
|
||||
ctx->type_map = {ctx->heap};
|
||||
ctx->modules = {ctx->heap};
|
||||
ctx->stage_arena = arena_sub(perm_allocator, mib(4), "Compiler stage arena"_s);
|
||||
bigint_allocator = ctx->perm;
|
||||
|
||||
lex_init(ctx->perm, ctx->heap, ctx);
|
||||
|
||||
Reference in New Issue
Block a user