Index: src/generator.js |
diff --git a/src/generator.js b/src/generator.js |
index 76dd8e47f1db0b670bb296a41c2f2892a79b58b4..d041c5b223385c538954c757b2cffcc21b0628a9 100644 |
--- a/src/generator.js |
+++ b/src/generator.js |
@@ -8,7 +8,16 @@ |
%CheckIsBootstrapping(); |
+// ------------------------------------------------------------------- |
+// Imports |
+ |
var GlobalFunction = global.Function; |
+ |
+var NewFunctionString; |
+ |
+utils.Import(function(from) { |
+ NewFunctionString = from.NewFunctionString; |
+}); |
// ---------------------------------------------------------------------------- |
@@ -67,7 +76,7 @@ |
function GeneratorFunctionConstructor(arg1) { // length == 1 |
- var source = $newFunctionString(arguments, 'function*'); |
+ var source = NewFunctionString(arguments, 'function*'); |
var global_proxy = %GlobalProxy(GeneratorFunctionConstructor); |
// Compile the string in the constructor and not a helper so that errors |
// appear to come from here. |
@@ -85,10 +94,10 @@ |
// Set up non-enumerable functions on the generator prototype object. |
var GeneratorObjectPrototype = GeneratorFunctionPrototype.prototype; |
-$installFunctions(GeneratorObjectPrototype, |
- DONT_ENUM, |
- ["next", GeneratorObjectNext, |
- "throw", GeneratorObjectThrow]); |
+utils.InstallFunctions(GeneratorObjectPrototype, |
+ DONT_ENUM, |
+ ["next", GeneratorObjectNext, |
+ "throw", GeneratorObjectThrow]); |
%AddNamedProperty(GeneratorObjectPrototype, "constructor", |
GeneratorFunctionPrototype, DONT_ENUM | READ_ONLY); |