mirror of
https://github.com/danbulant/oxc
synced 2026-05-25 04:42:10 +00:00
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 }`). |
||
|---|---|---|
| .. | ||
| generated | ||
| class.rs | ||
| identifier.rs | ||
| keyword.rs | ||
| lib.rs | ||
| module_graph_visitor.rs | ||
| module_record.rs | ||
| node.rs | ||
| number.rs | ||
| operator.rs | ||
| precedence.rs | ||
| reference.rs | ||
| scope.rs | ||
| symbol.rs | ||
| xml_entities.rs | ||