mirror of
https://github.com/danbulant/oxc
synced 2026-05-25 04:42:10 +00:00
compresses `a ? b = 0 : b = 1` into `b = a ? 0 : 1` This can be done when `b` is an IdentifierReference and the assignment operator is `=`. In this circumstance, the evaluation of `b = a ? 0 : 1` is: 1. Let lref be ? Evaluation of LeftHandSideExpression. (this does not have a side effect when LeftHandSideExpression is an IdentifierReference) 2. Let rref be ? Evaluation of AssignmentExpression. (ConditionalExpression is evaluated here) 3. Let rval be ? GetValue(rref). 4. Perform ? PutValue(lref, rval). 5. Return rval. **References** - [spec of `=`](https://262.ecma-international.org/15.0/index.html#sec-assignment-operators-runtime-semantics-evaluation) - [spec of `? :`](https://262.ecma-international.org/15.0/index.html#sec-conditional-operator-runtime-semantics-evaluation) |
||
|---|---|---|
| .. | ||
| src | ||
| Cargo.toml | ||
| minsize.snap | ||
| README.md | ||
Track Minification size
See minification-benchmarks for baseline.