Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(941)

Unified Diff: src/generator.js

Issue 1149773003: Revert of Revert of Hook up more import/exports in natives. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/date.js ('k') | src/harmony-array.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « src/date.js ('k') | src/harmony-array.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698