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

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

Issue 1273543002: Delete --harmony-computed-property-names flag (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebased Created 5 years, 4 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
(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

Powered by Google App Engine
This is Rietveld 408576698