system hoisting and export refinements (#8104)
This commit is contained in:
@@ -1,14 +1,11 @@
|
||||
System.register([], function (_export, _context) {
|
||||
"use strict";
|
||||
|
||||
var foo, bar;
|
||||
return {
|
||||
setters: [],
|
||||
execute: function () {
|
||||
const [foo, bar = 2] = [];
|
||||
|
||||
_export("foo", foo);
|
||||
|
||||
_export("bar", bar);
|
||||
[foo, bar = 2] = [], _export("foo", foo), _export("bar", bar);
|
||||
}
|
||||
};
|
||||
});
|
||||
|
||||
@@ -1,16 +1,11 @@
|
||||
System.register([], function (_export, _context) {
|
||||
"use strict";
|
||||
|
||||
var foo, bar, baz;
|
||||
return {
|
||||
setters: [],
|
||||
execute: function () {
|
||||
const [foo, bar, ...baz] = [];
|
||||
|
||||
_export("foo", foo);
|
||||
|
||||
_export("bar", bar);
|
||||
|
||||
_export("baz", baz);
|
||||
[foo, bar, ...baz] = [], _export("foo", foo), _export("bar", bar), _export("baz", baz);
|
||||
}
|
||||
};
|
||||
});
|
||||
|
||||
@@ -1,14 +1,11 @@
|
||||
System.register([], function (_export, _context) {
|
||||
"use strict";
|
||||
|
||||
var foo, bar;
|
||||
return {
|
||||
setters: [],
|
||||
execute: function () {
|
||||
const [foo, bar] = [];
|
||||
|
||||
_export("foo", foo);
|
||||
|
||||
_export("bar", bar);
|
||||
[foo, bar] = [], _export("foo", foo), _export("bar", bar);
|
||||
}
|
||||
};
|
||||
});
|
||||
|
||||
@@ -1,18 +1,15 @@
|
||||
System.register([], function (_export, _context) {
|
||||
"use strict";
|
||||
|
||||
var baz, qux;
|
||||
return {
|
||||
setters: [],
|
||||
execute: function () {
|
||||
const {
|
||||
({
|
||||
foo: {
|
||||
bar: [baz, qux]
|
||||
}
|
||||
} = {};
|
||||
|
||||
_export("baz", baz);
|
||||
|
||||
_export("qux", qux);
|
||||
} = {}), _export("baz", baz), _export("qux", qux);
|
||||
}
|
||||
};
|
||||
});
|
||||
|
||||
@@ -1,17 +1,14 @@
|
||||
System.register([], function (_export, _context) {
|
||||
"use strict";
|
||||
|
||||
var foo, bar;
|
||||
return {
|
||||
setters: [],
|
||||
execute: function () {
|
||||
const {
|
||||
({
|
||||
foo,
|
||||
bar = 1
|
||||
} = {};
|
||||
|
||||
_export("foo", foo);
|
||||
|
||||
_export("bar", bar);
|
||||
} = {}), _export("foo", foo), _export("bar", bar);
|
||||
}
|
||||
};
|
||||
});
|
||||
|
||||
@@ -1,17 +1,14 @@
|
||||
System.register([], function (_export, _context) {
|
||||
"use strict";
|
||||
|
||||
var foo, bar;
|
||||
return {
|
||||
setters: [],
|
||||
execute: function () {
|
||||
const {
|
||||
({
|
||||
foo,
|
||||
...bar
|
||||
} = {};
|
||||
|
||||
_export("foo", foo);
|
||||
|
||||
_export("bar", bar);
|
||||
} = {}), _export("foo", foo), _export("bar", bar);
|
||||
}
|
||||
};
|
||||
});
|
||||
|
||||
@@ -1,17 +1,14 @@
|
||||
System.register([], function (_export, _context) {
|
||||
"use strict";
|
||||
|
||||
var bar, baz;
|
||||
return {
|
||||
setters: [],
|
||||
execute: function () {
|
||||
const {
|
||||
({
|
||||
foo: bar,
|
||||
baz
|
||||
} = {};
|
||||
|
||||
_export("bar", bar);
|
||||
|
||||
_export("baz", baz);
|
||||
} = {}), _export("bar", bar), _export("baz", baz);
|
||||
}
|
||||
};
|
||||
});
|
||||
|
||||
@@ -3,10 +3,7 @@ System.register(["foo"], function (_export, _context) {
|
||||
|
||||
return {
|
||||
setters: [function (_foo) {
|
||||
var _exportObj = {};
|
||||
_exportObj.foo = _foo.foo;
|
||||
|
||||
_export(_exportObj);
|
||||
_export("foo", _foo.foo);
|
||||
}],
|
||||
execute: function () {}
|
||||
};
|
||||
|
||||
@@ -3,11 +3,10 @@ System.register(["foo"], function (_export, _context) {
|
||||
|
||||
return {
|
||||
setters: [function (_foo) {
|
||||
var _exportObj = {};
|
||||
_exportObj.foo = _foo.foo;
|
||||
_exportObj.bar = _foo.bar;
|
||||
|
||||
_export(_exportObj);
|
||||
_export({
|
||||
foo: _foo.foo,
|
||||
bar: _foo.bar
|
||||
});
|
||||
}],
|
||||
execute: function () {}
|
||||
};
|
||||
|
||||
@@ -3,10 +3,7 @@ System.register(["foo"], function (_export, _context) {
|
||||
|
||||
return {
|
||||
setters: [function (_foo) {
|
||||
var _exportObj = {};
|
||||
_exportObj.bar = _foo.foo;
|
||||
|
||||
_export(_exportObj);
|
||||
_export("bar", _foo.foo);
|
||||
}],
|
||||
execute: function () {}
|
||||
};
|
||||
|
||||
@@ -3,10 +3,7 @@ System.register(["foo"], function (_export, _context) {
|
||||
|
||||
return {
|
||||
setters: [function (_foo) {
|
||||
var _exportObj = {};
|
||||
_exportObj.default = _foo.foo;
|
||||
|
||||
_export(_exportObj);
|
||||
_export("default", _foo.foo);
|
||||
}],
|
||||
execute: function () {}
|
||||
};
|
||||
|
||||
@@ -3,11 +3,10 @@ System.register(["foo"], function (_export, _context) {
|
||||
|
||||
return {
|
||||
setters: [function (_foo) {
|
||||
var _exportObj = {};
|
||||
_exportObj.default = _foo.foo;
|
||||
_exportObj.bar = _foo.bar;
|
||||
|
||||
_export(_exportObj);
|
||||
_export({
|
||||
default: _foo.foo,
|
||||
bar: _foo.bar
|
||||
});
|
||||
}],
|
||||
execute: function () {}
|
||||
};
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
export var m;
|
||||
@@ -0,0 +1,12 @@
|
||||
System.register([], function (_export, _context) {
|
||||
"use strict";
|
||||
|
||||
var m;
|
||||
|
||||
_export("m", void 0);
|
||||
|
||||
return {
|
||||
setters: [],
|
||||
execute: function () {}
|
||||
};
|
||||
});
|
||||
@@ -1,36 +1,27 @@
|
||||
System.register([], function (_export, _context) {
|
||||
"use strict";
|
||||
|
||||
var foo, foo2, foo3, foo4, foo5, foo6;
|
||||
|
||||
function foo7() {}
|
||||
|
||||
_export("foo7", foo7);
|
||||
|
||||
_export({
|
||||
foo3: void 0,
|
||||
foo5: void 0
|
||||
});
|
||||
|
||||
return {
|
||||
setters: [],
|
||||
execute: function () {
|
||||
var foo = 1;
|
||||
_export("foo", foo = 1);
|
||||
|
||||
_export("foo", foo);
|
||||
_export("foo2", foo2 = function () {});
|
||||
|
||||
var foo2 = function () {};
|
||||
_export("foo4", foo4 = 2);
|
||||
|
||||
_export("foo2", foo2);
|
||||
|
||||
var foo3;
|
||||
|
||||
_export("foo3", foo3);
|
||||
|
||||
let foo4 = 2;
|
||||
|
||||
_export("foo4", foo4);
|
||||
|
||||
let foo5;
|
||||
|
||||
_export("foo5", foo5);
|
||||
|
||||
const foo6 = 3;
|
||||
|
||||
_export("foo6", foo6);
|
||||
|
||||
function foo7() {}
|
||||
|
||||
_export("foo7", foo7);
|
||||
_export("foo6", foo6 = 3);
|
||||
|
||||
class foo8 {}
|
||||
|
||||
|
||||
@@ -9,6 +9,8 @@ System.register(["./evens"], function (_export, _context) {
|
||||
|
||||
_export("nextOdd", nextOdd);
|
||||
|
||||
_export("a", void 0);
|
||||
|
||||
return {
|
||||
setters: [function (_evens) {
|
||||
isEven = _evens.isEven;
|
||||
@@ -16,8 +18,6 @@ System.register(["./evens"], function (_export, _context) {
|
||||
execute: function () {
|
||||
_export("p", p = 5);
|
||||
|
||||
_export("p", p);
|
||||
|
||||
for (a in b);
|
||||
|
||||
for (i = 0, j = 0;;);
|
||||
@@ -27,8 +27,6 @@ System.register(["./evens"], function (_export, _context) {
|
||||
return !isEven(n);
|
||||
};
|
||||
}(isEven));
|
||||
|
||||
_export("isOdd", isOdd);
|
||||
}
|
||||
};
|
||||
});
|
||||
|
||||
@@ -19,8 +19,6 @@ System.register([], function (_export, _context) {
|
||||
execute: function () {
|
||||
_export("c", c = 5);
|
||||
|
||||
_export("c", c);
|
||||
|
||||
b();
|
||||
}
|
||||
};
|
||||
|
||||
@@ -6,8 +6,6 @@ System.register([], function (_export, _context) {
|
||||
setters: [],
|
||||
execute: function () {
|
||||
_export("name", name = _context.id);
|
||||
|
||||
_export("name", name);
|
||||
}
|
||||
};
|
||||
});
|
||||
|
||||
@@ -14,8 +14,6 @@ System.register(["foo", "foo-bar", "./directory/foo-bar"], function (_export, _c
|
||||
|
||||
_export("test2", test2 = 5);
|
||||
|
||||
_export("test2", test2);
|
||||
|
||||
_export("default", test);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -7,8 +7,6 @@ System.register([], function (_export, _context) {
|
||||
execute: function () {
|
||||
_export("test", test = 2);
|
||||
|
||||
_export("test", test);
|
||||
|
||||
_export("test", test = 5);
|
||||
|
||||
_export("test", +test + 1), test++;
|
||||
@@ -21,22 +19,14 @@ System.register([], function (_export, _context) {
|
||||
|
||||
_export("a", a = 2);
|
||||
|
||||
_export("a", a);
|
||||
|
||||
_export("a", a = 3);
|
||||
|
||||
_export("c", b = 2);
|
||||
|
||||
_export("c", b);
|
||||
|
||||
_export("c", b = 3);
|
||||
|
||||
_export("f", _export("e", d = 3));
|
||||
|
||||
_export("e", d);
|
||||
|
||||
_export("f", d);
|
||||
|
||||
_export("f", _export("e", d = 4));
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user