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

Side by Side Diff: tests/language/vm/lazy_deopt_with_exception_and_stacktrace_test.dart

Issue 2376843002: Pass new pool pointer to the JumpToException stub instead of reloading in through the frame's Code … (Closed)
Patch Set: . Created 4 years, 2 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 | « runtime/vm/stub_code_x64.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
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 // Test deoptimization on an optimistically hoisted smi check. 4 // Test deoptimization on an optimistically hoisted smi check.
5 // VMOptions=--optimization-counter-threshold=10 --no-background-compilation -- enable-inlining-annotations 5 // VMOptions=--optimization-counter-threshold=10 --no-background-compilation -- enable-inlining-annotations
6 6
7 // Test that lazy deoptimization works if the program returns to a function 7 // Test that lazy deoptimization works if the program returns to a function
8 // that is scheduled for lazy deoptimization via an exception. 8 // that is scheduled for lazy deoptimization via an exception.
9 9
10 import 'package:expect/expect.dart'; 10 import 'package:expect/expect.dart';
(...skipping 10 matching lines...) Expand all
21 if (b) { 21 if (b) {
22 c.x = 2.5; 22 c.x = 2.5;
23 throw 123; 23 throw 123;
24 } 24 }
25 } 25 }
26 26
27 @NeverInline 27 @NeverInline
28 T1(C c, bool b) { 28 T1(C c, bool b) {
29 try { 29 try {
30 AA(c, b); 30 AA(c, b);
31 } on dynamic { 31 } on dynamic catch (e, st) {
32 print(e);
33 print(st);
32 } 34 }
33 return c.x + 1; 35 return c.x + 1;
34 } 36 }
35 37
36 38
37 @NeverInline 39 @NeverInline
38 T2(C c, bool b) { 40 T2(C c, bool b) {
39 try { 41 try {
40 AA(c, b); 42 AA(c, b);
41 } on String { 43 } on String catch(e, st) {
44 print(e);
45 print(st);
42 Expect.isTrue(false); 46 Expect.isTrue(false);
43 } on int catch(e) { 47 } on int catch(e, st) {
44 Expect.equals(e, 123); 48 Expect.equals(e, 123);
45 Expect.equals(b, true); 49 Expect.equals(b, true);
46 Expect.equals(c.x, 2.5); 50 Expect.equals(c.x, 2.5);
51 print(st);
47 } 52 }
48 return c.x + 1; 53 return c.x + 1;
49 } 54 }
50 55
51 56
52 main() { 57 main() {
53 var c = new C(); 58 var c = new C();
54 for (var i = 0; i < 10000; ++i) { 59 for (var i = 0; i < 10000; ++i) {
55 T1(c, false); 60 T1(c, false);
56 T2(c, false); 61 T2(c, false);
57 } 62 }
58 Expect.equals(43, T1(c, false)); 63 Expect.equals(43, T1(c, false));
59 Expect.equals(43, T2(c, false)); 64 Expect.equals(43, T2(c, false));
60 Expect.equals(3.5, T1(c, true)); 65 Expect.equals(3.5, T1(c, true));
61 Expect.equals(3.5, T2(c, true)); 66 Expect.equals(3.5, T2(c, true));
62 } 67 }
63
64
OLDNEW
« no previous file with comments | « runtime/vm/stub_code_x64.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698