Reviewers: Michael Starzinger,
Description:
Insert allocation memento clear instructions after the dominating allocate
instruction.
BUG=
Please review this at https://codereview.chromium.org/23672004/
SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge
Affected files:
M src/hydrogen-instructions.h
M src/hydrogen-instructions.cc
Index: src/hydrogen-instructions.cc
diff --git a/src/hydrogen-instructions.cc b/src/hydrogen-instructions.cc
index
0bd7b7935bcc0e2eacff96578da05e4b4aa00eb6..8ab9d47f625a338abc7d6530d9fd75eec34c538c
100644
--- a/src/hydrogen-instructions.cc
+++ b/src/hydrogen-instructions.cc
@@ -3323,12 +3323,12 @@ void HAllocate::HandleSideEffectDominator(GVNFlag
side_effect,
} else {
// TODO(hpayer): This is a short-term hack to make allocation mementos
// work again in new space.
- ClearNextMapWord(original_object_size);
+ ClearNextMapWord(original_object_size, dominator_allocate);
}
#else
// TODO(hpayer): This is a short-term hack to make allocation mementos
// work again in new space.
- ClearNextMapWord(original_object_size);
+ ClearNextMapWord(original_object_size, dominator_allocate);
#endif
dominator_allocate->clear_next_map_word_ = clear_next_map_word_;
@@ -3468,15 +3468,15 @@ void HAllocate::CreateFreeSpaceFiller(int32_t
free_space_size) {
}
-void HAllocate::ClearNextMapWord(int offset) {
+void HAllocate::ClearNextMapWord(int offset, HInstruction* dominator) {
if (clear_next_map_word_) {
Zone* zone = block()->zone();
HObjectAccess access = HObjectAccess::ForJSObjectOffset(offset);
HStoreNamedField* clear_next_map =
- HStoreNamedField::New(zone, context(), this, access,
+ HStoreNamedField::New(zone, context(), dominator, access,
block()->graph()->GetConstantNull());
clear_next_map->ClearAllSideEffects();
- clear_next_map->InsertAfter(this);
+ clear_next_map->InsertAfter(dominator);
}
}
Index: src/hydrogen-instructions.h
diff --git a/src/hydrogen-instructions.h b/src/hydrogen-instructions.h
index
8f79edfba80970f73c09026bad4bacbba0bfa949..4f75ed672f251a26cacec39c961e1aabc9149023
100644
--- a/src/hydrogen-instructions.h
+++ b/src/hydrogen-instructions.h
@@ -5210,7 +5210,7 @@ class HAllocate V8_FINAL : public
HTemplateInstruction<2> {
allocate->IsOldPointerSpaceAllocation());
}
- void ClearNextMapWord(int offset);
+ void ClearNextMapWord(int offset, HInstruction* dominator);
Flags flags_;
Handle<Map> known_initial_map_;
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.