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

Side by Side Diff: pkg/compiler/lib/src/tree_ir/optimization/pull_into_initializers.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) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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.pull_into_initializers; 5 library tree_ir.optimization.pull_into_initializers;
6 6
7 import 'optimization.dart' show Pass; 7 import 'optimization.dart' show Pass;
8 import '../tree_ir_nodes.dart'; 8 import '../tree_ir_nodes.dart';
9 9
10 /// Where a variable has been assigned. 10 /// Where a variable has been assigned.
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 node.body = visitStatement(node.body); 153 node.body = visitStatement(node.body);
154 // The 'next' statement might not always get reached, so do not try to 154 // The 'next' statement might not always get reached, so do not try to
155 // pull expressions up from there. 155 // pull expressions up from there.
156 return node; 156 return node;
157 } 157 }
158 158
159 Statement visitWhileTrue(WhileTrue node) { 159 Statement visitWhileTrue(WhileTrue node) {
160 return node; 160 return node;
161 } 161 }
162 162
163 Statement visitFor(For node) { 163 Statement visitWhileCondition(WhileCondition node) {
164 return node; 164 return node;
165 } 165 }
166 166
167 Statement visitTry(Try node) { 167 Statement visitTry(Try node) {
168 return node; 168 return node;
169 } 169 }
170 170
171 Expression visitAssign(Assign node) { 171 Expression visitAssign(Assign node) {
172 bool inImpureContext = impureCounter > 0; 172 bool inImpureContext = impureCounter > 0;
173 bool inBranch = branchCounter > 0; 173 bool inBranch = branchCounter > 0;
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
360 360
361 @override 361 @override
362 Expression visitForeignExpression(ForeignExpression node) { 362 Expression visitForeignExpression(ForeignExpression node) {
363 rewriteList(node.arguments); 363 rewriteList(node.arguments);
364 if (node.nativeBehavior.sideEffects.hasSideEffects()) { 364 if (node.nativeBehavior.sideEffects.hasSideEffects()) {
365 ++impureCounter; 365 ++impureCounter;
366 } 366 }
367 return node; 367 return node;
368 } 368 }
369 } 369 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698