oxc/crates/oxc_semantic
overlookmotel c99b3eb464 refactor(syntax): give ScopeId a niche (#4468)
Make `ScopeId` a type with a niche, like `SymbolId` and `ReferenceId`. This makes `Option<ScopeId>` 4 bytes instead of 8, and shrinks various AST types e.g. `ArrowFunctionExpression` by 8 bytes, and halves the size of the `Vec` in `ScopeTree::parent_ids`.

The snapshot change on `prefer-hooks-in-order` lint rule appears incidental - it doesn't alter what errors are reported, only the order they're reported in. This appears to be because it changes the order of keys in a hashmap keyed by `ScopeId` that [the rule uses](a49f4915de/crates/oxc_linter/src/rules/jest/prefer_hooks_in_order.rs (L143)).
2024-07-26 00:14:50 +00:00
..
examples example(semantic): examples print parser errors (#4405) 2024-07-22 11:05:03 +00:00
src refactor(syntax): give ScopeId a niche (#4468) 2024-07-26 00:14:50 +00:00
tests fix(semantic): incorrect symbol’s scope_id after var hoisting (#4458) 2024-07-25 21:12:26 +08:00
Cargo.toml Release crates v0.22.0 (#4434) 2024-07-24 08:23:27 +08:00
CHANGELOG.md Release crates v0.22.0 (#4434) 2024-07-24 08:23:27 +08:00