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

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

Issue 1161683002: dart2js cps: 'is' checks on types with type arguments. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Status file 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
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 554 matching lines...) Expand 10 before | Expand all | Expand 10 after
565 Expression visitLiteralMap(LiteralMap node) { 565 Expression visitLiteralMap(LiteralMap node) {
566 // Process arguments right-to-left, the opposite of evaluation order. 566 // Process arguments right-to-left, the opposite of evaluation order.
567 for (LiteralMapEntry entry in node.entries.reversed) { 567 for (LiteralMapEntry entry in node.entries.reversed) {
568 entry.value = visitExpression(entry.value); 568 entry.value = visitExpression(entry.value);
569 entry.key = visitExpression(entry.key); 569 entry.key = visitExpression(entry.key);
570 } 570 }
571 return node; 571 return node;
572 } 572 }
573 573
574 Expression visitTypeOperator(TypeOperator node) { 574 Expression visitTypeOperator(TypeOperator node) {
575 node.receiver = visitExpression(node.receiver); 575 _rewriteList(node.typeArguments);
576 node.value = visitExpression(node.value);
576 return node; 577 return node;
577 } 578 }
578 579
579 Expression visitSetField(SetField node) { 580 Expression visitSetField(SetField node) {
580 node.value = visitExpression(node.value); 581 node.value = visitExpression(node.value);
581 node.object = visitExpression(node.object); 582 node.object = visitExpression(node.object);
582 return node; 583 return node;
583 } 584 }
584 585
585 Expression visitGetField(GetField node) { 586 Expression visitGetField(GetField node) {
(...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after
922 } 923 }
923 924
924 /// Result of combining two expressions that do not affect reference counting. 925 /// Result of combining two expressions that do not affect reference counting.
925 class GenericCombinedExpressions implements CombinedExpressions { 926 class GenericCombinedExpressions implements CombinedExpressions {
926 Expression combined; 927 Expression combined;
927 928
928 GenericCombinedExpressions(this.combined); 929 GenericCombinedExpressions(this.combined);
929 930
930 void uncombine() {} 931 void uncombine() {}
931 } 932 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698