Index: runtime/vm/flow_graph_type_propagator.cc |
diff --git a/runtime/vm/flow_graph_type_propagator.cc b/runtime/vm/flow_graph_type_propagator.cc |
index bc4a844d32c2e9f75d3f0dbd9f6d1f29477a692c..9f96d7d7ca2beab4cbe7d49a62f7c7c6a9e9eef4 100644 |
--- a/runtime/vm/flow_graph_type_propagator.cc |
+++ b/runtime/vm/flow_graph_type_propagator.cc |
@@ -804,8 +804,11 @@ CompileType ConstantInstr::ComputeType() const { |
} |
if (value().IsInstance()) { |
+ // Allocate in old-space since this may be invoked from the |
+ // background compiler. |
return CompileType::Create( |
- cid, AbstractType::ZoneHandle(Instance::Cast(value()).GetType())); |
+ cid, |
+ AbstractType::ZoneHandle(Instance::Cast(value()).GetType(Heap::kOld))); |
} else { |
// Type info for non-instance objects. |
return CompileType::FromCid(cid); |