Avatar for the swc-project user
swc-project
swc
BlogDocsChangelog

Performance History

Latest Results

move tests
Austaras:main
6 hours ago
Merge branch 'main' into seal/fix-noop-sequence-calls
LingyuCoder:seal/fix-noop-sequence-calls
9 hours ago
fix(es/minifier): Preserve `this` and inferred names in sequence expressions (#12693) <!-- Note: CI script will automatically rebase your PR so please do not rebase unless required --> **Description:** Two optimizations change the meaning of a sequence expression when they remove its `0` placeholder. 1. `Expr::directness_matters` did not include `super` property access. The optimizer changed `(0, super.method)()` to `super.method()`. This changes `this` from `undefined` to the current object. The same error occurs for ``(0, super.method)`` `` and for `super` in object literals. This PR adds `Expr::SuperProp` to `directness_matters`. 2. The Pure pass changed `(0, function () {})` to `function () {}`. When the value is assigned in `var f = ...`, `{ k: ... }`, a class field, a pattern default, or a logical assignment, the function then gets an inferred name. This breaks `keep_fnames` and `keep_classnames`. Now the Pure pass keeps the `0` in front of an anonymous function, arrow function, or class when the matching option is on. The output does not change when the options are off. I found these errors while I reviewed #12684. That PR replaces calls to empty functions in a sequence with `0`. After that PR, the same errors also occur for inputs that work today. Two new fixtures cover the changes: `seq-super-callee` and `seq-keep-names`. Each fixture checks the output snapshot. It also compares the stdout of the original code with the stdout of the code after two minifications (`expected.repeat-stdout`). Local validation: - `cargo fmt --all`: done. - `cargo test -p swc_ecma_minifier --no-fail-fast`: passed. - `./scripts/exec.sh` in `crates/swc_ecma_minifier`: passed. - `cargo test -p swc_ecma_ast -p swc_ecma_transforms_optimization --no-fail-fast`: passed. - `cargo clippy -p swc_ecma_ast -p swc_ecma_minifier -p swc_ecma_transforms_optimization --all-targets -- -D warnings`: passed. - `cargo clippy --all --all-targets -- -D warnings`: not completed. The build of `openssl-sys` failed because `pkg-config` is not installed on this machine. - CI and review: pending. **Related issue (if exists):** None. --------- Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
main
9 hours ago

Latest Branches

CodSpeed Performance Gauge
0%
fix(es/minifier): Inline empty function#12692
6 hours ago
7e7e0b7
Austaras:main
CodSpeed Performance Gauge
0%
fix(es/minifier): Drop unused callbacks passed to empty functions#12684
9 hours ago
83f598a
LingyuCoder:seal/fix-noop-sequence-calls
CodSpeed Performance Gauge
0%
10 hours ago
492702d
kdy1/pr-12684-regression-inputs
© 2026 CodSpeed Technology
Home Terms Privacy Docs