swc-project
swc
Blog
Docs
Changelog
Blog
Docs
Changelog
Overview
Branches
Benchmarks
Runs
Performance History
Latest Results
fix(es/minifier): Measure nested Math calls in the fold size guard Arguments coerced by cast_to_number, such as the string in Math.sqrt("2"), previously bypassed the size guard and were folded even when the literal was longer than the call. Measure string, boolean, null and unary arguments, and recurse into nested Math calls so Math.ceil(Math.sqrt(2)) still folds; decline the fold when the length cannot be determined.
YosefBlandin:feat/minifier-math-constant-folding
7 hours ago
docs(es/minifier): Document the unshadowed Math assumption Adds an exec test covering negative folded results in member-object position, which the fixer already parenthesizes.
YosefBlandin:feat/minifier-math-constant-folding
18 hours ago
feat(es/minifier): Evaluate Math.floor, Math.ceil, Math.round and Math.sqrt Extends eval_as_number with four more Math methods, guarded so a call is only replaced when the resulting literal is strictly shorter than the call itself. Math.round is implemented against the ECMA-262 rule (ties round towards +Infinity) rather than f64::round, which rounds ties away from zero and disagrees on every negative half.
YosefBlandin:feat/minifier-math-constant-folding
19 hours ago
feat(es/minifier): Evaluate Math.floor, Math.ceil, Math.round and Math.sqrt Extends eval_as_number with four more Math methods, guarded so a call is only replaced when the resulting literal is strictly shorter than the call itself. Math.round is implemented against the ECMA-262 rule (ties round towards +Infinity) rather than f64::round, which rounds ties away from zero and disagrees on every negative half.
YosefBlandin:feat/minifier-math-constant-folding
19 hours ago
fix(react-compiler): preserve TypeScript function overload signatures (#12115) **Description:** Preserve whether a function originally had an implementation body when converting through the React Compiler AST. React Compiler's `FunctionDeclaration` representation always contains a block body. The SWC converter therefore synthesized an empty block for TypeScript overload signatures, but the reverse conversion did not restore the original missing body. The TypeScript transform then treated every overload signature as a concrete runtime function, producing duplicate default exports. This change records the original body presence in `PreservedAst` and restores `None` for overload signatures. The integration test forces React Compiler output with `compilationMode: "all"` and verifies that the overloads remain bodyless while the implementation retains its body. Validation: - `cargo fmt --all` - `cargo test -p swc_ecma_react_compiler` - `cargo clippy --all --all-targets -- -D warnings` **BREAKING CHANGE:** None. **Related issue (if exists):** https://github.com/web-infra-dev/rspack/issues/15158
main
1 day ago
chore: Add changeset
CPunisher:codex/fix-cargo-deny-lru-advisory
1 day ago
chore: Add changeset
codex/fix-react-compiler-default-overload
1 day ago
chore: Update star history chart URL The current star history chart is broken due to GitHub stargazer API restrictions. Update the chart to use a working alternative.
PingouinFerreux:fix/star-history-chart
1 day ago
Latest Branches
CodSpeed Performance Gauge
0%
feat(es/minifier): Evaluate Math.floor, Math.ceil, Math.round and Mat…
#12117
8 hours ago
0b9ce5d
YosefBlandin:feat/minifier-math-constant-folding
CodSpeed Performance Gauge
0%
chore(deps): Update lru to 0.18.2 to fix cargo deny
#12116
1 day ago
dbc4a4e
CPunisher:codex/fix-cargo-deny-lru-advisory
CodSpeed Performance Gauge
0%
fix(react-compiler): preserve TypeScript function overload signatures
#12115
1 day ago
15d0b4f
codex/fix-react-compiler-default-overload
© 2026 CodSpeed Technology
Home
Terms
Privacy
Docs