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

Side by Side Diff: pkg/compiler/lib/src/tree_ir/optimization/statement_rewriter.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) 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 /** 7 /**
8 * Performs the following transformations on the tree: 8 * Performs the following transformations on the tree:
9 * - Assignment inlining 9 * - Assignment inlining
10 * - Assignment expression propagation 10 * - Assignment expression propagation
(...skipping 575 matching lines...) Expand 10 before | Expand all | Expand 10 after
586 node.value = visitExpression(node.value); 586 node.value = visitExpression(node.value);
587 node.object = visitExpression(node.object); 587 node.object = visitExpression(node.object);
588 return node; 588 return node;
589 } 589 }
590 590
591 Expression visitGetField(GetField node) { 591 Expression visitGetField(GetField node) {
592 node.object = visitExpression(node.object); 592 node.object = visitExpression(node.object);
593 return node; 593 return node;
594 } 594 }
595 595
596 Expression visitGetStatic(GetStatic node) {
597 return node;
598 }
599
600 Expression visitSetStatic(SetStatic node) {
601 node.value = visitExpression(node.value);
602 return node;
603 }
604
596 Expression visitCreateBox(CreateBox node) { 605 Expression visitCreateBox(CreateBox node) {
597 return node; 606 return node;
598 } 607 }
599 608
600 Expression visitCreateInstance(CreateInstance node) { 609 Expression visitCreateInstance(CreateInstance node) {
601 for (int i = node.arguments.length - 1; i >= 0; --i) { 610 for (int i = node.arguments.length - 1; i >= 0; --i) {
602 node.arguments[i] = visitExpression(node.arguments[i]); 611 node.arguments[i] = visitExpression(node.arguments[i]);
603 } 612 }
604 return node; 613 return node;
605 } 614 }
(...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after
925 } 934 }
926 935
927 /// Result of combining two expressions that do not affect reference counting. 936 /// Result of combining two expressions that do not affect reference counting.
928 class GenericCombinedExpressions implements CombinedExpressions { 937 class GenericCombinedExpressions implements CombinedExpressions {
929 Expression combined; 938 Expression combined;
930 939
931 GenericCombinedExpressions(this.combined); 940 GenericCombinedExpressions(this.combined);
932 941
933 void uncombine() {} 942 void uncombine() {}
934 } 943 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698