-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(es/minifier): Fix compress pow NaN
#9210
Conversation
kerui.lian seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. You have signed the CLA already but the status is still pending? Let us recheck it. |
CodSpeed Performance ReportMerging #9210 will not alter performanceComparing Summary
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
swc-bump:
- swc_core
- swc_ecma_minifier
Thank you! |
NaN
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Automated review comment generated by auto-rebase script
crates/swc_ecma_minifier/tests/terser/compress/evaluate/pow_nan/input.js
Show resolved
Hide resolved
@Fnll Could you sign the CLA? |
@@ -0,0 +1 @@ | |||
console.log(1); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kdy1 Is there a way to update the output.terser.js ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You may update it manually, but being better than output.terser.js
is fine.
Another way to update output.terser.js
is replacing compress.js
in terser test suite with https://github.com/swc-project/swc/blob/181320a5554a1b29a64650bdc2c1097b67fe6e9a/crates/swc_ecma_minifier/scripts/x/terser/compress.js and running the terser test.
Description:
f64::powf
forNaN
returns 1 instead ofNaN
, see rust-lang/rust#60468. We should handle that.Related issue:
Math.pow(1, NaN)
is not1
butNaN
#9193