Using arena as token array, remove arenas idea
This commit is contained in:
@@ -1,24 +1,4 @@
|
||||
|
||||
/*
|
||||
@! Dont fully rely on files!!!
|
||||
@! Language.core shouldnt be a file!
|
||||
@! Separate out the codegen stage cause that can change
|
||||
@! Look into String_Builders in Core_Ctx
|
||||
@! Look into stage allocator and perhaps
|
||||
use it more often to reduce scenarios
|
||||
with 2 allocators, and simplify stuff
|
||||
@! Cleanup big int allocator
|
||||
@! Errors and logs should be placed on the compiler context
|
||||
|
||||
@! Clean way to free all memory and reset the compiler
|
||||
@! Bring the Table<>
|
||||
@! Look into List, check if that's neccessary
|
||||
|
||||
Probably want to implement a Red Black Tree then
|
||||
probably I wouldn't need any sort of heap based
|
||||
data structure.
|
||||
*/
|
||||
|
||||
struct Lex_Stream{
|
||||
String stream;
|
||||
S64 iter;
|
||||
@@ -33,11 +13,13 @@ struct Lex_Stream{
|
||||
struct Core_Ctx{
|
||||
Allocator *heap;
|
||||
|
||||
Push_Arena perm_push_only;
|
||||
Push_Arena *perm; // Stores: AST, tokens, interns
|
||||
Arena perm_push_only;
|
||||
Arena *perm; // Stores: AST, tokens, interns
|
||||
|
||||
Scratch_Arena *scratch;
|
||||
Scratch_Arena *stage_arena;
|
||||
Arena *scratch;
|
||||
Arena scratch_;
|
||||
Arena stage_arena_;
|
||||
Arena *stage_arena;
|
||||
String_Builder helper_builder;
|
||||
|
||||
int errors_occured;
|
||||
|
||||
Reference in New Issue
Block a user