feat(es/minifier): Drop useless assignments (#3528)

testing:
 - Allow skipping diff using an environment variable `DIFF`.

swc_ecma_minifier:
 - `pure`: Drop useless assignemnts.
This commit is contained in:
Donny/강동윤 2022-02-11 17:43:48 +09:00 committed by GitHub
parent 57f6a581fa
commit a7f0e84bbf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
122 changed files with 137 additions and 472 deletions

View File

@ -17,6 +17,7 @@ env:
CARGO_INCREMENTAL: 0 CARGO_INCREMENTAL: 0
RUST_LOG: "debug" RUST_LOG: "debug"
SWC_CACHE_TEST: 1 SWC_CACHE_TEST: 1
DIFF: 0
jobs: jobs:
check-license: check-license:

View File

@ -1,16 +0,0 @@
var a, s2, a3;
a = a, a = void 0, a = void 0, a = {
f: ()=>1
}, a = {
f: (x)=>1
}, a = {
f: function(x) {
return "";
}
}, a = ()=>1
, a = function(x) {
return "";
}, a = s2, a = a3, a = (x)=>1
, a = function(x) {
return "";
};

View File

@ -1,22 +0,0 @@
var a, s2, a3;
a = a, a = void 0, a = void 0, a = {
f: function() {
return 1;
}
}, a = {
f: function(x) {
return 1;
}
}, a = {
f: function(x) {
return "";
}
}, a = function() {
return 1;
}, a = function(x) {
return "";
}, a = s2, a = a3, a = function(x) {
return 1;
}, a = function(x) {
return "";
};

View File

@ -1,2 +0,0 @@
var b, b2, b3, b4, b5, b6, b7, b8, b9, b10, b11, b12, b13, b14, b15, b16, b17, b18;
b = b, b2 = b2, b3 = b3, b4 = b4, b5 = b5, b6 = b6, b7 = b7, b8 = b8, b9 = b9, b10 = b10, b11 = b11, b12 = b12, b13 = b13, b14 = b14, b15 = b15, b16 = b16, b17 = b17, b18 = b18;

View File

@ -44,7 +44,7 @@ function _createSuper(Derived1) {
})(self); })(self);
}; };
} }
var b, b2, b3, b4, b5, b6, b7, b8, b9, b10, b11, b12, b13, b14, b15, b16, b17, b18, Base = function() { var Base = function() {
"use strict"; "use strict";
_classCallCheck(this, Base); _classCallCheck(this, Base);
}, Derived = function(Base1) { }, Derived = function(Base1) {
@ -72,4 +72,3 @@ var b, b2, b3, b4, b5, b6, b7, b8, b9, b10, b11, b12, b13, b14, b15, b16, b17, b
} }
return OtherDerived; return OtherDerived;
}(Base); }(Base);
b = b, b2 = b2, b3 = b3, b4 = b4, b5 = b5, b6 = b6, b7 = b7, b8 = b8, b9 = b9, b10 = b10, b11 = b11, b12 = b12, b13 = b13, b14 = b14, b15 = b15, b16 = b16, b17 = b17, b18 = b18;

View File

@ -1,8 +1,7 @@
var Errors; var Errors;
!function(Errors) { !function(Errors) {
var b2, b7, b8, b10, b11, b12, b15, b15a, b16, b17, b21, b3;
let WithNonGenericSignaturesInBaseType; let WithNonGenericSignaturesInBaseType;
WithNonGenericSignaturesInBaseType || (WithNonGenericSignaturesInBaseType = {}), b2 = b2, b7 = b7, b8 = b8, b10 = b10, b11 = b11, b12 = b12, b15 = b15, b15a = b15a, b16 = b16, b17 = b17; WithNonGenericSignaturesInBaseType || (WithNonGenericSignaturesInBaseType = {});
let WithGenericSignaturesInBaseType; let WithGenericSignaturesInBaseType;
WithGenericSignaturesInBaseType || (WithGenericSignaturesInBaseType = {}), b21 = b21, b3 = b3; WithGenericSignaturesInBaseType || (WithGenericSignaturesInBaseType = {});
}(Errors || (Errors = {})); }(Errors || (Errors = {}));

View File

@ -46,7 +46,7 @@ function _createSuper(Derived) {
}; };
} }
!function(Errors) { !function(Errors) {
var WithNonGenericSignaturesInBaseType, WithGenericSignaturesInBaseType, b2, b7, b8, b10, b11, b12, b15, b15a, b16, b17, b21, b3, Base1 = function() { var WithNonGenericSignaturesInBaseType, WithGenericSignaturesInBaseType, Base1 = function() {
"use strict"; "use strict";
_classCallCheck(this, Base1); _classCallCheck(this, Base1);
}, Derived = function(Base) { }, Derived = function(Base) {
@ -74,5 +74,5 @@ function _createSuper(Derived) {
} }
return OtherDerived; return OtherDerived;
}(Base1); }(Base1);
WithNonGenericSignaturesInBaseType || (WithNonGenericSignaturesInBaseType = {}), b2 = b2, b7 = b7, b8 = b8, b10 = b10, b11 = b11, b12 = b12, b15 = b15, b15a = b15a, b16 = b16, b17 = b17, WithGenericSignaturesInBaseType || (WithGenericSignaturesInBaseType = {}), b21 = b21, b3 = b3; WithNonGenericSignaturesInBaseType || (WithNonGenericSignaturesInBaseType = {}), WithGenericSignaturesInBaseType || (WithGenericSignaturesInBaseType = {});
}(Errors || (Errors = {})); }(Errors || (Errors = {}));

