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

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

Issue 11363119: Fix for do/while: if there are phi copies after the condition, emit the non-pretty while loop. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 1 month 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
« no previous file with comments | « sdk/lib/_internal/compiler/implementation/ssa/nodes.dart ('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) 2012, 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 var a = 42;
6
7 foo1() {
8 var i = 0;
9 var saved;
10 do {
11 saved = i;
12 i = a;
13 } while (i == saved);
14 Expect.equals(0, saved);
15 Expect.equals(42, i);
16 }
17
18 foo2() {
19 var i = 0;
20 var saved;
21 do {
22 saved = i;
23 i = a;
24 } while (i != saved);
25 Expect.equals(42, saved);
26 Expect.equals(42, i);
27 }
28
29 foo3() {
30 var i = 0;
31 var saved;
32 do {
33 saved = i;
34 i = a;
35 if (i == saved) continue;
36 } while (i != saved);
37 Expect.equals(42, saved);
38 Expect.equals(42, i);
39 }
40
41 main() {
42 foo1();
43 foo2();
44 foo3();
45 }
OLDNEW
« no previous file with comments | « sdk/lib/_internal/compiler/implementation/ssa/nodes.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698