| Index: src/hydrogen-instructions.h
|
| diff --git a/src/hydrogen-instructions.h b/src/hydrogen-instructions.h
|
| index 908faa8011d90142295ee522345fbaf69c0ac181..cdb9756f4e0f894858da4f2d76ddac2123fda219 100644
|
| --- a/src/hydrogen-instructions.h
|
| +++ b/src/hydrogen-instructions.h
|
| @@ -5702,6 +5702,17 @@ inline bool ReceiverObjectNeedsWriteBarrier(HValue* object,
|
| }
|
|
|
|
|
| +inline bool ObjectIsInNewSpace(HValue* object,
|
| + HValue* dominator) {
|
| + while (object->IsInnerAllocatedObject()) {
|
| + object = HInnerAllocatedObject::cast(object)->base_object();
|
| + }
|
| + if (object != dominator) return false;
|
| + return (object->IsAllocate() &&
|
| + HAllocate::cast(object)->IsNewSpaceAllocation());
|
| +}
|
| +
|
| +
|
| class HStoreGlobalCell V8_FINAL : public HUnaryOperation {
|
| public:
|
| DECLARE_INSTRUCTION_FACTORY_P3(HStoreGlobalCell, HValue*,
|
| @@ -6720,6 +6731,10 @@ class HStoreNamedField V8_FINAL : public HTemplateInstruction<3> {
|
| return INLINE_SMI_CHECK;
|
| }
|
|
|
| + bool ValueIsInNewSpace() const {
|
| + return ObjectIsInNewSpace(value(), new_space_dominator());
|
| + }
|
| +
|
| Representation field_representation() const {
|
| return access_.representation();
|
| }
|
| @@ -6878,9 +6893,9 @@ class HStoreKeyed V8_FINAL
|
| return Representation::None();
|
| }
|
|
|
| - HValue* elements() { return OperandAt(0); }
|
| - HValue* key() { return OperandAt(1); }
|
| - HValue* value() { return OperandAt(2); }
|
| + HValue* elements() const { return OperandAt(0); }
|
| + HValue* key() const { return OperandAt(1); }
|
| + HValue* value() const { return OperandAt(2); }
|
| bool value_is_smi() const {
|
| return IsFastSmiElementsKind(elements_kind_);
|
| }
|
| @@ -6925,6 +6940,10 @@ class HStoreKeyed V8_FINAL
|
| }
|
| }
|
|
|
| + bool ValueIsInNewSpace() const {
|
| + return ObjectIsInNewSpace(value(), new_space_dominator());
|
| + }
|
| +
|
| bool NeedsCanonicalization();
|
|
|
| virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE;
|
|
|