Replacing core allocation stuff, still need to rewrite map and token
structures
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user