Reviewers: titzer,
Description:
Don't clear map word when dominator and dominated HAllocate belong to the
same
basic block.
BUG=
Please review this at https://codereview.chromium.org/239333014/
SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge
Affected files (+9, -5 lines):
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
22a7586a9996047708ae5c69edd242cc3839f550..fd95ea2600872c165d604090a83fdd2ec6c6e7bd
100644
--- a/src/hydrogen-instructions.cc
+++ b/src/hydrogen-instructions.cc
@@ -3804,12 +3804,12 @@ bool HAllocate::HandleSideEffectDominator(GVNFlag
side_effect,
} else {
// TODO(hpayer): This is a short-term hack to make allocation mementos
// work again in new space.
- dominator_allocate->ClearNextMapWord(original_object_size);
+ dominator_allocate->ClearNextMapWord(this, original_object_size);
}
#else
// TODO(hpayer): This is a short-term hack to make allocation mementos
// work again in new space.
- dominator_allocate->ClearNextMapWord(original_object_size);
+ dominator_allocate->ClearNextMapWord(this, original_object_size);
#endif
dominator_allocate->UpdateClearNextMapWord(MustClearNextMapWord());
@@ -3956,8 +3956,12 @@ void HAllocate::CreateFreeSpaceFiller(int32_t
free_space_size) {
}
-void HAllocate::ClearNextMapWord(int offset) {
- if (MustClearNextMapWord()) {
+void HAllocate::ClearNextMapWord(HAllocate* dominated, int offset) {
+ // If dominator and dominated allocate operations belong to the same
basic
+ // block we can guarantee that there is no fragmentation. Hence, we do
not
+ // have to clear the map word of the dominated allocation operation.
+ if (MustClearNextMapWord() &&
+ block()->block_id() != dominated->block()->block_id()) {
Zone* zone = block()->zone();
HObjectAccess access =
HObjectAccess::ForObservableJSObjectOffset(offset);
Index: src/hydrogen-instructions.h
diff --git a/src/hydrogen-instructions.h b/src/hydrogen-instructions.h
index
7094cab29ea5acd180025e2b4148d524a9ba8c9c..6c821f21f918a194994a5e50d9cd648508607084
100644
--- a/src/hydrogen-instructions.h
+++ b/src/hydrogen-instructions.h
@@ -5543,7 +5543,7 @@ class HAllocate V8_FINAL : public
HTemplateInstruction<2> {
allocate->IsOldPointerSpaceAllocation());
}
- void ClearNextMapWord(int offset);
+ void ClearNextMapWord(HAllocate* dominated, int offset);
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/d/optout.