View File

@ -1,2 +0,0 @@
var b, b2, b3, b4, b5, b6, b11, b15, b17, b18;
b = b, b2 = b2, b3 = b3, b4 = b4, b5 = b5, b6 = b6, b11 = b11, b15 = b15, b15 = void 0, b17 = b17, b18 = b18;

View File

@ -44,7 +44,7 @@ function _createSuper(Derived1) {
})(self); })(self);
}; };
} }
var a16, b, b2, b3, b4, b5, b6, b11, b15, b17, b18, Base = function() { var Base = function() {
"use strict"; "use strict";
_classCallCheck(this, Base); _classCallCheck(this, Base);
}, Derived = function(Base1) { }, Derived = function(Base1) {
@ -72,4 +72,3 @@ var a16, b, b2, b3, b4, b5, b6, b11, b15, b17, b18, Base = function() {
} }
return OtherDerived; return OtherDerived;
}(Base); }(Base);
b = b, b2 = b2, b3 = b3, b4 = b4, b5 = b5, b6 = b6, b11 = b11, b15 = b15, b15 = a16, b17 = b17, b18 = b18;

View File

@ -1,9 +0,0 @@
var a, s2, a3;
a = a, a = void 0, a = void 0, a = (x)=>1
, a = ()=>1
, a = function(x) {
return "";
}, a = s2, a = a3, a = (x)=>1
, a = function(x) {
return "";
};

View File

@ -1,12 +0,0 @@
var a, s2, a3;
a = a, a = void 0, a = void 0, a = function(x) {
return 1;
}, a = function() {
return 1;
}, a = function(x) {
return "";
}, a = s2, a = a3, a = function(x) {
return 1;
}, a = function(x) {
return "";
};

View File

@ -1,8 +0,0 @@
var a, s2, a3;
a = a, a = void 0, a = void 0, a = ()=>1
, a = function(x) {
return "";
}, a = s2, a = a3, a = (x)=>1
, a = function(x) {
return "";
};

View File

@ -1,10 +0,0 @@
var a, s2, a3;
a = a, a = void 0, a = void 0, a = function() {
return 1;
}, a = function(x) {
return "";
}, a = s2, a = a3, a = function(x) {
return 1;
}, a = function(x) {
return "";
};

View File

@ -1,2 +0,0 @@
var b, b2, b3, b4, b5, b6, b7, b8, b9, b10, b11, b12, b13, b14, b15, b16, b17, b18;
b = b, b2 = b2, b3 = b3, b4 = b4, b5 = b5, b6 = b6, b7 = b7, b8 = b8, b9 = b9, b10 = b10, b11 = b11, b12 = b12, b13 = b13, b14 = b14, b15 = b15, b16 = b16, b17 = b17, b18 = b18;

View File

@ -44,7 +44,7 @@ function _createSuper(Derived1) {
})(self); })(self);
}; };
} }
var b, b2, b3, b4, b5, b6, b7, b8, b9, b10, b11, b12, b13, b14, b15, b16, b17, b18, Base = function() { var Base = function() {
"use strict"; "use strict";
_classCallCheck(this, Base); _classCallCheck(this, Base);
}, Derived = function(Base1) { }, Derived = function(Base1) {
@ -72,4 +72,3 @@ var b, b2, b3, b4, b5, b6, b7, b8, b9, b10, b11, b12, b13, b14, b15, b16, b17, b
} }
return OtherDerived; return OtherDerived;
}(Base); }(Base);
b = b, b2 = b2, b3 = b3, b4 = b4, b5 = b5, b6 = b6, b7 = b7, b8 = b8, b9 = b9, b10 = b10, b11 = b11, b12 = b12, b13 = b13, b14 = b14, b15 = b15, b16 = b16, b17 = b17, b18 = b18;

View File

@ -1,8 +1,7 @@
var Errors; var Errors;
!function(Errors) { !function(Errors) {
var b2, b7, b8, b10, b11, b12, b15, b15a, b16, b17, b21, b3;
let WithNonGenericSignaturesInBaseType; let WithNonGenericSignaturesInBaseType;
WithNonGenericSignaturesInBaseType || (WithNonGenericSignaturesInBaseType = {}), b2 = b2, b7 = b7, b8 = b8, b10 = b10, b11 = b11, b12 = b12, b15 = b15, b15a = b15a, b16 = b16, b17 = b17; WithNonGenericSignaturesInBaseType || (WithNonGenericSignaturesInBaseType = {});
let WithGenericSignaturesInBaseType; let WithGenericSignaturesInBaseType;
WithGenericSignaturesInBaseType || (WithGenericSignaturesInBaseType = {}), b21 = b21, b3 = b3; WithGenericSignaturesInBaseType || (WithGenericSignaturesInBaseType = {});
}(Errors || (Errors = {})); }(Errors || (Errors = {}));

View File

