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

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

Issue 1841073003: VM: Fix receiver type propagation in presence of try-catch. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: addressed comments, added test Created 4 years, 8 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
« runtime/vm/flow_graph.cc ('K') | « runtime/vm/jit_optimizer.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 (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
3 // BSD-style license that can be found in the LICENSE file.
4 // VMOptions=--optimization_counter_threshold=100 --no-use-osr --no-background_c ompilation
5
6 // Test CHA-based optimizations in presence of try-catch.
7
8 import "package:expect/expect.dart";
9
10 bar(i) {
11 if (i == 11) throw 123;
12 }
13
14 class A {
15 var f = 42;
16
17 foo(i) {
18 do {
19 try {
20 bar(i);
21 } catch (e, s) {
22 Expect.equals(123, e);
23 }
24 } while (i < 0);
25 return f;
26 }
27 }
28
29 class B extends A {
30
31 }
32
33 main() {
34 var result;
35 for (var i = 0; i < 200; i++) {
36 try {
37 result = new B().foo(i);
38 } catch (e) { }
39 }
40 Expect.equals(42, result);
41 }
OLDNEW
« runtime/vm/flow_graph.cc ('K') | « runtime/vm/jit_optimizer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698