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

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

Issue 831133004: Use closure conversion in new dart2js backend. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Removed redundant null-check Created 5 years, 11 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
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 part of tree_ir.optimization; 5 part of tree_ir.optimization;
6 6
7 /// Eliminates moving assignments, such as w := v, by assigning directly to w 7 /// Eliminates moving assignments, such as w := v, by assigning directly to w
8 /// at the definition of v. 8 /// at the definition of v.
9 /// 9 ///
10 /// This compensates for suboptimal register allocation, and merges closure 10 /// This compensates for suboptimal register allocation, and merges closure
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 node.next = visitStatement(node.next); 217 node.next = visitStatement(node.next);
218 return node; 218 return node;
219 } 219 }
220 220
221 Statement visitExpressionStatement(ExpressionStatement node) { 221 Statement visitExpressionStatement(ExpressionStatement node) {
222 node.next = visitStatement(node.next); 222 node.next = visitStatement(node.next);
223 visitExpression(node.expression); 223 visitExpression(node.expression);
224 return node; 224 return node;
225 } 225 }
226 226
227 Statement visitSetField(SetField node) {
228 node.next = visitStatement(node.next);
229 visitExpression(node.value);
230 visitExpression(node.object);
231 return node;
232 }
233
227 void visitFunctionExpression(FunctionExpression node) { 234 void visitFunctionExpression(FunctionExpression node) {
228 new CopyPropagator().rewrite(node.definition); 235 new CopyPropagator().rewrite(node.definition);
229 } 236 }
230 237
231 void visitFieldInitializer(FieldInitializer node) { 238 void visitFieldInitializer(FieldInitializer node) {
232 visitStatement(node.body); 239 visitStatement(node.body);
233 } 240 }
234 241
235 } 242 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698