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

Unified Diff: src/hydrogen-instructions.h

Issue 271103002: Eliminate further write barriers for old space allocations. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
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 85d1e7549fa38aa6a051ab0f0feaa970878674ec..b6620a0e0b3922d34745c2d15c58a4f23c0290d4 100644
--- a/src/hydrogen-instructions.h
+++ b/src/hydrogen-instructions.h
@@ -3545,6 +3545,10 @@ class HConstant V8_FINAL : public HTemplateInstruction<0> {
return instance_type_ == CELL_TYPE || instance_type_ == PROPERTY_CELL_TYPE;
}
+ bool IsMap() const {
+ return instance_type_ == MAP_TYPE;
+ }
+
virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE {
return Representation::None();
}
@@ -5708,6 +5712,13 @@ 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())) {
+ return false;
+ }
// Likewise we don't need a write barrier if we store a value that
// originates from the same allocation (via allocation folding).
while (value->IsInnerAllocatedObject()) {
« 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