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

Unified Diff: sdk/lib/_internal/compiler/implementation/ssa/nodes.dart

Issue 36073002: Separate HTypeConversion checked type from output type. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 2 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
Index: sdk/lib/_internal/compiler/implementation/ssa/nodes.dart
diff --git a/sdk/lib/_internal/compiler/implementation/ssa/nodes.dart b/sdk/lib/_internal/compiler/implementation/ssa/nodes.dart
index e05bc81cbdfaebb52ecd4a9f209229a282ddab97..16d628ffd030bf3add9499b03c1167c16516e200 100644
--- a/sdk/lib/_internal/compiler/implementation/ssa/nodes.dart
+++ b/sdk/lib/_internal/compiler/implementation/ssa/nodes.dart
@@ -2327,6 +2327,7 @@ class HTypeConversion extends HCheck {
final int kind;
final Selector receiverTypeCheckSelector;
final bool contextIsTypeArguments;
+ HType checkedType; // Not final because we refine it.
static const int CHECKED_MODE_CHECK = 0;
static const int ARGUMENT_TYPE_CHECK = 1;
@@ -2338,6 +2339,7 @@ class HTypeConversion extends HCheck {
HType type, HInstruction input,
[this.receiverTypeCheckSelector])
: contextIsTypeArguments = false,
+ checkedType = type,
super(<HInstruction>[input]) {
assert(!isReceiverTypeCheck || receiverTypeCheckSelector != null);
assert(typeExpression == null ||
@@ -2350,6 +2352,7 @@ class HTypeConversion extends HCheck {
HType type, HInstruction input,
HInstruction typeRepresentation)
: contextIsTypeArguments = false,
+ checkedType = type,
super(<HInstruction>[input, typeRepresentation]),
receiverTypeCheckSelector = null {
assert(typeExpression.kind != TypeKind.TYPEDEF);
@@ -2362,6 +2365,7 @@ class HTypeConversion extends HCheck {
HInstruction context,
{bool this.contextIsTypeArguments})
: super(<HInstruction>[input, context]),
+ checkedType = type,
receiverTypeCheckSelector = null {
assert(typeExpression.kind != TypeKind.TYPEDEF);
sourceElement = input.sourceElement;
@@ -2404,7 +2408,7 @@ class HTypeConversion extends HCheck {
bool dataEquals(HTypeConversion other) {
return kind == other.kind
&& typeExpression == other.typeExpression
- && instructionType == other.instructionType;
+ && checkedType == other.checkedType;
}
}

Powered by Google App Engine
This is Rietveld 408576698