Index: pkg/compiler/lib/src/ssa/nodes.dart |
diff --git a/pkg/compiler/lib/src/ssa/nodes.dart b/pkg/compiler/lib/src/ssa/nodes.dart |
index a0aafb00ce276783a0884fae91d7ed057fe20b73..f69b806f9035f89ac64019712109b030c99f8dfe 100644 |
--- a/pkg/compiler/lib/src/ssa/nodes.dart |
+++ b/pkg/compiler/lib/src/ssa/nodes.dart |
@@ -1503,6 +1503,7 @@ abstract class HControlFlow extends HInstruction { |
// Allocates and initializes an instance. |
class HCreate extends HInstruction { |
final ClassElement element; |
+ final bool hasRtiInput; // Is one of the inputs a reified type? |
Siggi Cherem (dart-lang)
2016/09/07 17:49:38
nit: move this into a dart doc. I'd also highlight
sra1
2016/09/07 18:16:06
Done.
|
/// If this field is not `null`, this call is from an inlined constructor and |
/// we have to register the instantiated type in the code generator. The |
@@ -1511,14 +1512,19 @@ class HCreate extends HInstruction { |
List<DartType> instantiatedTypes; |
HCreate(this.element, List<HInstruction> inputs, TypeMask type, |
- [this.instantiatedTypes]) |
+ {this.instantiatedTypes, this.hasRtiInput: false}) |
: super(inputs, type); |
- accept(HVisitor visitor) => visitor.visitCreate(this); |
- |
bool get isAllocation => true; |
- String toString() => 'HCreate($element)'; |
+ HInstruction get rtiInput { |
+ assert(hasRtiInput); |
+ return inputs.last; |
+ } |
+ |
+ accept(HVisitor visitor) => visitor.visitCreate(this); |
+ |
+ String toString() => 'HCreate($element, ${instantiatedTypes})'; |
} |
abstract class HInvoke extends HInstruction { |
@@ -3330,7 +3336,7 @@ class HTypeInfoExpression extends HInstruction { |
return kind == other.kind && dartType == other.dartType; |
} |
- String toString() => 'HTypeInfoExpression $kindAsString $dartType'; |
+ String toString() => 'HTypeInfoExpression($kindAsString, $dartType)'; |
String get kindAsString { |
switch (kind) { |