From a4b5a7677bc62391ff04273515f7a095debae0c0 Mon Sep 17 00:00:00 2001 From: Niels Bross Date: Tue, 30 Sep 2025 07:39:34 +0200 Subject: [PATCH] Ink: Change how many nodes we reserve in parser. --- parsing.jai | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/parsing.jai b/parsing.jai index 580129e..8d5b1eb 100644 --- a/parsing.jai +++ b/parsing.jai @@ -1473,9 +1473,9 @@ parse :: (ctx : *Compiler_Context, allocator := temp) { push_context new_context { init_context_allocators(); defer clear_context_allocators(); - + parse_state : Parser; - array_reserve(*ctx.nodes, 4096); + array_reserve(*ctx.nodes, 128); //@Note(niels): This is quite a random number to be honest parse_state.current_token_index = 0; parse_state.ctx = ctx; @@ -1483,7 +1483,6 @@ parse :: (ctx : *Compiler_Context, allocator := temp) { if !match(*parse_state, .TOKEN_EOF) { parse_state.ctx.root = make_node(*parse_state, .Program); - array_reserve(*parse_state.ctx.root.children, 1024); program := parse_state.ctx.root; while !check(*parse_state, .TOKEN_EOF) {