Replacing core allocation stuff, still need to rewrite map and token

structures
This commit is contained in:
Krzosa Karol
2022-10-10 00:05:38 +02:00
parent 13f2f20ea6
commit 2f153a7cd3
9 changed files with 43 additions and 36 deletions

View File

@@ -1,6 +1,6 @@
function void
lex_init(Allocator *token_string_arena, Allocator *map_allocator, Lexer *l){
lex_init(Arena *token_string_arena, Arena *map_allocator, Lexer *l){
l->arena = token_string_arena;
l->tokens = array_make<Token>(token_string_arena, 4096*4);
l->interns= intern_table_make(token_string_arena, map_allocator, 2048);
@@ -106,8 +106,8 @@ begin_compilation(){
function void
destroy_compiler(){
exp_free_all(pctx->perm);
exp_free_all(&pctx->stage_arena);
arena_clear(pctx->perm);
arena_clear(&pctx->stage_arena);
}
function void