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

Unified Diff: src/generator.js

Issue 1062633002: Re-implement %Generator% intrinsic as an object (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Add TODO contact and bug URL Created 5 years, 8 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/bootstrapper.cc ('k') | test/mjsunit/builtins.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 fa6e9764ad1865b6c7e23dc7054ec4cc11ccf431..338b7085a3cf8adf5b950000f28637bc36e58ea9 100644
--- a/src/generator.js
+++ b/src/generator.js
@@ -67,12 +67,6 @@ function GeneratorObjectIterator() {
return this;
}
-function GeneratorFunctionPrototypeConstructor(x) {
- if (%_IsConstructCall()) {
- throw MakeTypeError('not_constructor', ['GeneratorFunctionPrototype']);
- }
-}
-
function GeneratorFunctionConstructor(arg1) { // length == 1
var source = NewFunctionString(arguments, 'function*');
var global_proxy = %GlobalProxy(global);
@@ -109,7 +103,6 @@ function SetUpGenerators() {
%InternalSetPrototype(GeneratorFunctionPrototype, $Function.prototype);
%AddNamedProperty(GeneratorFunctionPrototype,
symbolToStringTag, "GeneratorFunction", DONT_ENUM | READ_ONLY);
- %SetCode(GeneratorFunctionPrototype, GeneratorFunctionPrototypeConstructor);
%AddNamedProperty(GeneratorFunctionPrototype, "constructor",
GeneratorFunction, DONT_ENUM | READ_ONLY);
%InternalSetPrototype(GeneratorFunction, $Function);
« no previous file with comments | « src/bootstrapper.cc ('k') | test/mjsunit/builtins.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698