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

Unified Diff: pkg/compiler/lib/src/ssa/nodes.dart

Issue 2310573002: dart2js: Pass type information to constructor rather than add later. (Closed)
Patch Set: Filter out type info pseudofield when parsing fieldspec for mirrors Created 4 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/compiler/lib/src/ssa/codegen.dart ('k') | pkg/compiler/lib/src/ssa/optimize.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..e3342cd5b69161e65ad5e1c8e3ddf55d83723ca2 100644
--- a/pkg/compiler/lib/src/ssa/nodes.dart
+++ b/pkg/compiler/lib/src/ssa/nodes.dart
@@ -1504,6 +1504,9 @@ abstract class HControlFlow extends HInstruction {
class HCreate extends HInstruction {
final ClassElement element;
+ /// Does this instruction have reified type information as the last input?
+ final bool hasRtiInput;
+
/// 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
/// [instructionType] of this node is not enough, because we also need the
@@ -1511,14 +1514,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 +3338,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) {
« no previous file with comments | « pkg/compiler/lib/src/ssa/codegen.dart ('k') | pkg/compiler/lib/src/ssa/optimize.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698