don't block hoist in system module formatter when runtime transformer is enabled - #1105

This commit is contained in:
Sebastian McKenzie
2015-03-30 18:24:44 +11:00
parent c14ffb8319
commit f81e841283
5 changed files with 31 additions and 34 deletions

View File

@@ -1,3 +0,0 @@
export function* generator() {
yield 1;
}

View File

@@ -1,26 +0,0 @@
System.register([], function (_export) {
var generator;
_export("generator", generator);
return {
setters: [],
execute: function () {
"use strict";
generator = regeneratorRuntime.mark(function generator() {
return regeneratorRuntime.wrap(function generator$(context$1$0) {
while (1) switch (context$1$0.prev = context$1$0.next) {
case 0:
context$1$0.next = 2;
return 1;
case 2:
case "end":
return context$1$0.stop();
}
}, generator, this);
});
}
};
});

View File

@@ -1 +1,5 @@
foo(...bar);
export function* generator() {
yield 1;
}

View File

@@ -1,14 +1,32 @@
System.register(["babel-runtime/helpers/to-consumable-array"], function (_export) {
var _toConsumableArray;
System.register(["babel-runtime/helpers/to-consumable-array", "babel-runtime/regenerator"], function (_export) {
var _toConsumableArray, _regeneratorRuntime, generator;
return {
setters: [function (_babelRuntimeHelpersToConsumableArray) {
_toConsumableArray = _babelRuntimeHelpersToConsumableArray["default"];
}, function (_babelRuntimeRegenerator) {
_regeneratorRuntime = _babelRuntimeRegenerator["default"];
}],
execute: function () {
"use strict";
generator = _regeneratorRuntime.mark(function generator() {
return _regeneratorRuntime.wrap(function generator$(context$1$0) {
while (1) switch (context$1$0.prev = context$1$0.next) {
case 0:
context$1$0.next = 2;
return 1;
case 2:
case "end":
return context$1$0.stop();
}
}, generator, this);
});
_export("generator", generator);
foo.apply(undefined, _toConsumableArray(bar));
}
};
});
});