-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Closed
Labels
Description
// original code
// (beautified)
var _calls_ = 10, a = 100, b = 10, c = 0;
function f0(a) {
{
var arguments_2 = function f1(b_1, await_1) {
{
{
var expr3 = "object";
for (a in expr3) {
c = 1 + c;
var await = expr3[a];
{
var expr4 = await && typeof await.undefined == "function" && --_calls_ >= 0 && await.undefined(24..toString());
for (var key4 in expr4) {
c = 1 + c;
var foo_1 = expr4[key4];
}
}
}
}
}
if ((c = c + 1) + b_1) {
for (var brake7 = 5; b-- && brake7 > 0; --brake7) {
L10880: {
{
var foo = function f2() {
}();
}
}
}
} else {
var arguments = function f3(await) {
if (5 in {}) {
} else {
return c = 1 + c, (2 && "function") == "b" > "bar" || await_1 && (await_1.b = "" - 25 & ("object" || false));
}
}();
}
}("object");
}
{
return a--;
}
}
var a = f0(-4);
console.log(null, a, b, c, Infinity, NaN, undefined);// uglified code
// (beautified)
var e = 10, u = 10, r = 0;
(function f0(a) {
(function f1(b_1, await_1) {
var n, i, f, t, arguments, o = "object";
for (a in o) {
for (f in r = 1 + r, i = (n = o[a]) && "function" == typeof n.undefined && 0 <= --e && n.undefined("24")) {
r = 1 + r, i[f];
}
}
if ((r += 1) + b_1) {
for (t = 5; u-- && 0 < t; --t) {}
} else {
arguments = function f3(await) {
if (!(5 in {})) {
return r = 1 + r, await_1 && (await_1.b = 0);
}
}();
}
})("object"), a--;
})(-4), console.log(null, -4, u, r, Infinity, NaN, void 0);original result:
null 5 4 7 Infinity NaN undefined
uglified result:
null -4 4 7 Infinity NaN undefined
// reduced test case (output will differ)
// (beautified)
function f0(a) {
(function f1() {
var expr3 = "object";
for (a in expr3) {}
})();
return a;
}
var a = f0();
console.log(a);
// output: 5
//
// minify: undefined
//
// options: {
// "compress": {
// "hoist_vars": true,
// "keep_infinity": true,
// "passes": 1000000,
// "unsafe": true
// },
// "keep_fargs": true,
// "keep_fnames": true,
// "toplevel": true,
// "mangle": {
// "v8": 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,
"toplevel": true,
"mangle": {
"v8": true
},
"output": {
"v8": true
}
}
Suspicious compress options:
evaluate
reduce_vars
sequences
unused
Suspicious options:
keep_fnames
toplevel