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

Side by Side Diff: pkg/compiler/lib/src/cps_ir/shrinking_reductions.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: Created 5 years, 6 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 dart2js.cps_ir.optimizers; 5 part of dart2js.cps_ir.optimizers;
6 6
7 /** 7 /**
8 * [ShrinkingReducer] applies shrinking reductions to CPS terms as described 8 * [ShrinkingReducer] applies shrinking reductions to CPS terms as described
9 * in 'Compiling with Continuations, Continued' by Andrew Kennedy. 9 * in 'Compiling with Continuations, Continued' by Andrew Kennedy.
10 */ 10 */
(...skipping 567 matching lines...) Expand 10 before | Expand all | Expand 10 after
578 node.arguments.forEach((Reference ref) => ref.parent = node); 578 node.arguments.forEach((Reference ref) => ref.parent = node);
579 } 579 }
580 580
581 processBranch(Branch node) { 581 processBranch(Branch node) {
582 node.condition.parent = node; 582 node.condition.parent = node;
583 node.trueContinuation.parent = node; 583 node.trueContinuation.parent = node;
584 node.falseContinuation.parent = node; 584 node.falseContinuation.parent = node;
585 } 585 }
586 586
587 processTypeOperator(TypeOperator node) { 587 processTypeOperator(TypeOperator node) {
588 node.typeArguments.forEach((Reference ref) => ref.parent = node);
588 node.continuation.parent = node; 589 node.continuation.parent = node;
589 node.receiver.parent = node; 590 node.value.parent = node;
590 } 591 }
591 592
592 processSetMutableVariable(SetMutableVariable node) { 593 processSetMutableVariable(SetMutableVariable node) {
593 node.variable.parent = node; 594 node.variable.parent = node;
594 node.body.parent = node; 595 node.body.parent = node;
595 node.value.parent = node; 596 node.value.parent = node;
596 } 597 }
597 598
598 processDeclareFunction(DeclareFunction node) { 599 processDeclareFunction(DeclareFunction node) {
599 node.variable.parent = node; 600 node.variable.parent = node;
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
736 } 737 }
737 738
738 String toString() => "$kind: $node"; 739 String toString() => "$kind: $node";
739 } 740 }
740 741
741 /// A dummy class used solely to mark nodes as deleted once they are removed 742 /// A dummy class used solely to mark nodes as deleted once they are removed
742 /// from a term. 743 /// from a term.
743 class _DeletedNode extends Node { 744 class _DeletedNode extends Node {
744 accept(_) => null; 745 accept(_) => null;
745 } 746 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698