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

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: Add parameter for each type variable to the JS-factory. 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 639 matching lines...) Expand 10 before | Expand all | Expand 10 after
650 processGetField(GetField node) { 650 processGetField(GetField node) {
651 node.object.parent = node; 651 node.object.parent = node;
652 } 652 }
653 653
654 processGetMutableVariable(GetMutableVariable node) { 654 processGetMutableVariable(GetMutableVariable node) {
655 node.variable.parent = node; 655 node.variable.parent = node;
656 } 656 }
657 657
658 processCreateInstance(CreateInstance node) { 658 processCreateInstance(CreateInstance node) {
659 node.arguments.forEach((Reference ref) => ref.parent = node); 659 node.arguments.forEach((Reference ref) => ref.parent = node);
660 if (node.hasTypeInformation) {
661 node.typeInformation.forEach((Reference ref) => ref.parent = node);
662 }
660 } 663 }
661 664
662 processCreateBox(CreateBox node) { 665 processCreateBox(CreateBox node) {
663 } 666 }
664 667
665 processReifyRuntimeType(ReifyRuntimeType node) { 668 processReifyRuntimeType(ReifyRuntimeType node) {
666 node.value.parent = node; 669 node.value.parent = node;
667 } 670 }
668 671
669 processReadTypeVariable(ReadTypeVariable node) { 672 processReadTypeVariable(ReadTypeVariable node) {
670 node.target.parent = node; 673 node.target.parent = node;
671 } 674 }
675
676 processTypeExpression(TypeExpression node) {
677 node.arguments.forEach((Reference ref) => ref.parent = node);
678 }
672 } 679 }
673 680
674 class _ReductionKind { 681 class _ReductionKind {
675 final String name; 682 final String name;
676 final int hashCode; 683 final int hashCode;
677 684
678 const _ReductionKind(this.name, this.hashCode); 685 const _ReductionKind(this.name, this.hashCode);
679 686
680 static const _ReductionKind DEAD_VAL = const _ReductionKind('dead-val', 0); 687 static const _ReductionKind DEAD_VAL = const _ReductionKind('dead-val', 0);
681 static const _ReductionKind DEAD_CONT = const _ReductionKind('dead-cont', 1); 688 static const _ReductionKind DEAD_CONT = const _ReductionKind('dead-cont', 1);
(...skipping 26 matching lines...) Expand all
708 } 715 }
709 716
710 String toString() => "$kind: $node"; 717 String toString() => "$kind: $node";
711 } 718 }
712 719
713 /// A dummy class used solely to mark nodes as deleted once they are removed 720 /// A dummy class used solely to mark nodes as deleted once they are removed
714 /// from a term. 721 /// from a term.
715 class _DeletedNode extends Node { 722 class _DeletedNode extends Node {
716 accept(_) => null; 723 accept(_) => null;
717 } 724 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698