@ -46,7 +46,7 @@ function _createSuper(Derived) {
}; };
} }
!function(Errors) { !function(Errors) {
var WithNonGenericSignaturesInBaseType, WithGenericSignaturesInBaseType, b2, b7, b8, b10, b11, b12, b15, b15a, b16, b17, b21, b3, Base1 = function() { var WithNonGenericSignaturesInBaseType, WithGenericSignaturesInBaseType, Base1 = function() {
"use strict"; "use strict";
_classCallCheck(this, Base1); _classCallCheck(this, Base1);
}, Derived = function(Base) { }, Derived = function(Base) {
@ -74,5 +74,5 @@ function _createSuper(Derived) {
} }
return OtherDerived; return OtherDerived;
}(Base1); }(Base1);
WithNonGenericSignaturesInBaseType || (WithNonGenericSignaturesInBaseType = {}), b2 = b2, b7 = b7, b8 = b8, b10 = b10, b11 = b11, b12 = b12, b15 = b15, b15a = b15a, b16 = b16, b17 = b17, WithGenericSignaturesInBaseType || (WithGenericSignaturesInBaseType = {}), b21 = b21, b3 = b3; WithNonGenericSignaturesInBaseType || (WithNonGenericSignaturesInBaseType = {}), WithGenericSignaturesInBaseType || (WithGenericSignaturesInBaseType = {});
}(Errors || (Errors = {})); }(Errors || (Errors = {}));

View File

@ -1,2 +0,0 @@
var b, b2, b3, b4, b5, b6, b11, b15, b17, b18;
b = b, b2 = b2, b3 = b3, b4 = b4, b5 = b5, b6 = b6, b11 = b11, b15 = b15, b15 = void 0, b17 = b17, b18 = b18;

View File

@ -44,7 +44,7 @@ function _createSuper(Derived1) {
})(self); })(self);
}; };
} }
var a16, b, b2, b3, b4, b5, b6, b11, b15, b17, b18, Base = function() { var Base = function() {
"use strict"; "use strict";
_classCallCheck(this, Base); _classCallCheck(this, Base);
}, Derived = function(Base1) { }, Derived = function(Base1) {
@ -72,4 +72,3 @@ var a16, b, b2, b3, b4, b5, b6, b11, b15, b17, b18, Base = function() {
} }
return OtherDerived; return OtherDerived;
}(Base); }(Base);
b = b, b2 = b2, b3 = b3, b4 = b4, b5 = b5, b6 = b6, b11 = b11, b15 = b15, b15 = a16, b17 = b17, b18 = b18;

View File

@ -1,5 +0,0 @@
var a;
a = a, a = void 0, a = void 0, a = void 0, a = void 0, a = (x)=>1
, a = function(x) {
return "";
};

View File

@ -1,6 +0,0 @@
var a;
a = a, a = void 0, a = void 0, a = void 0, a = void 0, a = function(x) {
return 1;
}, a = function(x) {
return "";
};

View File

@ -1,2 +0,0 @@
var b, b2;
b = b, b2 = b2;

View File

@ -11,12 +11,10 @@ function _setPrototypeOf(o, p) {
return o.__proto__ = p, o; return o.__proto__ = p, o;
}, _setPrototypeOf(o, p); }, _setPrototypeOf(o, p);
} }
var b, b2, Generics, A = function() { var Generics, A = function() {
"use strict"; "use strict";
_classCallCheck(this, A); _classCallCheck(this, A);
}; }, B2 = function(A1) {
b = b;
var B2 = function(A1) {
"use strict"; "use strict";
!function(subClass, superClass) { !function(subClass, superClass) {
if ("function" != typeof superClass && null !== superClass) throw new TypeError("Super expression must either be null or a function"); if ("function" != typeof superClass && null !== superClass) throw new TypeError("Super expression must either be null or a function");
@ -53,9 +51,9 @@ var B2 = function(A1) {
} }
return B2; return B2;
}(A); }(A);
b2 = b2, (function(Generics) { !function(Generics) {
var A2 = function() { var A2 = function() {
"use strict"; "use strict";
_classCallCheck(this, A2); _classCallCheck(this, A2);
}; };
})(Generics || (Generics = {})); }(Generics || (Generics = {}));

View File

@ -11,11 +11,11 @@ function _setPrototypeOf(o, p) {
return o.__proto__ = p, o; return o.__proto__ = p, o;
}, _setPrototypeOf(o, p); }, _setPrototypeOf(o, p);
} }
var b, b2, Generics, A = function() { var Generics, A = function() {
"use strict"; "use strict";
_classCallCheck(this, A); _classCallCheck(this, A);
}; };
b = b, b2 = b2, (function(Generics) { !function(Generics) {
var A1 = function() { var A1 = function() {
"use strict"; "use strict";
_classCallCheck(this, A1); _classCallCheck(this, A1);
@ -56,4 +56,4 @@ b = b, b2 = b2, (function(Generics) {
} }
return B; return B;
}(A1); }(A1);
})(Generics || (Generics = {})); }(Generics || (Generics = {}));

View File

@ -1,4 +0,0 @@
var t, t2, b, b2 = {
foo: ""
};
t2 = t2, b = b, b2 = b2, t = t;

View File

@ -1,13 +1,10 @@
function _classCallCheck(instance, Constructor) { function _classCallCheck(instance, Constructor) {
if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function"); if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
} }
var t, t2, b, S = function() { var S = function() {
"use strict"; "use strict";
_classCallCheck(this, S); _classCallCheck(this, S);
}, T = function() { }, T = function() {
"use strict"; "use strict";
_classCallCheck(this, T); _classCallCheck(this, T);
}, b2 = {
foo: ""
}; };
t2 = t2, b = b, b2 = b2, t = t;

View File

@ -1,4 +0,0 @@
var t, t2, b, b2 = {
foo: ""
};
t2 = t2, b = b, b2 = b2, t = t;

View File

