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

Unified Diff: src/hydrogen-instructions.h

Issue 290173003: Further improve old space allocation write barrier elimination. (Closed) Base URL: git@github.com:v8/v8.git@master
Patch Set: Created 6 years, 7 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/hydrogen-instructions.h
diff --git a/src/hydrogen-instructions.h b/src/hydrogen-instructions.h
index 011b4080e59999f30b5ce56a40341b7628b325d4..e4e3131c37c064e800981797dca814e63d5e3987 100644
--- a/src/hydrogen-instructions.h
+++ b/src/hydrogen-instructions.h
@@ -5721,19 +5721,20 @@ inline bool ReceiverObjectNeedsWriteBarrier(HValue* object,
if (HAllocate::cast(object)->IsNewSpaceAllocation()) {
return false;
}
- // Storing a map or an immortal immovable object requires no write barriers
- // if the object is the new space dominator.
- if (value->IsConstant() &&
- (HConstant::cast(value)->IsMap() ||
- HConstant::cast(value)->ImmortalImmovable())) {
+ // Stores to old space allocations require no write barriers if the object
+ // is the new space dominator and the value is not in new space.
Hannes Payer (out of office) 2014/05/18 18:54:58 new_space_dominator should be called dominator, ot
Benedikt Meurer 2014/05/19 06:17:51 Done.
+ if (value->IsConstant() && HConstant::cast(value)->NotInNewSpace()) {
return false;
}
- // Likewise we don't need a write barrier if we store a value that
- // originates from the same allocation (via allocation folding).
+ // Likewise we don't need a write barrier if we store a value was previously
+ // allocated in old space.
Hannes Payer (out of office) 2014/05/18 18:54:58 broken comment.
Benedikt Meurer 2014/05/19 06:17:51 Done.
while (value->IsInnerAllocatedObject()) {
value = HInnerAllocatedObject::cast(value)->base_object();
}
- return object != value;
+ if (value->IsAllocate() &&
+ HAllocate::cast(value)->IsOldDataSpaceAllocation()) {
+ return false;
+ }
Hannes Payer (out of office) 2014/05/18 18:54:58 Why not if (value->IsAllocate() && (HAllocate:
Benedikt Meurer 2014/05/19 06:17:51 Done.
}
return true;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698