oxc/crates/oxc_wasm
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
..
.cargo
src refactor(syntax): give ScopeId a niche (#4468) 2024-07-26 00:14:50 +00:00
.gitignore chore(oxc_wasm): remove unnecessary lines from .gitignore 2023-03-20 14:38:09 +08:00
Cargo.toml refactor(syntax): give ScopeId a niche (#4468) 2024-07-26 00:14:50 +00:00