aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar Jarred Sumner <jarred@jarredsumner.com> 2022-03-02 21:12:31 -0800
committerGravatar Jarred Sumner <jarred@jarredsumner.com> 2022-03-02 21:12:31 -0800
commitc7941bfab03b83cedf29bd6536bdd8f5e82d9ec9 (patch)
treec85f99b82894970211ef41391fd1457cd12558f3 /src
parent88b60e6f105e992147a88a4ff1cecac855a54280 (diff)
downloadbun-c7941bfab03b83cedf29bd6536bdd8f5e82d9ec9.tar.gz
bun-c7941bfab03b83cedf29bd6536bdd8f5e82d9ec9.tar.zst
bun-c7941bfab03b83cedf29bd6536bdd8f5e82d9ec9.zip
Reduce stack size usage by about 120 KB
Diffstat (limited to 'src')
-rw-r--r--src/js_lexer/identifier.zig8
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 {}