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

Side by Side Diff: pkg/compiler/lib/src/cps_ir/shrinking_reductions.dart

Issue 1011403003: cps-ir: Set runtime type information for new objects that require it. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 9 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 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 550 matching lines...) Expand 10 before | Expand all | Expand 10 after
561 561
562 processInvokeMethodDirectly(InvokeMethodDirectly node) { 562 processInvokeMethodDirectly(InvokeMethodDirectly node) {
563 node.receiver.parent = node; 563 node.receiver.parent = node;
564 node.continuation.parent = node; 564 node.continuation.parent = node;
565 node.arguments.forEach((Reference ref) => ref.parent = node); 565 node.arguments.forEach((Reference ref) => ref.parent = node);
566 } 566 }
567 567
568 processInvokeConstructor(InvokeConstructor node) { 568 processInvokeConstructor(InvokeConstructor node) {
569 node.continuation.parent = node; 569 node.continuation.parent = node;
570 node.arguments.forEach((Reference ref) => ref.parent = node); 570 node.arguments.forEach((Reference ref) => ref.parent = node);
571 node.typeArguments.forEach((Reference ref) => ref.parent = node);
571 } 572 }
572 573
573 processConcatenateStrings(ConcatenateStrings node) { 574 processConcatenateStrings(ConcatenateStrings node) {
574 node.continuation.parent = node; 575 node.continuation.parent = node;
575 node.arguments.forEach((Reference ref) => ref.parent = node); 576 node.arguments.forEach((Reference ref) => ref.parent = node);
576 } 577 }
577 578
578 processBranch(Branch node) { 579 processBranch(Branch node) {
579 node.condition.parent = node; 580 node.condition.parent = node;
580 node.trueContinuation.parent = node; 581 node.trueContinuation.parent = node;
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
662 processCreateBox(CreateBox node) { 663 processCreateBox(CreateBox node) {
663 } 664 }
664 665
665 processReifyRuntimeType(ReifyRuntimeType node) { 666 processReifyRuntimeType(ReifyRuntimeType node) {
666 node.value.parent = node; 667 node.value.parent = node;
667 } 668 }
668 669
669 processReadTypeVariable(ReadTypeVariable node) { 670 processReadTypeVariable(ReadTypeVariable node) {
670 node.target.parent = node; 671 node.target.parent = node;
671 } 672 }
673
674 processTypeExpression(TypeExpression node) {
675 node.arguments.forEach((Reference ref) => ref.parent = node);
676 }
672 } 677 }
673 678
674 class _ReductionKind { 679 class _ReductionKind {
675 final String name; 680 final String name;
676 final int hashCode; 681 final int hashCode;
677 682
678 const _ReductionKind(this.name, this.hashCode); 683 const _ReductionKind(this.name, this.hashCode);
679 684
680 static const _ReductionKind DEAD_VAL = const _ReductionKind('dead-val', 0); 685 static const _ReductionKind DEAD_VAL = const _ReductionKind('dead-val', 0);
681 static const _ReductionKind DEAD_CONT = const _ReductionKind('dead-cont', 1); 686 static const _ReductionKind DEAD_CONT = const _ReductionKind('dead-cont', 1);
(...skipping 26 matching lines...) Expand all
708 } 713 }
709 714
710 String toString() => "$kind: $node"; 715 String toString() => "$kind: $node";
711 } 716 }
712 717
713 /// A dummy class used solely to mark nodes as deleted once they are removed 718 /// A dummy class used solely to mark nodes as deleted once they are removed
714 /// from a term. 719 /// from a term.
715 class _DeletedNode extends Node { 720 class _DeletedNode extends Node {
716 accept(_) => null; 721 accept(_) => null;
717 } 722 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698