Index: src/hydrogen.cc |
diff --git a/src/hydrogen.cc b/src/hydrogen.cc |
index 741b8c53ada0e4d19399e4e72830b1b9f18446b0..ae5d7d40b915aa0dcab3e746f94c308cdca3f919 100644 |
--- a/src/hydrogen.cc |
+++ b/src/hydrogen.cc |
@@ -663,6 +663,23 @@ DEFINE_GET_CONSTANT(False, false, HType::Boolean(), false) |
DEFINE_GET_CONSTANT(Hole, the_hole, HType::Tagged(), false) |
DEFINE_GET_CONSTANT(Null, null, HType::Tagged(), false) |
+HConstant* HGraph::GetConstantFreeSpaceMap() { |
+ if (!constant_free_space_map_.is_set()) { |
+ HConstant* constant = new(zone()) HConstant( |
+ isolate()->factory()->free_space_map(), |
+ UniqueValueId(isolate()->heap()->free_space_map()), |
+ Representation::None(), |
+ HType::Tagged(), |
+ false, |
+ true, |
+ false, |
+ false); |
+ constant->InsertAfter(GetConstantUndefined()); |
+ constant_free_space_map_.set(constant); |
+ } |
+ return constant_free_space_map_.get(); |
+} |
+ |
#undef DEFINE_GET_CONSTANT |
@@ -3440,6 +3457,7 @@ bool HGraph::Optimize(SmartArrayPointer<char>* bailout_reason) { |
// The constant is needed to make idef-based bounds check work: the pass |
// evaluates relations with "zero" and that zero cannot be created after GVN. |
GetConstant0(); |
+ GetConstantFreeSpaceMap(); |
#ifdef DEBUG |
// Do a full verify after building the graph and computing dominators. |