From c7941bfab03b83cedf29bd6536bdd8f5e82d9ec9 Mon Sep 17 00:00:00 2001 From: Jarred Sumner Date: Wed, 2 Mar 2022 21:12:31 -0800 Subject: Reduce stack size usage by about 120 KB --- src/js_lexer/identifier.zig | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/js_lexer/identifier.zig b/src/js_lexer/identifier.zig index d399a5b0e..3a6d6e8b8 100644 --- a/src/js_lexer/identifier.zig +++ b/src/js_lexer/identifier.zig @@ -7,8 +7,12 @@ pub const Bitset = struct { const Cache = @import("identifier_cache.zig"); const id_start_range: [2]i32 = Cache.id_start_meta.range; const id_end_range: [2]i32 = Cache.id_continue_meta.range; - const id_start = Cache.id_start; - const id_continue = Cache.id_continue; + // this is a pointer because otherwise it may be copied onto the stack + // and it's a huge bitset + const id_start = &Cache.id_start; + // this is a pointer because otherwise it may be copied onto the stack + // and it's a huge bitset + const id_continue = &Cache.id_continue; pub fn init() void {} -- cgit v1.2.3