aboutsummaryrefslogtreecommitdiff
path: root/src/js_parser/js_parser.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/js_parser/js_parser.zig')
-rw-r--r--src/js_parser/js_parser.zig3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/js_parser/js_parser.zig b/src/js_parser/js_parser.zig
index c73ae5718..af04478b8 100644
--- a/src/js_parser/js_parser.zig
+++ b/src/js_parser/js_parser.zig
@@ -3183,6 +3183,9 @@ pub fn NewParser(
pub fn findSymbol(p: *P, loc: logger.Loc, name: string) !FindSymbolResult {
var declare_loc: logger.Loc = undefined;
var is_inside_with_scope = false;
+ // This function can show up in profiling.
+ // That's part of why we do this.
+ // Instead of rehashing `name` for every scope, we do it just once.
const hash = @TypeOf(p.module_scope.members).getHash(name);
const ref: Ref = brk: {