Revision: 21216
Author: [email protected]
Date: Fri May 9 12:06:48 2014 UTC
Log: Eliminate further write barriers for old space allocations.
Storing a map or an immortal immovable object to old space
allocations requires no write barriers if the object is the
new space dominator.
[email protected], [email protected]
Review URL: https://codereview.chromium.org/271103002
http://code.google.com/p/v8/source/detail?r=21216
Modified:
/branches/bleeding_edge/src/hydrogen-instructions.h
=======================================
--- /branches/bleeding_edge/src/hydrogen-instructions.h Fri May 9 08:28:25
2014 UTC
+++ /branches/bleeding_edge/src/hydrogen-instructions.h Fri May 9 12:06:48
2014 UTC
@@ -3544,6 +3544,10 @@
bool IsCell() const {
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 @@
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()) {
--
--
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.