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

Side by Side Diff: tests/language/bailout6_test.dart

Issue 12082074: Fix another bailout problem where not all blocks were visiting when propagating bailout information… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2013, 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
5 // Test for dart2js to make sure the computed bailout environment is
6 // correct.
7
8 var global;
9
10 class A {
11 var array;
12
13 foo() {
14 do {
15 var element = global;
16 if (element is Map) continue;
17 if (element is num) break;
18 } while (true);
19 return array[0]; // bailout here.
20 }
21 }
22
23 void main() {
24 var a = new A();
25 a.array = [42];
26 global = 42;
27
28 for (int i = 0; i < 2; i++) {
29 Expect.equals(42, a.foo());
30 }
31
32 a.array = new Map();
33 a.array[0] = 42;
34 for (int i = 0; i < 2; i++) {
35 Expect.equals(42, a.foo());
36 }
37 global = null;
38 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698