oxc/crates/oxc_semantic
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
..
examples refactor(semantic): make control flow generation optional. (#3737) 2024-06-18 15:59:38 +00:00
src perf(semantic): simplify logic in enter_scope + leave_scope (#4383) 2024-07-21 12:33:24 +00:00
tests fix(semantic): align visit_arrow_function_expression field visit order with ast (#4366) 2024-07-19 14:51:59 +00:00
Cargo.toml Release crates v0.21.0 (#4344) 2024-07-18 14:39:07 +08:00
CHANGELOG.md Release crates v0.21.0 (#4344) 2024-07-18 14:39:07 +08:00