@ -1,13 +1,10 @@
function _classCallCheck(instance, Constructor) { function _classCallCheck(instance, Constructor) {
if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function"); if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
} }
var t, t2, b, S = function() { var S = function() {
"use strict"; "use strict";
_classCallCheck(this, S); _classCallCheck(this, S);
}, T = function() { }, T = function() {
"use strict"; "use strict";
_classCallCheck(this, T); _classCallCheck(this, T);
}, b2 = {
foo: ""
}; };
t2 = t2, b = b, b2 = b2, t = t;

View File

@ -2,22 +2,12 @@ var OnlyDerived, WithBase;
!function(OnlyDerived) { !function(OnlyDerived) {
class Base { class Base {
} }
var t, t2, b, a2 = { new class extends Base {
foo: new class extends Base { }(), new class extends Base {
}() }();
}, b2 = {
foo: new class extends Base {
}()
};
t2 = t2, b = b, b2 = b2, t = t;
}(OnlyDerived || (OnlyDerived = {})), (function(WithBase) { }(OnlyDerived || (OnlyDerived = {})), (function(WithBase) {
class Base { class Base {
} }
var t, t2, b, a2 = { new Base(), new class extends Base {
foo: new Base() }();
}, b2 = {
foo: new class extends Base {
}()
};
t2 = t2, b = b, b2 = b2, t = t;
})(WithBase || (WithBase = {})); })(WithBase || (WithBase = {}));

View File

@ -46,7 +46,7 @@ function _createSuper(Derived) {
}; };
} }
!function(OnlyDerived) { !function(OnlyDerived) {
var t, t2, b, Base1 = function() { var Base1 = function() {
"use strict"; "use strict";
_classCallCheck(this, Base1); _classCallCheck(this, Base1);
}, Derived = function(Base) { }, Derived = function(Base) {
@ -71,14 +71,10 @@ function _createSuper(Derived) {
}, T = function() { }, T = function() {
"use strict"; "use strict";
_classCallCheck(this, T); _classCallCheck(this, T);
}, a2 = {
foo: new Derived()
}, b2 = {
foo: new Derived2()
}; };
t2 = t2, b = b, b2 = b2, t = t; new Derived(), new Derived2();
}(OnlyDerived || (OnlyDerived = {})), (function(WithBase) { }(OnlyDerived || (OnlyDerived = {})), (function(WithBase) {
var t, t2, b, Base2 = function() { var Base2 = function() {
"use strict"; "use strict";
_classCallCheck(this, Base2); _classCallCheck(this, Base2);
}, Derived = function(Base) { }, Derived = function(Base) {
@ -103,10 +99,6 @@ function _createSuper(Derived) {
}, T = function() { }, T = function() {
"use strict"; "use strict";
_classCallCheck(this, T); _classCallCheck(this, T);
}, a2 = {
foo: new Base2()
}, b2 = {
foo: new Derived2()
}; };
t2 = t2, b = b, b2 = b2, t = t; new Base2(), new Derived2();
})(WithBase || (WithBase = {})); })(WithBase || (WithBase = {}));

View File

@ -1,7 +1,6 @@
var i, C = function() { var C = function() {
"use strict"; "use strict";
!function(instance, Constructor) { !function(instance, Constructor) {
if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function"); if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
}(this, C); }(this, C);
}; };
i = i; // error

View File

@ -1,8 +1,8 @@
var TargetIsPublic; var TargetIsPublic;
!function(TargetIsPublic) { !function(TargetIsPublic) {
var a, b, i, d, e; var a, b, i, d, e;
a = b, a = i, a = d, b = a = e, b = i, b = d, b = e, i = a, i = b, i = d, i = e, d = a, d = b, d = i, d = e, e = a, e = b, e = i, e = e = d; a = b, a = i, a = d, b = a = e, b = i, b = d, b = e, i = a, i = b, i = d, i = e, d = a, d = b, d = i, d = e, e = a, e = b, e = i, e = d;
}(TargetIsPublic || (TargetIsPublic = {})), (function(TargetIsPublic) { }(TargetIsPublic || (TargetIsPublic = {})), (function(TargetIsPublic) {
var a, b, i, d, e; var a, b, i, d, e;
a = b, a = i, a = d, b = a = e, b = i, b = d, b = b = e, i = a, i = b, i = d, i = i = e, d = a, d = b, d = i, d = e, e = a, e = b, e = i, e = e = d; a = b, a = i, a = d, b = a = e, b = i, b = d, b = e, i = a, i = b, i = d, i = e, d = a, d = b, d = i, d = e, e = a, e = b, e = i, e = d;
})(TargetIsPublic || (TargetIsPublic = {})); })(TargetIsPublic || (TargetIsPublic = {}));

View File

@ -13,7 +13,7 @@ function _classCallCheck(instance, Constructor) {
"use strict"; "use strict";
_classCallCheck(this, E); _classCallCheck(this, E);
}; };
a = b, a = i, a = d, b = a = e, b = i, b = d, b = e, i = a, i = b, i = d, i = e, d = a, d = b, d = i, d = e, e = a, e = b, e = i, e = e = d; a = b, a = i, a = d, b = a = e, b = i, b = d, b = e, i = a, i = b, i = d, i = e, d = a, d = b, d = i, d = e, e = a, e = b, e = i, e = d;
}(TargetIsPublic || (TargetIsPublic = {})), (function(TargetIsPublic) { }(TargetIsPublic || (TargetIsPublic = {})), (function(TargetIsPublic) {
var a, b, i, d, e, Base = function() { var a, b, i, d, e, Base = function() {
"use strict"; "use strict";
@ -25,5 +25,5 @@ function _classCallCheck(instance, Constructor) {
"use strict"; "use strict";
_classCallCheck(this, E); _classCallCheck(this, E);
}; };
a = b, a = i, a = d, b = a = e, b = i, b = d, b = b = e, i = a, i = b, i = d, i = i = e, d = a, d = b, d = i, d = e, e = a, e = b, e = i, e = e = d; a = b, a = i, a = d, b = a = e, b = i, b = d, b = e, i = a, i = b, i = d, i = e, d = a, d = b, d = i, d = e, e = a, e = b, e = i, e = d;
})(TargetIsPublic || (TargetIsPublic = {})); })(TargetIsPublic || (TargetIsPublic = {}));

