oxc/crates
overlookmotel 96fc94f61e refactor(syntax): use NonMaxU32 for IDs (#4467)
`SymbolId` and `ReferenceId` are stored as `NonZeroU32`, but with a wrapper to make `u32::MAX` the illegal value, instead of `0`.

Use the existing `nonmax` crate for this. Our current implementation uses `idx + 1` to avoid the zero value, whereas `nonmax` crate uses XOR `idx ^ u32::MAX`, which is a cheaper operation.

Initially I made this change manually instead of pulling in a dependency, but it's a pain because it requires implementing `Debug` and `PartialOrd` by hand to handle the difference between the "actual" value and its stored representation. So I thought better to use a crate which does this for us.
2024-07-26 00:14:47 +00:00
..
oxc Release crates v0.22.0 (#4434) 2024-07-24 08:23:27 +08:00
oxc_allocator Release crates v0.22.0 (#4434) 2024-07-24 08:23:27 +08:00
oxc_ast feat(ast): add AstKind::AssignmentTargetPattern, AstKind::ArrayAssignmentTarget and AstKind::ObjectAssignmentTarget (#4456) 2024-07-25 09:32:33 +00:00
oxc_ast_macros Release crates v0.22.0 (#4434) 2024-07-24 08:23:27 +08:00
oxc_cfg Release crates v0.22.0 (#4434) 2024-07-24 08:23:27 +08:00
oxc_codegen chore(codegen): port over esbuild codegen tests (all ignored right now) (#4457) 2024-07-25 10:00:34 +00:00
oxc_diagnostics Release crates v0.22.0 (#4434) 2024-07-24 08:23:27 +08:00
oxc_index Release crates v0.22.0 (#4434) 2024-07-24 08:23:27 +08:00
oxc_isolated_declarations Release crates v0.22.0 (#4434) 2024-07-24 08:23:27 +08:00
oxc_js_regex chore: crates should only publish src and examples directory 2024-06-08 16:35:16 +08:00
oxc_language_server refactor(linter): use diagnostic codes in lint rules (#4349) 2024-07-20 03:35:00 +00:00
oxc_linter perf(linter): avoid unnecessary work in nextjs:no_duplicate_head rule (#4465) 2024-07-26 00:14:41 +00:00
oxc_macros perf(linter): disable lint rules by file type (#4380) 2024-07-21 15:22:54 +00:00
oxc_mangler refactor(semantic): var hoisting (#4379) 2024-07-25 00:55:02 +00:00
oxc_minifier chore(codegen): port over esbuild codegen tests (all ignored right now) (#4457) 2024-07-25 10:00:34 +00:00
oxc_module_lexer Release crates v0.22.0 (#4434) 2024-07-24 08:23:27 +08:00
oxc_parser Release crates v0.22.0 (#4434) 2024-07-24 08:23:27 +08:00
oxc_prettier chore: remove unsafe_code = "warn" rust lint 2024-07-15 10:39:08 +08:00
oxc_semantic perf(semantic): remove span field from Reference (#4464) 2024-07-26 00:14:38 +00:00
oxc_sourcemap Release crates v0.22.0 (#4434) 2024-07-24 08:23:27 +08:00
oxc_span Release crates v0.22.0 (#4434) 2024-07-24 08:23:27 +08:00
oxc_syntax refactor(syntax): use NonMaxU32 for IDs (#4467) 2024-07-26 00:14:47 +00:00
oxc_transformer refactor(semantic): populate declarations field in SymbolTable::create_symbol (#4461) 2024-07-26 00:14:32 +00:00
oxc_traverse perf(semantic): remove span field from Reference (#4464) 2024-07-26 00:14:38 +00:00
oxc_wasm refactor(linter): use diagnostic codes in lint rules (#4349) 2024-07-20 03:35:00 +00:00