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

Side by Side Diff: test/mjsunit/harmony/computed-property-names-deopt.js

Issue 1158443004: [turbofan] Fix known issue about computed property names. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 7 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
« no previous file with comments | « src/compiler/ast-graph-builder.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 // Flags: --harmony-computed-property-names --allow-natives-syntax
6
7
8 (function TestProtoDeopt() {
9 var proto = {};
10
11 function deoptMe() {
12 %DeoptimizeFunction(f);
13 return proto;
14 }
15
16 function checkObject(name, value, o) {
17 assertSame(proto, Object.getPrototypeOf(o));
18 assertTrue(o.hasOwnProperty(name));
19 assertEquals(value, o[name]);
20 }
21
22 function f(name, value) {
23 return { [name]: value, __proto__: deoptMe() };
24 }
25
26 checkObject("a", 1, f("a", 1));
27 checkObject("b", 2, f("b", 2));
28 %OptimizeFunctionOnNextCall(f);
29 checkObject("c", 3, f("c", 3));
30 })();
OLDNEW
« no previous file with comments | « src/compiler/ast-graph-builder.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698