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

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

Issue 1134063002: dart2js cps: Introduce GetStatic/SetStatic. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix SExpression parsing/unparsing Created 5 years, 7 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) 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 import 'optimization.dart' show Pass; 5 import 'optimization.dart' show Pass;
6 import '../tree_ir_nodes.dart'; 6 import '../tree_ir_nodes.dart';
7 7
8 /// Pulls assignment expressions to the top of the function body so they can be 8 /// Pulls assignment expressions to the top of the function body so they can be
9 /// translated into declaration-site variable initializaters. 9 /// translated into declaration-site variable initializaters.
10 /// 10 ///
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after
268 } 268 }
269 269
270 Expression visitSetField(SetField node) { 270 Expression visitSetField(SetField node) {
271 node.object = visitExpression(node.object); 271 node.object = visitExpression(node.object);
272 if (seenImpure) return node; 272 if (seenImpure) return node;
273 node.value = visitExpression(node.value); 273 node.value = visitExpression(node.value);
274 seenImpure = true; 274 seenImpure = true;
275 return node; 275 return node;
276 } 276 }
277 277
278 Expression visitGetStatic(GetStatic node) {
279 seenImpure = true;
280 return node;
281 }
282
283 Expression visitSetStatic(SetStatic node) {
284 node.value = visitExpression(node.value);
285 seenImpure = true;
286 return node;
287 }
288
278 Expression visitCreateBox(CreateBox node) { 289 Expression visitCreateBox(CreateBox node) {
279 return node; 290 return node;
280 } 291 }
281 292
282 Expression visitCreateInstance(CreateInstance node) { 293 Expression visitCreateInstance(CreateInstance node) {
283 rewriteList(node.arguments); 294 rewriteList(node.arguments);
284 return node; 295 return node;
285 } 296 }
286 297
287 Expression visitReifyRuntimeType(ReifyRuntimeType node) { 298 Expression visitReifyRuntimeType(ReifyRuntimeType node) {
(...skipping 25 matching lines...) Expand all
313 324
314 Expression visitVariableUse(VariableUse node) { 325 Expression visitVariableUse(VariableUse node) {
315 return node; 326 return node;
316 } 327 }
317 328
318 Expression visitCreateInvocationMirror(CreateInvocationMirror node) { 329 Expression visitCreateInvocationMirror(CreateInvocationMirror node) {
319 rewriteList(node.arguments); 330 rewriteList(node.arguments);
320 return node; 331 return node;
321 } 332 }
322 } 333 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/js_backend/codegen/glue.dart ('k') | pkg/compiler/lib/src/tree_ir/optimization/statement_rewriter.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698