Index: src/hydrogen-instructions.cc |
diff --git a/src/hydrogen-instructions.cc b/src/hydrogen-instructions.cc |
index b0045b8751b06258f0a241416e54615924ea910f..61eb1a098c58bfe6364a6fbf03c5bbf035e16969 100644 |
--- a/src/hydrogen-instructions.cc |
+++ b/src/hydrogen-instructions.cc |
@@ -3209,6 +3209,7 @@ void HAllocate::HandleSideEffectDominator(GVNFlag side_effect, |
// First update the size of the dominator allocate instruction. |
int32_t dominator_size_constant = |
HConstant::cast(dominator_size)->GetInteger32Constant(); |
+ int32_t object_offset = dominator_size_constant; |
int32_t current_size_constant = |
HConstant::cast(current_size)->GetInteger32Constant(); |
int32_t new_dominator_size = dominator_size_constant + current_size_constant; |
@@ -3238,6 +3239,20 @@ void HAllocate::HandleSideEffectDominator(GVNFlag side_effect, |
new_dominator_size_constant->InsertBefore(dominator_allocate_instr); |
dominator_allocate_instr->UpdateSize(new_dominator_size_constant); |
+ // TODO(hpayer): This is a short-term hack to make allocation mementos |
+ // work again in new space. |
+ if (dominator_allocate_instr->type().Equals(HType::JSArray()) && |
mvstanton
2013/08/26 10:01:27
Actually here could you make use of Map::CanTrackA
Hannes Payer (out of office)
2013/08/26 11:51:07
Thanks for the comment, makes sense. I made a stat
|
+ !dominator_allocate_instr->clear_next_map_word_) { |
+ HObjectAccess access = |
+ HObjectAccess::ForJSObjectOffset(object_offset); |
+ HStoreNamedField* clear_next_map = |
+ HStoreNamedField::New(zone, context(), dominator_allocate_instr, access, |
+ block->graph()->GetConstantNull()); |
+ clear_next_map->ClearAllSideEffects(); |
+ clear_next_map->InsertAfter(dominator_allocate_instr); |
+ dominator_allocate_instr->clear_next_map_word_ = true; |
+ } |
+ |
#ifdef VERIFY_HEAP |
if (FLAG_verify_heap) { |
dominator_allocate_instr->MakePrefillWithFiller(); |