| Index: pkg/compiler/lib/src/cps_ir/type_propagation.dart
|
| diff --git a/pkg/compiler/lib/src/cps_ir/type_propagation.dart b/pkg/compiler/lib/src/cps_ir/type_propagation.dart
|
| index b8fa9184826c37286420b1138db3e8ff970ecc6c..0bcd7a9d05229f57950b57ce676c14aa10148502 100644
|
| --- a/pkg/compiler/lib/src/cps_ir/type_propagation.dart
|
| +++ b/pkg/compiler/lib/src/cps_ir/type_propagation.dart
|
| @@ -43,15 +43,12 @@ class ConstantPropagationLattice {
|
| final ConstantSystem constantSystem;
|
| final types.DartTypes dartTypes;
|
| final AbstractValue anything;
|
| - final AbstractValue nullValue;
|
|
|
| ConstantPropagationLattice(TypeMaskSystem typeSystem,
|
| this.constantSystem,
|
| this.dartTypes)
|
| : this.typeSystem = typeSystem,
|
| - anything = new AbstractValue.nonConstant(typeSystem.dynamicType),
|
| - nullValue = new AbstractValue.constantValue(
|
| - new NullConstantValue(), new TypeMask.empty());
|
| + anything = new AbstractValue.nonConstant(typeSystem.dynamicType);
|
|
|
| final AbstractValue nothing = new AbstractValue.nothing();
|
|
|
| @@ -1833,23 +1830,6 @@ class TransformingVisitor extends LeafVisitor {
|
| <Primitive>[prim],
|
| node.sourceInformation);
|
| }
|
| - AbstractBool isNullableSubtype =
|
| - lattice.isSubtypeOf(value, node.dartType, allowNull: true);
|
| - AbstractBool isNullPassingTest =
|
| - lattice.isSubtypeOf(lattice.nullValue, node.dartType);
|
| - if (isNullableSubtype == AbstractBool.True &&
|
| - isNullPassingTest == AbstractBool.False) {
|
| - // Null is the only value not satisfying the type test.
|
| - // Replace the type test with a null-check.
|
| - // This has lower priority than the 'typeof'-based tests because
|
| - // 'typeof' expressions might give the VM some more useful information.
|
| - Primitive nullConst = makeConstantPrimitive(new NullConstantValue());
|
| - insertLetPrim(node.parent, nullConst);
|
| - return new ApplyBuiltinOperator(
|
| - BuiltinOperator.LooseNeq,
|
| - <Primitive>[prim, nullConst],
|
| - node.sourceInformation);
|
| - }
|
| return null;
|
| }
|
|
|
|
|