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

Unified Diff: test/mjsunit/harmony/computed-property-names.js

Issue 860033002: Computed property names for object literals in TurboFan. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@local_graph-builder-computed-names-1
Patch Set: Minor cleanup. Created 5 years, 11 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
Index: test/mjsunit/harmony/computed-property-names.js
diff --git a/test/mjsunit/harmony/computed-property-names.js b/test/mjsunit/harmony/computed-property-names.js
index 1ec8aab51c28fcc62984bbcb1b80cc590daa184f..69360771c149006cfbde1fed952a49da27fe2608 100644
--- a/test/mjsunit/harmony/computed-property-names.js
+++ b/test/mjsunit/harmony/computed-property-names.js
@@ -263,10 +263,17 @@ function ID(x) {
};
assertEquals(proto, Object.getPrototypeOf(object));
- var object = {
+ object = {
['__proto__']: proto
};
assertEquals(Object.prototype, Object.getPrototypeOf(object));
assertEquals(proto, object.__proto__);
assertTrue(object.hasOwnProperty('__proto__'));
+
+ object = {
+ [ID('x')]: 'X',
+ __proto__: proto
+ };
+ assertEquals('X', object.x);
+ assertEquals(proto, Object.getPrototypeOf(object));
})();

Powered by Google App Engine
This is Rietveld 408576698