Much better allocation strategy with new ncore arenas. Add more builtin node gen stuff. It's kind of wonky.

This commit is contained in:
2025-09-06 23:30:45 +02:00
parent 9cf51a1534
commit f4a9592f26
6 changed files with 133 additions and 36 deletions

10
Ink.jai
View File

@@ -159,7 +159,7 @@ do_golden_comparison :: (golden_path : string, comparison_text : string, result_
run_codegen_test :: (file_path : string, result : *Compile_Result, output_type : Output_Type = 0) -> Result {
result.file = make_file(result, file_path);
result.allocator = make_arena(*result.arena);
result.allocator = make_arena(Megabytes(128));
result_data : Result;
result_data.path = file_path;
@@ -225,7 +225,7 @@ run_lexer_test :: (file_path : string, result : *Compile_Result, output_type : O
result_text : string;
result.file = make_file(result, file_path);
result.allocator = make_arena(*result.arena);
result.allocator = make_arena(Megabytes(128));
lex(result);
if result.had_error {
@@ -251,7 +251,7 @@ run_parser_test :: (file_path : string, result : *Compile_Result, output_type :
result_data.path = file_path;
result.file = make_file(result, file_path);
result.allocator = make_arena(*result.arena);
result.allocator = make_arena(Megabytes(128));
lex(result);
if result.had_error {
@@ -315,7 +315,7 @@ run_semantic_analysis_test :: (result : *Compile_Result, output_type : Output_Ty
run_semantic_analysis_test :: (file_path : string, result : *Compile_Result, output_type : Output_Type = 0) -> Result {
result.file = make_file(result, file_path);
result.allocator = make_arena(*result.arena);
result.allocator = make_arena(Megabytes(128));
result_data : Result;
result_data.path = file_path;
@@ -345,7 +345,7 @@ run_test_new :: (file_path : string, stage_flags : Stage_Flags, results : *[..]R
compile_result : Compile_Result;
compile_result.file = make_file(*compile_result, file_path);
compile_result.allocator = make_arena(*compile_result.arena);
compile_result.allocator = make_arena(Megabytes(128));
result : Result;
if stage_flags & .Lexer {