diff options
author | 2022-03-02 21:12:31 -0800 | |
---|---|---|
committer | 2022-03-02 21:12:31 -0800 | |
commit | c7941bfab03b83cedf29bd6536bdd8f5e82d9ec9 (patch) | |
tree | c85f99b82894970211ef41391fd1457cd12558f3 | |
parent | 88b60e6f105e992147a88a4ff1cecac855a54280 (diff) | |
download | bun-c7941bfab03b83cedf29bd6536bdd8f5e82d9ec9.tar.gz bun-c7941bfab03b83cedf29bd6536bdd8f5e82d9ec9.tar.zst bun-c7941bfab03b83cedf29bd6536bdd8f5e82d9ec9.zip |
Reduce stack size usage by about 120 KB
-rw-r--r-- | src/js_lexer/identifier.zig | 8 |
1 files 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 {} |