-
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
If statement optimization causes assignments to be executed out of order #3271
Comments
Bug does not occur in terser |
Releasing a new version and then disappearing is bad form. Please follow up with your community after the release. If you don't have time to do that, better not to do the release in the first place. |
@fabiosantoscode do you have a test case for this issue? Might help you improve coverage a bit. |
Nice suggestion @nylen, I've added a test now. |
Thanks - this is not the first time I've seen incredibly poor software development and community management practices on this repository, so I'm going to look into switching current and future projects to Please keep improving the test coverage, that is really important for critical web infrastructure like a JS minifier, and really nice to see! |
fixes mishoo#3245 fixes mishoo#3257 fixes mishoo#3260 fixes mishoo#3269 fixes mishoo#3271 fixes mishoo#3278 fixes mishoo#3309 fixes mishoo#3319 fixes mishoo#3321
Bug report or feature request?
Bug
bisected version
Bisected and GOOD at 3.4.8 and BROKEN at 3.4.9
JavaScript input
input.js:
Command line:
cls&&uglifyjs --mangle --compress -- input.js > output.js&&echo expected:&&node input.js&&echo actual:&&node output.js
expectation and failure
expected:
[ 195, 169 ]
actual:
[ 169, 195 ]
The if statements are optimised into conditional clauses but the assignments within the if clauses are caused to run out of order. In this example it causes elements to be added to an array out of order.
The text was updated successfully, but these errors were encountered: