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

Unified Diff: test/mjsunit/es6/generators-objects.js

Issue 2071443002: [interpreter] Teach register optimizer about SuspendGenerator. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 6 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/interpreter/bytecode-register-optimizer.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/es6/generators-objects.js
diff --git a/test/mjsunit/es6/generators-objects.js b/test/mjsunit/es6/generators-objects.js
index 3adeca43dcf9947cbad0c341cd15ac3a41a1f859..9a075184a2bc6e4ca21c8f7559963acd7c03c8cf 100644
--- a/test/mjsunit/es6/generators-objects.js
+++ b/test/mjsunit/es6/generators-objects.js
@@ -113,3 +113,17 @@ function TestPrototype() {
assertSame(generator_prototype, Object.getPrototypeOf(g()));
}
TestPrototype();
+
+
+function TestComputedPropertyNames() {
+ function* f1() { return {[yield]: 42} }
+ var g1 = f1();
+ g1.next();
+ assertEquals(42, g1.next('a').value.a);
+
+ function* f2() { return {['a']: yield} }
+ var g2 = f2();
+ g2.next();
+ assertEquals(42, g2.next(42).value.a);
+}
+TestComputedPropertyNames();
« no previous file with comments | « src/interpreter/bytecode-register-optimizer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698