View File

@ -1,4 +0,0 @@
var t, t2, b, b2 = {
1: ""
};
t2 = t2, b = b, b2 = b2, t = t;

View File

@ -1,13 +1,10 @@
function _classCallCheck(instance, Constructor) { function _classCallCheck(instance, Constructor) {
if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function"); if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
} }
var t, t2, b, S = function() { var S = function() {
"use strict"; "use strict";
_classCallCheck(this, S); _classCallCheck(this, S);
}, T = function() { }, T = function() {
"use strict"; "use strict";
_classCallCheck(this, T); _classCallCheck(this, T);
}, b2 = {
1: ""
}; };
t2 = t2, b = b, b2 = b2, t = t;

View File

@ -1,12 +0,0 @@
var JustStrings, NumbersAndStrings;
!function(JustStrings) {
var t, t2, b, b2 = {
"1": ""
};
t2 = t2, b = b, b2 = b2, t = t;
}(JustStrings || (JustStrings = {})), (function(NumbersAndStrings) {
var t, t2, b, b2 = {
1: ""
};
t2 = t2, b = b, b2 = b2, t = t;
})(NumbersAndStrings || (NumbersAndStrings = {}));

View File

@ -3,25 +3,19 @@ function _classCallCheck(instance, Constructor) {
if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function"); if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
} }
!function(JustStrings) { !function(JustStrings) {
var t, t2, b, S = function() { var S = function() {
"use strict"; "use strict";
_classCallCheck(this, S); _classCallCheck(this, S);
}, T = function() { }, T = function() {
"use strict"; "use strict";
_classCallCheck(this, T); _classCallCheck(this, T);
}, b2 = {
"1": ""
}; };
t2 = t2, b = b, b2 = b2, t = t;
}(JustStrings || (JustStrings = {})), (function(NumbersAndStrings) { }(JustStrings || (JustStrings = {})), (function(NumbersAndStrings) {
var t, t2, b, S = function() { var S = function() {
"use strict"; "use strict";
_classCallCheck(this, S); _classCallCheck(this, S);
}, T = function() { }, T = function() {
"use strict"; "use strict";
_classCallCheck(this, T); _classCallCheck(this, T);
}, b2 = {
1: ""
}; };
t2 = t2, b = b, b2 = b2, t = t;
})(NumbersAndStrings || (NumbersAndStrings = {})); })(NumbersAndStrings || (NumbersAndStrings = {}));

View File

@ -1,14 +1,9 @@
var SimpleTypes, ObjectTypes; var ObjectTypes;
!function(SimpleTypes) { !function(ObjectTypes) {
var t, t2, b, b2 = {
foo: ""
};
t2 = t2, b = b, b2 = b2, t = t;
}(SimpleTypes || (SimpleTypes = {})), (function(ObjectTypes) {
var t, t2, b, a2 = { var t, t2, b, a2 = {
foo: a2 foo: a2
}, b2 = { }, b2 = {
foo: b2 foo: b2
}; };
t = t, t2 = t2, b = b, b2 = a2 = b2, a2 = b, a2 = t2, a2 = t; b2 = a2 = b2, a2 = b, a2 = t2, a2 = t;
})(ObjectTypes || (ObjectTypes = {})); }(ObjectTypes || (ObjectTypes = {}));

View File

