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

Side by Side Diff: test/mjsunit/regress/regress-4971.js

Issue 1960083002: [fullcodegen] Add missing bailout points for super calls. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 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/full-codegen/x87/full-codegen-x87.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 2016 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: --allow-natives-syntax
6
7 (function TestDeoptInNamedSuperGetter() {
8 class C { m() { return 23 } }
9 class D extends C { f() { return super.boom() } }
10
11 var should_deoptimize_caller = false;
12 Object.defineProperty(C.prototype, "boom", { get: function() {
13 if (should_deoptimize_caller) %DeoptimizeFunction(D.prototype.f);
14 return this.m
15 }})
16
17 assertEquals(23, new D().f());
18 assertEquals(23, new D().f());
19 %OptimizeFunctionOnNextCall(D.prototype.f);
20 assertEquals(23, new D().f());
21 should_deoptimize_caller = true;
22 assertEquals(23, new D().f());
23 })();
24
25 (function TestDeoptInKeyedSuperGetter() {
26 class C { m() { return 23 } }
27 class D extends C { f(name) { return super[name]() } }
28
29 var should_deoptimize_caller = false;
30 Object.defineProperty(C.prototype, "boom", { get: function() {
31 if (should_deoptimize_caller) %DeoptimizeFunction(D.prototype.f);
32 return this.m
33 }})
34
35 assertEquals(23, new D().f("boom"));
36 assertEquals(23, new D().f("boom"));
37 %OptimizeFunctionOnNextCall(D.prototype.f);
38 assertEquals(23, new D().f("boom"));
39 should_deoptimize_caller = true;
40 assertEquals(23, new D().f("boom"));
41 })();
OLDNEW
« no previous file with comments | « src/full-codegen/x87/full-codegen-x87.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698