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

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

Issue 2771453003: Format all tests. (Closed)
Patch Set: Format files Created 3 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
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 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 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 4
5 // Regression test for dart2js that used to crash on this code. 5 // Regression test for dart2js that used to crash on this code.
6 6
7 class A { 7 class A {
8 operator[]=(index, value) { 8 operator []=(index, value) {
9 switch (value) { 9 switch (value) {
10 case 42: break; 10 case 42:
11 case 43: break; 11 break;
12 case 43:
13 break;
12 } 14 }
13 } 15 }
14 } 16 }
15 17
16 main() { 18 main() {
17 // Make [a] a phi. 19 // Make [a] a phi.
18 var a; 20 var a;
19 if (true) { 21 if (true) {
20 a = new A(); 22 a = new A();
21 } else { 23 } else {
22 a = new A(); 24 a = new A();
23 } 25 }
24 // `A[]=` being inlined, the compiler was confused when merging the 26 // `A[]=` being inlined, the compiler was confused when merging the
25 // phis after the switch. 27 // phis after the switch.
26 a[0] = 42; 28 a[0] = 42;
27 29
28 // Use [a] to provoke the crash. 30 // Use [a] to provoke the crash.
29 print(a); 31 print(a);
30 } 32 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698