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

Performance History

Latest Results

chore: Support specified PRs in add-changeset skill
kdy1:kdy1/add-changeset-pr-target-push
8 hours ago
fix(es/minifier): remove unused variable initializer cycles (#12106) **Description:** DCE previously visited variable initializers without associating deferred references with the initialized binding. References inside function, arrow, and eligible class expressions were therefore treated as top-level graph entries, which prevented otherwise unreachable dependency cycles from being removed. For example: ```js var AsyncParsePluginContext = class { parse(current) { return parseAsync(current); } }; async function parseAsync() { return new AsyncParsePluginContext(); } ``` The reference to `parseAsync` was incorrectly treated as an entry: ```text entry -> parseAsync -> AsyncParsePluginContext ``` This PR attributes references from direct deferred-value initializers to their variable binding: ```text AsyncParsePluginContext <-> parseAsync ``` With no external entry into this strongly connected component, DCE can remove the entire unused cycle. The optimization applies to identifier bindings initialized directly with: - Function expressions - Arrow functions - Class expressions without heritage, decorators, computed keys, static initialization, or other observable definition-time work Named function and class expressions are also handled using their local expression bindings, preventing self-references from being mistaken for references to outer declarations with the same symbol. The conservative behavior is preserved for eager or potentially observable initializers, including: - Destructuring bindings - Class heritage - Effectful class definitions - Static initialization - Eager `let` and `const` dependency cycles The new DCE fixture covers: - Removable `var`, `let`, and `const` function and class expression cycles - Cycles retained through an external reference - Named function and class expression bindings - Class heritage and effectful static initialization - Eager `let` and `const` cycles The minifier size snapshot is also updated to reflect the resulting `echarts.js` gzip reduction from `314.10 KiB` to `314.09 KiB`. **Testing:** - `cargo test -p swc_ecma_transforms_optimization` - `cargo test -p swc_ecma_minifier` - `crates/swc_ecma_minifier/scripts/exec.sh` - `crates/swc_ecma_minifier/scripts/test.sh` - `cargo fmt --all` - `cargo clippy --all --all-targets -- -D warnings`
main
8 hours ago
chore: Add changeset
SyMind:codex/fix-unused-var-init-cycle
8 hours ago
refactor(es/ast)!: introduce FunctionBody
refactor/ast-function-body
9 hours ago
refactor(es/ast)!: introduce FunctionBody
refactor/ast-function-body
10 hours ago
refactor(es/ast)!: use Function for object accessors
refactor/ast-object-get-set
10 hours ago

Latest Branches

CodSpeed Performance Gauge
+2%
chore: Support specified PRs in add-changeset skill#12113
8 hours ago
28844f7
kdy1:kdy1/add-changeset-pr-target-push
CodSpeed Performance Gauge
-2%
8 hours ago
a35c993
SyMind:codex/fix-unused-var-init-cycle
CodSpeed Performance Gauge
+2%
refactor(es/ast)!: introduce FunctionBody#12096
9 days ago
3a15c97
refactor/ast-function-body
© 2026 CodSpeed Technology
Home Terms Privacy Docs