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

Performance History

Latest Results

fix(es/renamer): Avoid duplicate mangled names across eval scope boundaries When `eval` is present, the renamer cannot mangle the whole program at once. It computes the top-level map first, renames eval-free nested functions per-unit, and applies the top-level map last. Each `get_map` call built its mangle map with a fresh `ReverseMap`, so a per-unit map for a nested function could reuse a name already assigned by the top-level map. This surfaces together with the compressor's scalar replacement, which rewrites `var x = { p: [] }; x.p` into a synthetic `var x_p = []`. That synthetic binding is not covered by the eval bypass, so it lands in the top-level map and collides with names chosen independently for an eval-free callback, producing observable runtime shadowing. Track the names assigned by the top-level map on the rename pass and feed them as reserved symbols to the per-unit maps, so their encoders skip names already in use. The set is only populated on the eval path, leaving non-eval programs unaffected. Closes #11294
baltasarblanco:fix/11294-mangler-eval-duplicate-idents
6 hours ago
CLI run
by
Avatar for the kdy1 user
kdy1
14 hours ago
CLI run
by
Avatar for the kdy1 user
kdy1
14 hours ago
codspeed
kdy1/skills
15 hours ago
docs: fix architecture fixer link
parkhojeong:docs/fix-architecture-fixer-link
15 hours ago
fix(es/compat): rewrite this in destructuring defaults (#11909) ## Summary Fix async-to-generator so `this` inside destructuring defaults in async arrow class fields is rewritten to the hoisted `_this` binding. ## Origin issue case Repro playground case: https://play.swc.rs/?version=1.15.40&code=H4sIAAAAAAAAA61Uy27bMBC8%2BysWvkRCa6Up0IuNBGgSt02bxkWc9Box0spmI5EuScU2DAP9iH5hv6RDKrLzQk7RxTC5Ozs7O9yd2jJZZ2Tmdga0u0uGRUmVzuuSLQnTXlI0HH%2BPB%2BSm4UQsKXVTaVO65kxXCE1rlXMhFecp7R8gzui57QBw%2FxU%2Fj2fnGaWGZ6XI%2BMpzuJLqihczAy71hP79%2BdtSk8rKnElQzqBcZ642Uk3wrxB16UgXJJRHFHapMvQKxnR0%2BnE8pk8nw9Nj5CP3eHh%2B8nN4TFkprCVp6Wx0AZHmRjrHipymNLBIEw91Xqsg0XUtyxyQThYC4uXScObKJc2lm1KqdM6pT0UbBlJnHJIuljMegoXxUAGNf9fItHQ4uvhCUF3ZQpsKc8mcvOW%2BjyHqbW96oZWe070JKzbCafM0JnTSQ%2BEZgx%2FQiSJOJgn9slnihJmw61OX7ft3ex%2B68auPsBHyUMB3qw6RZTd2wnG0iGkFQTAkRYsBrTvrThuLsfICauf383wS7SPnVpQ192mP1gOcg%2B7h5ed%2B44EkRHknBIGf9wFilrb1TNQ7oI2TSTgytXKy4hjQFbupzlGzMUw0E0ZUsXe7J0SUaWUdCLXUtgxojb8hfBAi79psAloBQiSeWOjBX5FWTCdj4Jo7%2BzzwXbAd4ND2RqrRzSOl6N4HWFB0Rpf9tl2tgBp8rmANvPxAomLlCEJsy42%2BvSD5Y12eSGIfiPGSBPFg0xDY9vwHh5RFD2NQfmjti3FSq%2Ba%2B01QtatUcVkIqUPD1m%2Br6xlObC%2BlI8RwSRXHSUI5COR%2BlS05KPYm6dwIRwjZB%2Fv0cdN%2FS1%2FHoLPHrUE1ksYz0TdxOa9UNinT7e2sAOrN80L55UB9u3hJYrTcQa6%2Fa8w4twhLY9wMRmOxWyk2RDX%2Bg38O%2BUxlOjs5G%2Fl3E%2Fad9mLhRnTLhsil2QXyPvQdmv5Oi7vnwx%2Fno%2BPIIyzDIwUloz9PFylKiYnpDXawO%2FDBIWCsmHDfTxtAyHCS8kO4I2w%2BK7IWimHQzsEHnP2LBffKLBgAA&config=H4sIAAAAAAAAA02OSQ7CMAxF95yiyrqRgAUL7sAJEAsrdUtRJtkuoqp6dzJQIIvI%2Fnn5esuuSUc92KhzszQqAjFSnXn2Aq80KzQO2NAYRbUZzmEPlrFZ025DYPxLaqUL3WSxNskcsfTwSX2BkS8bIjThJ0X%2FzH%2FKkiFv7NRl5qqEwHMfyGlIakZL0AN6JJBA2ev3biww60ghIsmIrG7tVihAAwpXL3On4IrZ4bhPZgXK9%2FoGBgwLNRgBAAA%3D ## Root cause When the async arrow body is moved into a generator function, the constructor-context `this` rewrite only walked initializer expressions. It skipped binding-pattern defaults inside variable declarators, so nested `this` references survived and became `undefined` at runtime. ## Validation - `git submodule update --init --recursive` - `cargo fmt --all` - `cargo test -p swc_ecma_transformer` - `cargo test -p swc_ecma_transforms_compat` - `cargo clippy --all --all-targets -- -D warnings`
main
3 days ago
chore: add changeset
hardfist:perf/optimize-atom-eq
3 days ago

Latest Branches

CodSpeed Performance Gauge
0%
fix(es/renamer): Avoid duplicate mangled names across eval scope boundaries#11913
6 hours ago
4e9e591
baltasarblanco:fix/11294-mangler-eval-duplicate-idents
CodSpeed Performance Gauge
0%
chore: Add codspeed skills & MCP#11912
15 hours ago
bfb0212
kdy1/skills
CodSpeed Performance Gauge
0%
15 hours ago
0158ccd
parkhojeong:docs/fix-architecture-fixer-link
© 2026 CodSpeed Technology
Home Terms Privacy Docs