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

Side by Side Diff: pkg/compiler/lib/src/tree_ir/optimization/logical_rewriter.dart

Issue 1291333002: Revert "dart2js cps: Compile some loops as 'for' loops." (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 4 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) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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 library tree_ir.optimization.logical_rewriter; 5 library tree_ir.optimization.logical_rewriter;
6 6
7 import '../tree_ir_nodes.dart'; 7 import '../tree_ir_nodes.dart';
8 import 'optimization.dart' show Pass; 8 import 'optimization.dart' show Pass;
9 import '../../constants/values.dart' as values; 9 import '../../constants/values.dart' as values;
10 10
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 return node; 183 return node;
184 } 184 }
185 185
186 Statement visitWhileTrue(WhileTrue node) { 186 Statement visitWhileTrue(WhileTrue node) {
187 fallthrough.push(node); 187 fallthrough.push(node);
188 node.body = visitStatement(node.body); 188 node.body = visitStatement(node.body);
189 fallthrough.pop(); 189 fallthrough.pop();
190 return node; 190 return node;
191 } 191 }
192 192
193 Statement visitFor(For node) { 193 Statement visitWhileCondition(WhileCondition node) {
194 fallthrough.push(node); 194 fallthrough.push(node);
195 node.condition = makeCondition(node.condition, true, liftNots: false); 195 node.condition = makeCondition(node.condition, true, liftNots: false);
196 node.body = visitStatement(node.body); 196 node.body = visitStatement(node.body);
197 fallthrough.pop(); 197 fallthrough.pop();
198 node.next = visitStatement(node.next); 198 node.next = visitStatement(node.next);
199 return node; 199 return node;
200 } 200 }
201 201
202 Statement visitBreak(Break node) { 202 Statement visitBreak(Break node) {
203 if (isFallthroughBreak(node)) { 203 if (isFallthroughBreak(node)) {
(...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after
537 bool isSameVariable(Expression e1, Expression e2) { 537 bool isSameVariable(Expression e1, Expression e2) {
538 if (e1 is VariableUse) { 538 if (e1 is VariableUse) {
539 return e2 is VariableUse && e1.variable == e2.variable; 539 return e2 is VariableUse && e1.variable == e2.variable;
540 } else if (e1 is Assign) { 540 } else if (e1 is Assign) {
541 return e2 is VariableUse && e1.variable == e2.variable; 541 return e2 is VariableUse && e1.variable == e2.variable;
542 } 542 }
543 return false; 543 return false;
544 } 544 }
545 } 545 }
546 546
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/js_backend/codegen/codegen.dart ('k') | pkg/compiler/lib/src/tree_ir/optimization/loop_rewriter.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698