Chromium Code Reviews| 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 a8050bd1c78f3a6333bf42f36fa065c0f43f2a34..1130fecebec7e585d8adef8bef1c0b9970c3adc1 100644 |
| --- a/pkg/compiler/lib/src/ssa/nodes.dart |
| +++ b/pkg/compiler/lib/src/ssa/nodes.dart |
| @@ -2421,12 +2421,19 @@ class HIs extends HInstruction { |
| final DartType typeExpression; |
| final int kind; |
| + final bool useInstanceOf; |
| HIs.direct(DartType typeExpression, |
| HInstruction expression, |
| TypeMask type) |
| : this.internal(typeExpression, [expression], RAW_CHECK, type); |
| + // Pre-verified that the check can be done using 'instanceof'. |
| + HIs.instanceOf(DartType typeExpression, |
| + HInstruction expression, |
| + TypeMask type) |
| + : this.internal(typeExpression, [expression], RAW_CHECK, type, true); |
| + |
| HIs.raw(DartType typeExpression, |
| HInstruction expression, |
| HInterceptor interceptor, |
| @@ -2446,7 +2453,8 @@ class HIs extends HInstruction { |
| TypeMask type) |
| : this.internal(typeExpression, [expression, call], VARIABLE_CHECK, type); |
| - HIs.internal(this.typeExpression, List<HInstruction> inputs, this.kind, type) |
| + HIs.internal(this.typeExpression, List<HInstruction> inputs, this.kind, |
| + TypeMask type, [bool this.useInstanceOf = false]) |
|
floitsch
2015/01/16 14:14:34
I would make useInstanceOf a named argument.
sra1
2015/01/20 20:07:28
Done.
|
| : super(inputs, type) { |
| assert(kind >= RAW_CHECK && kind <= VARIABLE_CHECK); |
| setUseGvn(); |