diff options
author | 2023-05-12 08:53:23 -0700 | |
---|---|---|
committer | 2023-05-12 08:53:23 -0700 | |
commit | 8f3b6486020977b0cd12f18da0475306a0dae8fe (patch) | |
tree | f0ae7321d600fd5aa054218d1dad52b363058879 /src/js_parser.zig | |
parent | 5f897589fc3cb7a705f4db8462cebedc316b73f5 (diff) | |
download | bun-8f3b6486020977b0cd12f18da0475306a0dae8fe.tar.gz bun-8f3b6486020977b0cd12f18da0475306a0dae8fe.tar.zst bun-8f3b6486020977b0cd12f18da0475306a0dae8fe.zip |
finish #2864
Diffstat (limited to 'src/js_parser.zig')
-rw-r--r-- | src/js_parser.zig | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/js_parser.zig b/src/js_parser.zig index 18cf241a6..34afc7b69 100644 --- a/src/js_parser.zig +++ b/src/js_parser.zig @@ -6670,8 +6670,8 @@ fn NewParser_( // p.resolveGeneratedSymbol(&p.jsx_filename); } - fn willUseNumberRenamer(p: *P) bool { - return p.options.bundle; + fn willUseRenamer(p: *P) bool { + return p.options.bundle or p.options.features.minify_identifiers; } fn hoistSymbols(p: *P, scope: *js_ast.Scope) void { @@ -6724,8 +6724,7 @@ fn NewParser_( var is_sloppy_mode_block_level_fn_stmt = false; const original_member_ref = value.ref; - // TODO: always use the number renamer - if (p.willUseNumberRenamer() and symbol.kind == .hoisted_function) { + if (p.willUseRenamer() and symbol.kind == .hoisted_function) { // Block-level function declarations behave like "let" in strict mode if (scope.strict_mode != .sloppy_mode) { continue; |