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 6b09771cd9a54a246132253c688a695c84d3d542..29ab33d22191e4d6550773f86d021a8dff55c220 100644 |
--- a/pkg/compiler/lib/src/cps_ir/type_propagation.dart |
+++ b/pkg/compiler/lib/src/cps_ir/type_propagation.dart |
@@ -968,7 +968,7 @@ class TransformingVisitor extends DeepRecursiveVisitor { |
} |
// If a primitive has a value, but can't return anything, it must throw |
// or diverge. |
- return prim.hasValue && prim.type.isEmpty && !prim.type.isNullable; |
+ return prim.hasValue && prim.type.isEmpty; |
} |
void visitContinuation(Continuation node) { |
@@ -2709,9 +2709,7 @@ class TypePropagationVisitor implements Visitor { |
? typeSystem.getParameterType(param.hint) |
: typeSystem.dynamicType; |
setValue(param, lattice.fromMask(type)); |
- if (type.isEmpty && !type.isNullable) { |
- hasParameterWithoutValue = true; |
- } |
+ if (type.isEmpty) hasParameterWithoutValue = true; |
} |
} |
if (!hasParameterWithoutValue) { // Don't analyze unreachable code. |
@@ -3383,11 +3381,10 @@ class AbstractConstantValue { |
factory AbstractConstantValue.nonConstant(TypeMask type) { |
if (type.isEmpty) { |
- if (type.isNullable) |
- return new AbstractConstantValue.constantValue( |
- new NullConstantValue(), type); |
- else |
- return new AbstractConstantValue.nothing(); |
+ return new AbstractConstantValue.nothing(); |
+ } else if (type.isNull) { |
+ return new AbstractConstantValue.constantValue( |
+ new NullConstantValue(), type); |
} else { |
return new AbstractConstantValue._internal(NONCONST, null, type); |
} |