oxc/crates
overlookmotel c335f92ada perf(syntax): reorder operator enum variants (#7351)
Re-order enum variants of `AssignmentOperator`, `BinaryOperator` and `UnaryOperator`.

* `Exponential` moved to after `Remainder` (so with the rest of the arithmetic operators).
* `Shift*` operators follow arithmetic operators.
* `AssignmentOperator::Bitwise*` ops moved to before `Logical*` ops (so all ops which correspond to `BinaryOperator`s are together).
* `*Or` always before `*And`.
* Plus/Addition always before Minus/Subtraction.

The purpose is to make the various methods on these types maximally efficient:

1. Group together variants so that `AssignmentOperator::is_*` methods can be executed with the minimum number of operations (essentially `variant - min <= max`).
2. Align the variants of `AssignmentOperator` and `BinaryOperator` so that conversion methods added in #7350 become very cheap too (essentially `if variant - min <= max { Some(variant + offset) } else { None }`).
2024-11-19 01:23:28 +00:00
..
oxc chore(doc): replace main/master to tag/commit to make the url always accessible (#7298) 2024-11-16 21:00:30 +08:00
oxc_allocator feat(allocator): introduce Vec::from_array_in (#7331) 2024-11-18 02:35:46 +00:00
oxc_ast refactor(ast)!: remove impl GetAddress for Function (#7343) 2024-11-19 01:05:31 +00:00
oxc_ast_macros release(crates): v0.36.0 (#7227) 2024-11-10 00:31:14 +08:00
oxc_cfg release(crates): v0.36.0 (#7227) 2024-11-10 00:31:14 +08:00
oxc_codegen chore(doc): replace main/master to tag/commit to make the url always accessible (#7298) 2024-11-16 21:00:30 +08:00
oxc_data_structures feat(data_structures): add methods to SparseStack (#7305) 2024-11-16 05:36:36 +00:00
oxc_diagnostics chore(doc): replace main/master to tag/commit to make the url always accessible (#7298) 2024-11-16 21:00:30 +08:00
oxc_ecmascript release(crates): v0.36.0 (#7227) 2024-11-10 00:31:14 +08:00
oxc_estree release(crates): v0.36.0 (#7227) 2024-11-10 00:31:14 +08:00
oxc_index release(crates): v0.36.0 (#7227) 2024-11-10 00:31:14 +08:00
oxc_isolated_declarations feat(allocator): introduce Vec::from_array_in (#7331) 2024-11-18 02:35:46 +00:00
oxc_language_server fix(language_server): revalidate files when oxlint config is changing (#7259) 2024-11-14 10:45:17 +08:00
oxc_linter fix(linter): handle user variables correctly for import/no_commonjs (#7316) 2024-11-19 09:23:16 +08:00
oxc_macros feat(linter): support user-configurable secrets for oxc-security/api-keys (#5938) 2024-10-28 18:55:19 +00:00
oxc_mangler chore(doc): replace main/master to tag/commit to make the url always accessible (#7298) 2024-11-16 21:00:30 +08:00
oxc_minifier feat(allocator): introduce Vec::from_array_in (#7331) 2024-11-18 02:35:46 +00:00
oxc_module_lexer chore(doc): replace main/master to tag/commit to make the url always accessible (#7298) 2024-11-16 21:00:30 +08:00
oxc_parser chore(doc): replace main/master to tag/commit to make the url always accessible (#7298) 2024-11-16 21:00:30 +08:00
oxc_prettier chore(doc): replace main/master to tag/commit to make the url always accessible (#7298) 2024-11-16 21:00:30 +08:00
oxc_regular_expression release(crates): v0.36.0 (#7227) 2024-11-10 00:31:14 +08:00
oxc_semantic fix(transformer/async-to-generator): arguments isn't correct after transformation (#7234) 2024-11-17 05:01:44 +00:00
oxc_sourcemap chore(doc): replace main/master to tag/commit to make the url always accessible (#7298) 2024-11-16 21:00:30 +08:00
oxc_span release(crates): v0.36.0 (#7227) 2024-11-10 00:31:14 +08:00
oxc_syntax perf(syntax): reorder operator enum variants (#7351) 2024-11-19 01:23:28 +00:00
oxc_transformer refactor(ast)!: remove impl GetAddress for Function (#7343) 2024-11-19 01:05:31 +00:00
oxc_traverse feat(traverse): add methods for creating Expression::Identifiers (#7301) 2024-11-16 05:36:35 +00:00
oxc_wasm feat(transformer)!: change API to take a &TransformOptions instead of TransformOptions (#7213) 2024-11-09 06:01:13 +00:00