Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(213)

Unified Diff: src/hydrogen-instructions.cc

Issue 239333014: Don't clear map word when dominator and dominated HAllocate belong to the same basic block. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/hydrogen-instructions.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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()) {
titzer 2014/04/17 12:41:46 I don't think this is true, because if you have a
Zone* zone = block()->zone();
HObjectAccess access =
HObjectAccess::ForObservableJSObjectOffset(offset);
« no previous file with comments | « src/hydrogen-instructions.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698