@ -3,16 +3,13 @@ function _classCallCheck(instance, Constructor) {
if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function"); if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
} }
!function(SimpleTypes) { !function(SimpleTypes) {
var t, t2, b, S = function() { var S = function() {
"use strict"; "use strict";
_classCallCheck(this, S); _classCallCheck(this, S);
}, T = function() { }, T = function() {
"use strict"; "use strict";
_classCallCheck(this, T); _classCallCheck(this, T);
}, b2 = {
foo: ""
}; };
t2 = t2, b = b, b2 = b2, t = t;
}(SimpleTypes || (SimpleTypes = {})), (function(ObjectTypes) { }(SimpleTypes || (SimpleTypes = {})), (function(ObjectTypes) {
var t, t2, b, S = function() { var t, t2, b, S = function() {
"use strict"; "use strict";
@ -25,5 +22,5 @@ function _classCallCheck(instance, Constructor) {
}, b2 = { }, b2 = {
foo: b2 foo: b2
}; };
t = t, t2 = t2, b = b, b2 = a2 = b2, a2 = b, a2 = t2, a2 = t; b2 = a2 = b2, a2 = b, a2 = t2, a2 = t;
})(ObjectTypes || (ObjectTypes = {})); })(ObjectTypes || (ObjectTypes = {}));

View File

@ -1,5 +0,0 @@
var b, b2, Generics;
b = b, b2 = b2, (function(Generics) {
var b1, b21;
b1 = b1, b21 = b21;
})(Generics || (Generics = {}));

View File

@ -1,5 +0,0 @@
var b, b2, Generics;
b = b, b2 = b2, (function(Generics) {
var b1, b21;
b1 = b1, b21 = b21;
})(Generics || (Generics = {}));

View File

@ -1,9 +1,9 @@
var b1, Generics; var Generics;
b1 = b1, (function(Generics) { !function(Generics) {
var A = function() { var A = function() {
"use strict"; "use strict";
!function(instance, Constructor) { !function(instance, Constructor) {
if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function"); if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
}(this, A); }(this, A);
}; };
})(Generics || (Generics = {})); }(Generics || (Generics = {}));

View File

@ -1,5 +0,0 @@
var b, b2, Generics;
b = b, b2 = b2, (function(Generics) {
var b1, b21;
b1 = b1, b21 = b21;
})(Generics || (Generics = {}));

View File

@ -44,12 +44,12 @@ function _createSuper(Derived) {
})(self); })(self);
}; };
} }
var b, b2, Generics, A = function() { var Generics, A = function() {
"use strict"; "use strict";
_classCallCheck(this, A); _classCallCheck(this, A);
}; };
b = b, b2 = b2, (function(Generics) { !function(Generics) {
var b1, b21, A1 = function() { var A1 = function() {
"use strict"; "use strict";
_classCallCheck(this, A1); _classCallCheck(this, A1);
}, B = function(A2) { }, B = function(A2) {
@ -60,9 +60,7 @@ b = b, b2 = b2, (function(Generics) {
return _classCallCheck(this, B), _super.apply(this, arguments); return _classCallCheck(this, B), _super.apply(this, arguments);
} }
return B; return B;
}(A1); }(A1), B2 = function(A3) {
b1 = b1;
var B2 = function(A3) {
"use strict"; "use strict";
_inherits(B2, A3); _inherits(B2, A3);
var _super = _createSuper(B2); var _super = _createSuper(B2);
@ -71,5 +69,4 @@ b = b, b2 = b2, (function(Generics) {
} }
return B2; return B2;
}(A1); }(A1);
b21 = b21; }(Generics || (Generics = {}));
})(Generics || (Generics = {}));

View File

