| 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 915908fe6da702fb71eb601c751c0f2adbb612f9..dcbf95f1f8605e8d5b187c87d41291127f139fcf 100644
|
| --- a/sdk/lib/_internal/compiler/implementation/ssa/nodes.dart
|
| +++ b/sdk/lib/_internal/compiler/implementation/ssa/nodes.dart
|
| @@ -2239,6 +2239,7 @@ class HTypeConversion extends HCheck {
|
| final DartType typeExpression;
|
| final int kind;
|
| final Selector receiverTypeCheckSelector;
|
| + final bool contextIsTypeArguments;
|
|
|
| static const int NO_CHECK = 0;
|
| static const int CHECKED_MODE_CHECK = 1;
|
| @@ -2250,7 +2251,8 @@ class HTypeConversion extends HCheck {
|
| HTypeConversion(this.typeExpression, this.kind,
|
| HType type, HInstruction input,
|
| [this.receiverTypeCheckSelector])
|
| - : super(<HInstruction>[input]) {
|
| + : contextIsTypeArguments = false,
|
| + super(<HInstruction>[input]) {
|
| assert(!isReceiverTypeCheck || receiverTypeCheckSelector != null);
|
| sourceElement = input.sourceElement;
|
| instructionType = type;
|
| @@ -2259,7 +2261,18 @@ class HTypeConversion extends HCheck {
|
| HTypeConversion.withTypeRepresentation(this.typeExpression, this.kind,
|
| HType type, HInstruction input,
|
| HInstruction typeRepresentation)
|
| - : super(<HInstruction>[input, typeRepresentation]),
|
| + : contextIsTypeArguments = false,
|
| + super(<HInstruction>[input, typeRepresentation]),
|
| + receiverTypeCheckSelector = null {
|
| + sourceElement = input.sourceElement;
|
| + instructionType = type;
|
| + }
|
| +
|
| + HTypeConversion.withContext(this.typeExpression, this.kind,
|
| + HType type, HInstruction input,
|
| + HInstruction context,
|
| + {bool this.contextIsTypeArguments})
|
| + : super(<HInstruction>[input, context]),
|
| receiverTypeCheckSelector = null {
|
| sourceElement = input.sourceElement;
|
| instructionType = type;
|
| @@ -2268,6 +2281,9 @@ class HTypeConversion extends HCheck {
|
| bool get hasTypeRepresentation => inputs.length > 1;
|
| HInstruction get typeRepresentation => inputs[1];
|
|
|
| + bool get hasContext => inputs.length > 1;
|
| + HInstruction get context => inputs[1];
|
| +
|
| HInstruction convertType(Compiler compiler, DartType type, int kind) {
|
| if (typeExpression == type) return this;
|
| return super.convertType(compiler, type, kind);
|
|
|