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/ignition/throw-if-not-hole.js

Issue 2958253002: [turbofan] Replace uninitialized JSConstruct nodes with SOFT deopt. (Closed)
Patch Set: Created 3 years, 5 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/deoptimize-reason.h ('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
1 // Copyright 2016 the V8 project authors. All rights reserved. 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 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: --opt --allow-natives-syntax --no-always-opt 5 // Flags: --opt --allow-natives-syntax --no-always-opt
6 6
7 class A { 7 class A {
8 constructor() { } 8 constructor() { }
9 } 9 }
10 class B extends A { 10 class B extends A {
11 constructor(call_super) { 11 constructor(call_super) {
12 super(); 12 super();
13 if (call_super) { 13 if (call_super) {
14 super(); 14 super();
15 } 15 }
16 } 16 }
17 } 17 }
18 18
19 test = new B(0); 19 test = new B(0);
20 test = new B(0); 20 test = new B(0);
21 assertThrowsEquals(() => {new B(1)}, ReferenceError());
22 assertThrowsEquals(() => {new B(1)}, ReferenceError());
21 %OptimizeFunctionOnNextCall(B); 23 %OptimizeFunctionOnNextCall(B);
22 test = new B(0); 24 test = new B(0);
23 assertOptimized(B); 25 assertOptimized(B);
24 // Check that hole checks are handled correctly in optimized code. 26 // Check that hole checks are handled correctly in optimized code.
25 assertThrowsEquals(() => {new B(1)}, ReferenceError()); 27 assertThrowsEquals(() => {new B(1)}, ReferenceError());
26 assertOptimized(B); 28 assertOptimized(B);
OLDNEW
« no previous file with comments | « src/deoptimize-reason.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698