@ -58,7 +58,7 @@ function set(target, property, value, receiver) {
if (desc = Object.getOwnPropertyDescriptor(receiver, property)) { if (desc = Object.getOwnPropertyDescriptor(receiver, property)) {
if (!desc.writable) return !1; if (!desc.writable) return !1;
desc.value = value, Object.defineProperty(receiver, property, desc); desc.value = value, Object.defineProperty(receiver, property, desc);
} else obj = receiver, value = value, (key = property) in obj ? Object.defineProperty(obj, key, { } else obj = receiver, (key = property) in obj ? Object.defineProperty(obj, key, {
value: value, value: value,
enumerable: !0, enumerable: !0,
configurable: !0, configurable: !0,

View File

@ -58,7 +58,7 @@ function set(target, property, value, receiver) {
if (desc = Object.getOwnPropertyDescriptor(receiver, property)) { if (desc = Object.getOwnPropertyDescriptor(receiver, property)) {
if (!desc.writable) return !1; if (!desc.writable) return !1;
desc.value = value, Object.defineProperty(receiver, property, desc); desc.value = value, Object.defineProperty(receiver, property, desc);
} else obj = receiver, value = value, (key = property) in obj ? Object.defineProperty(obj, key, { } else obj = receiver, (key = property) in obj ? Object.defineProperty(obj, key, {
value: value, value: value,
enumerable: !0, enumerable: !0,
configurable: !0, configurable: !0,

View File

@ -58,7 +58,7 @@ function set(target, property, value, receiver) {
if (desc = Object.getOwnPropertyDescriptor(receiver, property)) { if (desc = Object.getOwnPropertyDescriptor(receiver, property)) {
if (!desc.writable) return !1; if (!desc.writable) return !1;
desc.value = value, Object.defineProperty(receiver, property, desc); desc.value = value, Object.defineProperty(receiver, property, desc);
} else obj = receiver, value = value, (key = property) in obj ? Object.defineProperty(obj, key, { } else obj = receiver, (key = property) in obj ? Object.defineProperty(obj, key, {
value: value, value: value,
enumerable: !0, enumerable: !0,
configurable: !0, configurable: !0,

View File

@ -112,7 +112,7 @@ function set(target, property, value, receiver) {
if (desc = Object.getOwnPropertyDescriptor(receiver, property)) { if (desc = Object.getOwnPropertyDescriptor(receiver, property)) {
if (!desc.writable) return !1; if (!desc.writable) return !1;
desc.value = value, Object.defineProperty(receiver, property, desc); desc.value = value, Object.defineProperty(receiver, property, desc);
} else obj = receiver, value = value, (key = property) in obj ? Object.defineProperty(obj, key, { } else obj = receiver, (key = property) in obj ? Object.defineProperty(obj, key, {
value: value, value: value,
enumerable: !0, enumerable: !0,
configurable: !0, configurable: !0,

View File

@ -1,10 +1,10 @@
function _defineProperties(target, props) { function _defineProperties(target, props) {
for(var i1 = 0; i1 < props.length; i1++){ for(var i = 0; i < props.length; i++){
var descriptor = props[i1]; var descriptor = props[i];
descriptor.enumerable = descriptor.enumerable || !1, descriptor.configurable = !0, "value" in descriptor && (descriptor.writable = !0), Object.defineProperty(target, descriptor.key, descriptor); descriptor.enumerable = descriptor.enumerable || !1, descriptor.configurable = !0, "value" in descriptor && (descriptor.writable = !0), Object.defineProperty(target, descriptor.key, descriptor);
} }
} }
var i, C = function() { var C = function() {
"use strict"; "use strict";
var Constructor, protoProps, staticProps; var Constructor, protoProps, staticProps;
function C() { function C() {
@ -28,4 +28,3 @@ var i, C = function() {
} }
], _defineProperties(Constructor.prototype, protoProps), staticProps && _defineProperties(Constructor, staticProps), C; ], _defineProperties(Constructor.prototype, protoProps), staticProps && _defineProperties(Constructor, staticProps), C;
}(); }();
i = i;

View File

@ -1,10 +1,10 @@
function _defineProperties(target, props) { function _defineProperties(target, props) {
for(var i1 = 0; i1 < props.length; i1++){ for(var i = 0; i < props.length; i++){
var descriptor = props[i1]; var descriptor = props[i];
descriptor.enumerable = descriptor.enumerable || !1, descriptor.configurable = !0, "value" in descriptor && (descriptor.writable = !0), Object.defineProperty(target, descriptor.key, descriptor); descriptor.enumerable = descriptor.enumerable || !1, descriptor.configurable = !0, "value" in descriptor && (descriptor.writable = !0), Object.defineProperty(target, descriptor.key, descriptor);
} }
} }
var i, C = function() { var C = function() {
"use strict"; "use strict";
var Constructor, protoProps, staticProps; var Constructor, protoProps, staticProps;
function C() { function C() {
@ -28,4 +28,3 @@ var i, C = function() {
} }
], _defineProperties(Constructor.prototype, protoProps), staticProps && _defineProperties(Constructor, staticProps), C; ], _defineProperties(Constructor.prototype, protoProps), staticProps && _defineProperties(Constructor, staticProps), C;
}(); }();
i = i;

View File

@ -1,15 +1,4 @@
var numStrBoolTuple = [
5,
"foo",
!0
];
class C { class C {
} }
new C(), new C(); new C(), new C(), new C(), new class {
var unionTuple2 = [ }();
new C(),
"foo",
new class {
}()
];
numStrBoolTuple = numStrBoolTuple, unionTuple2 = unionTuple2;

View File

@ -1,25 +1,11 @@
function _classCallCheck(instance, Constructor) { function _classCallCheck(instance, Constructor) {
if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function"); if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
} }
var numStrBoolTuple = [ var C = function() {
5,
"foo",
!0
], C = function() {
"use strict"; "use strict";
_classCallCheck(this, C); _classCallCheck(this, C);
}, D = function() { }, D = function() {
"use strict"; "use strict";
_classCallCheck(this, D); _classCallCheck(this, D);
}, unionTuple = [ };
new C(), new C(), new C(), new C(), new D();
"foo"
], unionTuple1 = [
new C(),
"foo"
], unionTuple2 = [
new C(),
"foo",
new D()
];
numStrBoolTuple = numStrBoolTuple, unionTuple2 = unionTuple2;

View File

@ -1,7 +1,6 @@
!function(E) { var E, F;
(function(E) {
E[E.A = 0] = "A"; E[E.A = 0] = "A";
}(E || (E = {})), (function(F) { })(E || (E = {})), (function(F) {
F[F.B = 0] = "B"; F[F.B = 0] = "B";
})(F || (F = {})); })(F || (F = {})), E.A, F.B;
var E, F, e = E.A, f = F.B;
f = f, f = 1;

View File

@ -1,10 +1,9 @@
!function(E) { var E, F, Others;
(function(E) {
E[E.A = 0] = "A"; E[E.A = 0] = "A";
}(E || (E = {})), (function(F) { })(E || (E = {})), (function(F) {
F[F.B = 0] = "B"; F[F.B = 0] = "B";
})(F || (F = {})); })(F || (F = {})), E.A, F.B, (function(Others) {
var E, F, Others, e = E.A, f = F.B;
f = f, f = 1, (function(Others) {
var C = function() { var C = function() {
"use strict"; "use strict";
!function(instance, Constructor) { !function(instance, Constructor) {

View File

@ -48,7 +48,7 @@ function set(target, property, value, receiver) {
if (desc = Object.getOwnPropertyDescriptor(receiver, property)) { if (desc = Object.getOwnPropertyDescriptor(receiver, property)) {
if (!desc.writable) return !1; if (!desc.writable) return !1;
desc.value = value, Object.defineProperty(receiver, property, desc); desc.value = value, Object.defineProperty(receiver, property, desc);
} else obj = receiver, value = value, (key = property) in obj ? Object.defineProperty(obj, key, { } else obj = receiver, (key = property) in obj ? Object.defineProperty(obj, key, {
value: value, value: value,
enumerable: !0, enumerable: !0,
configurable: !0, configurable: !0,

View File

@ -1,2 +1,2 @@
var y, p; var p;
y = y, p.a = 1, p.b = 2, p.tag = "test"; p.a = 1, p.b = 2, p.tag = "test";

View File

@ -1,2 +1,2 @@
var y, p; var p;
y = y, p.a = 1, p.b = 2, p.tag = "test"; p.a = 1, p.b = 2, p.tag = "test";

View File

@ -1,2 +1,2 @@
var i; var i;
i.x, i.y(), i.Z, i = i; i.x, i.y(), i.Z;

View File

@ -25,4 +25,4 @@ var i, Foo = function() {
} }
], _defineProperties((Constructor = Foo).prototype, protoProps), staticProps && _defineProperties(Constructor, staticProps), Foo; ], _defineProperties((Constructor = Foo).prototype, protoProps), staticProps && _defineProperties(Constructor, staticProps), Foo;
}(); }();
i.x, i.y(), i.Z, i = i; i.x, i.y(), i.Z;

View File

@ -1,3 +1,6 @@
function getProps(obj, list) {
return {};
}
applySpec({ applySpec({
sum: (a)=>3 sum: (a)=>3
, ,
@ -10,15 +13,7 @@ applySpec({
baz: (x)=>!0 baz: (x)=>!0
} }
} }
}); }), f20({
let o = {
a: 5,
b: 7
};
function getProps(obj, list) {
return {};
}
o = o, f20({
foo: 42, foo: 42,
bar: "hello" bar: "hello"
}), f21({ }), f21({

View File

@ -1,4 +1,4 @@
var E, n; var E;
!function(E) { !function(E) {
E[E.A = 0] = "A"; E[E.A = 0] = "A";
}(E || (E = {})), n = n; }(E || (E = {}));

View File

@ -1,4 +1,4 @@
var E, n; var E;
!function(E) { !function(E) {
E[E.A = 0] = "A"; E[E.A = 0] = "A";
}(E || (E = {})), n = n; }(E || (E = {}));

View File

@ -1,5 +0,0 @@
i = i, c = c;
var i, c, a = {
toString: ()=>{}
};
a = a;

View File

@ -1,11 +1,10 @@
function _defineProperties(target, props) { function _defineProperties(target, props) {
for(var i1 = 0; i1 < props.length; i1++){ for(var i = 0; i < props.length; i++){
var descriptor = props[i1]; var descriptor = props[i];
descriptor.enumerable = descriptor.enumerable || !1, descriptor.configurable = !0, "value" in descriptor && (descriptor.writable = !0), Object.defineProperty(target, descriptor.key, descriptor); descriptor.enumerable = descriptor.enumerable || !1, descriptor.configurable = !0, "value" in descriptor && (descriptor.writable = !0), Object.defineProperty(target, descriptor.key, descriptor);
} }
} }
i = i; var C = function() {
var i, c, C = function() {
"use strict"; "use strict";
var Constructor, protoProps, staticProps; var Constructor, protoProps, staticProps;
function C() { function C() {
@ -22,8 +21,3 @@ var i, c, C = function() {
} }
], _defineProperties((Constructor = C).prototype, protoProps), staticProps && _defineProperties(Constructor, staticProps), C; ], _defineProperties((Constructor = C).prototype, protoProps), staticProps && _defineProperties(Constructor, staticProps), C;
}(); }();
c = c;
var a = {
toString: function() {}
};
a = a; // ok

View File

@ -1,5 +0,0 @@
i = i, c = c;
var i, c, a = {
toString: ()=>{}
};
a = a;

View File

@ -1,11 +1,10 @@
function _defineProperties(target, props) { function _defineProperties(target, props) {
for(var i1 = 0; i1 < props.length; i1++){ for(var i = 0; i < props.length; i++){
var descriptor = props[i1]; var descriptor = props[i];
descriptor.enumerable = descriptor.enumerable || !1, descriptor.configurable = !0, "value" in descriptor && (descriptor.writable = !0), Object.defineProperty(target, descriptor.key, descriptor); descriptor.enumerable = descriptor.enumerable || !1, descriptor.configurable = !0, "value" in descriptor && (descriptor.writable = !0), Object.defineProperty(target, descriptor.key, descriptor);
} }
} }
i = i; var C = function() {
var i, c, C = function() {
"use strict"; "use strict";
var Constructor, protoProps, staticProps; var Constructor, protoProps, staticProps;
function C() { function C() {
@ -20,8 +19,3 @@ var i, c, C = function() {
} }
], _defineProperties((Constructor = C).prototype, protoProps), staticProps && _defineProperties(Constructor, staticProps), C; ], _defineProperties((Constructor = C).prototype, protoProps), staticProps && _defineProperties(Constructor, staticProps), C;
}(); }();
c = c;
var a = {
toString: function() {}
};
a = a; // ok

View File

@ -25,7 +25,7 @@ function set(target, property, value, receiver) {
if (desc = Object.getOwnPropertyDescriptor(receiver, property)) { if (desc = Object.getOwnPropertyDescriptor(receiver, property)) {
if (!desc.writable) return !1; if (!desc.writable) return !1;
desc.value = value, Object.defineProperty(receiver, property, desc); desc.value = value, Object.defineProperty(receiver, property, desc);
} else obj = receiver, value = value, (key = property) in obj ? Object.defineProperty(obj, key, { } else obj = receiver, (key = property) in obj ? Object.defineProperty(obj, key, {
value: value, value: value,
enumerable: !0, enumerable: !0,
configurable: !0, configurable: !0,

View File

@ -1,4 +0,0 @@
let b = function(x) {
return 0;
};
b = b;

View File

@ -1,4 +0,0 @@
var b = function(x) {
return 0;
};
b = b;

View File

@ -1,4 +0,0 @@
let b = function(x) {
return 0;
};
b = b;

Some files were not shown because too many files have changed in this diff Show More