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 7ae47a5c134e79a5ad369d2a07259bf3dd9c03d7..cecf42d12e78bc924108bbbc1217600bad0b8d70 100644 |
--- a/pkg/compiler/lib/src/cps_ir/type_propagation.dart |
+++ b/pkg/compiler/lib/src/cps_ir/type_propagation.dart |
@@ -1280,7 +1280,7 @@ class TypePropagationVisitor implements Visitor { |
} |
void visitCreateInstance(CreateInstance node) { |
- setValue(node, nonConstant(typeSystem.nonNullExact(node.classElement))); |
+ setValue(node, nonConstant(typeSystem.nonNullExact(node.classElement.declaration))); |
} |
void visitReifyRuntimeType(ReifyRuntimeType node) { |
@@ -1304,6 +1304,19 @@ class TypePropagationVisitor implements Visitor { |
// TODO(asgerf): Expose [Invocation] type. |
setValue(node, nonConstant(typeSystem.nonNullType)); |
} |
+ |
+ @override |
+ visitForeignCode(ForeignCode node) { |
+ if (node.continuation != null) { |
+ Continuation continuation = node.continuation.definition; |
+ setReachable(continuation); |
+ |
+ assert(continuation.parameters.length == 1); |
+ Parameter returnValue = continuation.parameters.first; |
+ setValue(returnValue, nonConstant(node.type)); |
+ } |
+ setValue(node, nonConstant()); |
+ } |
} |
/// Represents the abstract value of a primitive value at some point in the |