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

Unified Diff: test/mjsunit/builtins.js

Issue 1062633002: Re-implement %Generator% intrinsic as an object (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix failing test 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/generator.js ('k') | test/mjsunit/es6/generators-runtime.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/builtins.js
diff --git a/test/mjsunit/builtins.js b/test/mjsunit/builtins.js
index fe7d35d8ea160fc447fe187980488f27a1581bbf..8cf21a4d1ef264eb4c15506b7f2787e334d77fff 100644
--- a/test/mjsunit/builtins.js
+++ b/test/mjsunit/builtins.js
@@ -39,12 +39,25 @@ function isFunction(obj) {
}
function isV8Native(name) {
- return name == "GeneratorFunctionPrototype" ||
+ return name == "GeneratorFunction" ||
+ name == "GeneratorFunctionPrototype" ||
name == "SetIterator" ||
name == "MapIterator" ||
name == "ArrayIterator" ||
name == "StringIterator";
}
+var V8NativePrototypes = {
+ GeneratorFunction: Function.prototype,
+ // TODO: Update the following values to the %IteratorPrototype% intrinsic
caitp (gmail) 2015/04/06 18:05:05 TODO(name): ...
+ // once it is implemented.
+ // Issue 3568: Generator Prototype should have an object between itself
caitp (gmail) 2015/04/06 18:07:03 bug numbers might be iffy, especially if v8 has to
arv (Not doing code reviews) 2015/04/06 18:15:14 Bug numbers are fine. We have them all over. It mi
+ // and Object.prototype
+ GeneratorFunctionPrototype: Object.prototype,
+ SetIterator: Object.prototype,
+ MapIterator: Object.prototype,
+ ArrayIterator: Object.prototype,
+ StringIterator: Object.prototype
+};
function checkConstructor(func, name) {
// A constructor is a function with a prototype and properties on the
@@ -62,7 +75,7 @@ function checkConstructor(func, name) {
assertFalse(proto_desc.writable, name);
assertFalse(proto_desc.configurable, name);
var prototype = proto_desc.value;
- assertEquals(isV8Native(name) ? Object.prototype : null,
+ assertEquals(V8NativePrototypes[name] || null,
Object.getPrototypeOf(prototype),
name);
for (var i = 0; i < propNames.length; i++) {
« no previous file with comments | « src/generator.js ('k') | test/mjsunit/es6/generators-runtime.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698