We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
// original code // (beautified) var _calls_ = 10, a = 100, b = 10, c = 0; ({ foo: (c = c + 1) + (typeof f1 == "function" && --_calls_ >= 0 && f1((c = c + 1) + (("foo" && -3) / (24..toString() >> ([ , 0 ].length === 2)) === ("number" || -2 || (c = c + 1, {}))), (c = c + 1) + (a && typeof a.Infinity == "function" && --_calls_ >= 0 && a.Infinity((c = c + 1) + [])), undefined)) }); var foo = ({ 1.5: a } = a || {}), yield = --b + [], bar; console.log(null, a, b, c, Infinity, NaN, undefined);
// uglified code // (beautified) var n = 100, o = 0; o += 1, "function" == typeof f1 && f1((o += 1) + (-3 / ("24" >> (2 === [ , 0 ].length)) === "number"), (o += 1) + !1, void 0), console.log(null, ({ 1.5: n } = 100), 9, o, Infinity, NaN, void 0);
original result: null undefined 9 1 Infinity NaN undefined uglified result: null 100 9 1 Infinity NaN undefined
// reduced test case (output will differ) // (beautified) var a = 100; console.log(a && a); var foo = ({ 1.5: a } = a); console.log(a); // output: 100 // undefined // // minify: 100 // 100 // // options: { // "compress": { // "hoist_vars": true, // "keep_infinity": true, // "passes": 1000000, // "unsafe": true // }, // "keep_fargs": true, // "keep_fnames": true, // "module": false, // "toplevel": true, // "output": { // "v8": true // }, // "validate": true // }
minify(options): { "compress": { "hoist_vars": true, "keep_infinity": true, "passes": 1000000, "unsafe": true }, "keep_fargs": true, "keep_fnames": true, "module": false, "toplevel": true, "output": { "v8": true } } Suspicious compress options: collapse_vars evaluate hoist_vars reduce_vars unsafe Suspicious options: toplevel
The text was updated successfully, but these errors were encountered:
fix corner case in collapse_vars
collapse_vars
1b1ed4d
fixes mishoo#5899
d82b7de
Successfully merging a pull request may close this issue.
The text was updated successfully, but these errors were encountered: