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

Side by Side 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Flags: --harmony-computed-property-names 5 // Flags: --harmony-computed-property-names
6 6
7 7
8 function ID(x) { 8 function ID(x) {
9 return x; 9 return x;
10 } 10 }
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after
256 var object = { 256 var object = {
257 __proto__: proto 257 __proto__: proto
258 }; 258 };
259 assertEquals(proto, Object.getPrototypeOf(object)); 259 assertEquals(proto, Object.getPrototypeOf(object));
260 260
261 object = { 261 object = {
262 '__proto__': proto 262 '__proto__': proto
263 }; 263 };
264 assertEquals(proto, Object.getPrototypeOf(object)); 264 assertEquals(proto, Object.getPrototypeOf(object));
265 265
266 var object = { 266 object = {
267 ['__proto__']: proto 267 ['__proto__']: proto
268 }; 268 };
269 assertEquals(Object.prototype, Object.getPrototypeOf(object)); 269 assertEquals(Object.prototype, Object.getPrototypeOf(object));
270 assertEquals(proto, object.__proto__); 270 assertEquals(proto, object.__proto__);
271 assertTrue(object.hasOwnProperty('__proto__')); 271 assertTrue(object.hasOwnProperty('__proto__'));
272
273 object = {
274 [ID('x')]: 'X',
275 __proto__: proto
276 };
277 assertEquals('X', object.x);
278 assertEquals(proto, Object.getPrototypeOf(object));
272 })(); 279 })();
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698