oxc/crates
overlookmotel 402006f28d perf(semantic): simplify logic in enter_scope + leave_scope (#4383)
`SemanticBuilder::enter_scope` contained multiple checks purely to handle when called for `Program` scope (where scope has no parent). This is a very uncommon case as `Program` is visited only once, but these checks run for every scope.

So don't call `enter_scope` from `visit_program`, and inline the special logic for root scope there instead, to simplify `enter_scope`.

A branch in `leave_scope` also gets more predictable (always taken).
2024-07-21 12:33:24 +00:00
..
oxc Release crates v0.21.0 (#4344) 2024-07-18 14:39:07 +08:00
oxc_allocator Release crates v0.21.0 (#4344) 2024-07-18 14:39:07 +08:00
oxc_ast perf: replace some CompactStr usages with Cows (#4377) 2024-07-20 19:19:55 +00:00
oxc_ast_macros refactor(ast): reduce #[cfg_attr] boilerplate in AST type defs (#4375) 2024-07-20 16:41:16 +00:00
oxc_cfg Release crates v0.21.0 (#4344) 2024-07-18 14:39:07 +08:00
oxc_codegen fix(codegen): print shorthand for all { x } variants (#4374) 2024-07-21 19:54:21 +08:00
oxc_diagnostics refactor(linter): use diagnostic codes in lint rules (#4349) 2024-07-20 03:35:00 +00:00
oxc_index Release crates v0.21.0 (#4344) 2024-07-18 14:39:07 +08:00
oxc_isolated_declarations fix(codegen): print shorthand for all { x } variants (#4374) 2024-07-21 19:54:21 +08:00
oxc_js_regex
oxc_language_server refactor(linter): use diagnostic codes in lint rules (#4349) 2024-07-20 03:35:00 +00:00
oxc_linter feat(linter): add fixer for unicorn/prefer-string-starts-ends-with (#4378) 2024-07-21 07:20:22 +00:00
oxc_macros refactor(linter): use diagnostic codes in lint rules (#4349) 2024-07-20 03:35:00 +00:00
oxc_mangler fix(codegen): print shorthand for all { x } variants (#4374) 2024-07-21 19:54:21 +08:00
oxc_minifier Release crates v0.21.0 (#4344) 2024-07-18 14:39:07 +08:00
oxc_module_lexer Release crates v0.21.0 (#4344) 2024-07-18 14:39:07 +08:00
oxc_parser fix(ast): visit Programs hashbang field first (#4368) 2024-07-19 16:27:51 +00:00
oxc_prettier chore: remove unsafe_code = "warn" rust lint 2024-07-15 10:39:08 +08:00
oxc_semantic perf(semantic): simplify logic in enter_scope + leave_scope (#4383) 2024-07-21 12:33:24 +00:00
oxc_sourcemap fix(sourcemap): avoid negative line if token_chunks has same prev_dst_line (#4348) 2024-07-19 18:14:35 +08:00
oxc_span perf: replace some CompactStr usages with Cows (#4377) 2024-07-20 19:19:55 +00:00
oxc_syntax fix(transformer/typescript): unexpectedly removed class binding from ExportNamedDeclaration (#4351) 2024-07-18 16:44:38 +00:00
oxc_transformer Release crates v0.21.0 (#4344) 2024-07-18 14:39:07 +08:00
oxc_traverse refactor(ast): rename the visited_node marker to ast. (#4289) 2024-07-20 12:02:25 +00:00
oxc_wasm refactor(linter): use diagnostic codes in lint rules (#4349) 2024-07-20 03:35:00 +00:00