Chromium Code Reviews| Index: src/hydrogen-instructions.h |
| diff --git a/src/hydrogen-instructions.h b/src/hydrogen-instructions.h |
| index b60a23bc7e8de6ec84ae7ff514b64fa263bc1468..caaa611e7ec3c57273243d4ffe08da03ad3b4a32 100644 |
| --- a/src/hydrogen-instructions.h |
| +++ b/src/hydrogen-instructions.h |
| @@ -171,6 +171,7 @@ class LChunkBuilder; |
| V(StoreContextSlot) \ |
| V(StoreGlobalCell) \ |
| V(StoreGlobalGeneric) \ |
| + V(SubAllocatedObject) \ |
|
Hannes Payer (out of office)
2013/03/13 08:48:39
alphabetic order.
mvstanton
2013/03/13 10:14:40
Done.
|
| V(StoreKeyed) \ |
| V(StoreKeyedGeneric) \ |
| V(StoreNamedField) \ |
| @@ -4691,18 +4692,6 @@ inline bool StoringValueNeedsWriteBarrier(HValue* value) { |
| } |
| -inline bool ReceiverObjectNeedsWriteBarrier(HValue* object, |
| - HValue* new_space_dominator) { |
| - if (object != new_space_dominator) return true; |
| - if (object->IsFastLiteral()) return false; |
| - if (object->IsAllocateObject()) return false; |
| - if (object->IsAllocate()) { |
| - return !HAllocate::cast(object)->GuaranteedInNewSpace(); |
| - } |
| - return true; |
| -} |
| - |
| - |
| class HStoreGlobalCell: public HUnaryOperation { |
| public: |
| HStoreGlobalCell(HValue* value, |
| @@ -5215,6 +5204,10 @@ class HLoadKeyedGeneric: public HTemplateInstruction<3> { |
| }; |
| +bool ReceiverObjectNeedsWriteBarrier(HValue* object, |
| + HValue* new_space_dominator); |
| + |
|
Hannes Payer (out of office)
2013/03/13 08:48:39
Can you move code around that you do not need this
mvstanton
2013/03/13 10:14:40
That is much better, thx...I was lazy :).
|
| + |
| class HStoreNamedField: public HTemplateInstruction<2> { |
| public: |
| HStoreNamedField(HValue* obj, |
| @@ -5311,6 +5304,47 @@ class HStoreNamedGeneric: public HTemplateInstruction<3> { |
| }; |
| +class HSubAllocatedObject: public HTemplateInstruction<1> { |
| + public: |
| + HSubAllocatedObject(HValue* value, int offset) |
| + : offset_(offset) { |
| + ASSERT(value->IsAllocate()); |
| + SetOperandAt(0, value); |
| + set_representation(Representation::Tagged()); |
| + } |
| + |
| + HValue* base_object() { return OperandAt(0); } |
| + int offset() { return offset_; } |
| + |
| + virtual Representation RequiredInputRepresentation(int index) { |
| + return Representation::Tagged(); |
| + } |
| + |
| + virtual void PrintDataTo(StringStream* stream); |
| + |
| + DECLARE_CONCRETE_INSTRUCTION(SubAllocatedObject) |
|
Michael Starzinger
2013/03/13 09:12:35
Empty newline before the "private:" block.
mvstanton
2013/03/13 10:14:40
Done.
|
| + private: |
| + int offset_; |
| +}; |
| + |
| + |
| +inline bool ReceiverObjectNeedsWriteBarrier(HValue* object, |
| + HValue* new_space_dominator) { |
| + if (object->IsSubAllocatedObject()) { |
| + return ReceiverObjectNeedsWriteBarrier( |
| + HSubAllocatedObject::cast(object)->base_object(), |
| + new_space_dominator); |
| + } |
| + if (object != new_space_dominator) return true; |
| + if (object->IsFastLiteral()) return false; |
| + if (object->IsAllocateObject()) return false; |
| + if (object->IsAllocate()) { |
| + return !HAllocate::cast(object)->GuaranteedInNewSpace(); |
| + } |
| + return true; |
| +} |
| + |
| + |
| class HStoreKeyed |
| : public HTemplateInstruction<3>, public ArrayInstructionInterface { |
| public: |