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

Side by Side Diff: tests/compiler/dart2js/ssa_phi_codegen_test.dart

Issue 10696192: Transform (x && y) && z into x && (y && z). (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments Created 8 years, 5 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
« no previous file with comments | « lib/compiler/implementation/tree/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
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 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 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 that parameters keep their names in the output. 4 // Test that parameters keep their names in the output.
5 5
6 #import("compiler_helper.dart"); 6 #import("compiler_helper.dart");
7 7
8 final String TEST_ONE = @""" 8 final String TEST_ONE = @"""
9 void foo(bar) { 9 void foo(bar) {
10 var a = 1; 10 var a = 1;
(...skipping 10 matching lines...) Expand all
21 void main() { 21 void main() {
22 var t = 0; 22 var t = 0;
23 for (var i = 0; i == 0; i = i + 1) { 23 for (var i = 0; i == 0; i = i + 1) {
24 t = t + 10; 24 t = t + 10;
25 } 25 }
26 print(t); 26 print(t);
27 } 27 }
28 """; 28 """;
29 29
30 final String TEST_THREE = @""" 30 final String TEST_THREE = @"""
31 foo(b, c) { 31 foo(b, c, d) {
32 var val = 42; 32 var val = 42;
33 if (b) { 33 if (b) {
34 c = c && d;
34 if (c) { 35 if (c) {
35 val = 43; 36 val = 43;
36 } 37 }
37 } 38 }
38 return val; 39 return val;
39 } 40 }
40 """; 41 """;
41 42
42 final String TEST_FOUR = @""" 43 final String TEST_FOUR = @"""
43 foo() { 44 foo() {
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 Expect.isTrue(regexp.hasMatch(generated)); 81 Expect.isTrue(regexp.hasMatch(generated));
81 82
82 generated = compile(TEST_FOUR, 'foo'); 83 generated = compile(TEST_FOUR, 'foo');
83 84
84 regexp = const RegExp("cond1 = cond1;"); 85 regexp = const RegExp("cond1 = cond1;");
85 Expect.isTrue(!regexp.hasMatch(generated)); 86 Expect.isTrue(!regexp.hasMatch(generated));
86 87
87 regexp = const RegExp("cond2 = cond2;"); 88 regexp = const RegExp("cond2 = cond2;");
88 Expect.isTrue(!regexp.hasMatch(generated)); 89 Expect.isTrue(!regexp.hasMatch(generated));
89 } 90 }
OLDNEW
« no previous file with comments | « lib/compiler/implementation/tree/nodes.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698