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

Side by Side Diff: test/mjsunit/harmony/regress/regress-4755.js

Issue 1706283002: [fullcodegen] Implement operand stack depth tracking. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Turn off verification. Created 4 years, 10 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/objects-printer.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 --harmony-do-expressions
6
7 (function DoTryCatchInsideBinop() {
8 function f(a, b) {
9 return a + do { try { throw "boom" } catch(e) { b } }
10 }
11 assertEquals(3, f(1, 2));
12 assertEquals(3, f(1, 2));
13 %OptimizeFunctionOnNextCall(f);
14 assertEquals(3, f(1, 2));
15 })();
16
17 (function DoTryCatchInsideCall() {
18 function f(a, b) {
19 return Math.max(a, do { try { throw a } catch(e) { e + b } })
20 }
21 assertEquals(3, f(1, 2));
22 assertEquals(3, f(1, 2));
23 %OptimizeFunctionOnNextCall(f);
24 assertEquals(3, f(1, 2));
25 })();
26
27 (function DoTryCatchInsideTry() {
28 function f(a, b) {
29 try { return do { try { throw a } catch(e) { e + b } } } catch(e) {}
30 }
31 assertEquals(3, f(1, 2));
32 assertEquals(3, f(1, 2));
33 %OptimizeFunctionOnNextCall(f);
34 assertEquals(3, f(1, 2));
35 })();
36
37 (function DoTryCatchInsideFinally() {
38 function f(a, b) {
39 try {} finally { return do { try { throw a } catch(e) { e + b } } }
40 }
41 assertEquals(3, f(1, 2));
42 assertEquals(3, f(1, 2));
43 %OptimizeFunctionOnNextCall(f);
44 assertEquals(3, f(1, 2));
45 })();
OLDNEW
« no previous file with comments | « src/objects-printer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698