Skip to content
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

Merged
merged 12 commits into from
Jul 12, 2024
Merged

Conversation

Fnll
Copy link
Contributor

@Fnll Fnll commented Jul 11, 2024

Description:

f64::powf for NaN returns 1 instead of NaN, see rust-lang/rust#60468. We should handle that.

Related issue:

@Fnll Fnll requested a review from a team as a code owner July 11, 2024 15:48
@CLAassistant
Copy link

CLAassistant commented Jul 11, 2024

CLA assistant check
All committers have signed the CLA.

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


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.

Copy link

codspeed-hq bot commented Jul 11, 2024

CodSpeed Performance Report

Merging #9210 will not alter performance

Comparing Fnll:fix/issue-9193 (80d5181) with main (2cc7028)

Summary

✅ 174 untouched benchmarks

@kdy1 kdy1 self-assigned this Jul 11, 2024
@kdy1 kdy1 added this to the Planned milestone Jul 11, 2024
kdy1
kdy1 previously approved these changes Jul 11, 2024
Copy link
Member

@kdy1 kdy1 left a 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

@kdy1
Copy link
Member

kdy1 commented Jul 11, 2024

Thank you!

@kdy1 kdy1 enabled auto-merge (squash) July 11, 2024 19:55
@kdy1 kdy1 changed the title fix(es/minifier): Fix compress pow NaN fix(es/minifier): Fix compress pow NaN Jul 11, 2024
Copy link
Collaborator

@swc-bot swc-bot left a 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

@magic-akari
Copy link
Member

@Fnll Could you sign the CLA?

@@ -0,0 +1 @@
console.log(1);
Copy link
Member

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 ?

Copy link
Member

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.

@kdy1 kdy1 merged commit 2b361e6 into swc-project:main Jul 12, 2024
152 checks passed
@kdy1 kdy1 modified the milestones: Planned, v1.7.0 Jul 17, 2024
@swc-project swc-project locked as resolved and limited conversation to collaborators Aug 17, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Minifier: Math.pow(1, NaN) is not 1 but NaN
5 participants