OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef V8_CRANKSHAFT_HYDROGEN_INSTRUCTIONS_H_ | 5 #ifndef V8_CRANKSHAFT_HYDROGEN_INSTRUCTIONS_H_ |
6 #define V8_CRANKSHAFT_HYDROGEN_INSTRUCTIONS_H_ | 6 #define V8_CRANKSHAFT_HYDROGEN_INSTRUCTIONS_H_ |
7 | 7 |
8 #include <cstring> | 8 #include <cstring> |
9 #include <iosfwd> | 9 #include <iosfwd> |
10 | 10 |
(...skipping 911 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
922 P3 p3, P4 p4, P5 p5) { \ | 922 P3 p3, P4 p4, P5 p5) { \ |
923 return new (zone) I(p1, p2, p3, p4, p5); \ | 923 return new (zone) I(p1, p2, p3, p4, p5); \ |
924 } | 924 } |
925 | 925 |
926 #define DECLARE_INSTRUCTION_FACTORY_P6(I, P1, P2, P3, P4, P5, P6) \ | 926 #define DECLARE_INSTRUCTION_FACTORY_P6(I, P1, P2, P3, P4, P5, P6) \ |
927 static I* New(Isolate* isolate, Zone* zone, HValue* context, P1 p1, P2 p2, \ | 927 static I* New(Isolate* isolate, Zone* zone, HValue* context, P1 p1, P2 p2, \ |
928 P3 p3, P4 p4, P5 p5, P6 p6) { \ | 928 P3 p3, P4 p4, P5 p5, P6 p6) { \ |
929 return new (zone) I(p1, p2, p3, p4, p5, p6); \ | 929 return new (zone) I(p1, p2, p3, p4, p5, p6); \ |
930 } | 930 } |
931 | 931 |
| 932 #define DECLARE_INSTRUCTION_FACTORY_P7(I, P1, P2, P3, P4, P5, P6, P7) \ |
| 933 static I* New(Isolate* isolate, Zone* zone, HValue* context, P1 p1, P2 p2, \ |
| 934 P3 p3, P4 p4, P5 p5, P6 p6, P7 p7) { \ |
| 935 return new (zone) I(p1, p2, p3, p4, p5, p6, p7); \ |
| 936 } |
| 937 |
932 #define DECLARE_INSTRUCTION_WITH_CONTEXT_FACTORY_P0(I) \ | 938 #define DECLARE_INSTRUCTION_WITH_CONTEXT_FACTORY_P0(I) \ |
933 static I* New(Isolate* isolate, Zone* zone, HValue* context) { \ | 939 static I* New(Isolate* isolate, Zone* zone, HValue* context) { \ |
934 return new (zone) I(context); \ | 940 return new (zone) I(context); \ |
935 } | 941 } |
936 | 942 |
937 #define DECLARE_INSTRUCTION_WITH_CONTEXT_FACTORY_P1(I, P1) \ | 943 #define DECLARE_INSTRUCTION_WITH_CONTEXT_FACTORY_P1(I, P1) \ |
938 static I* New(Isolate* isolate, Zone* zone, HValue* context, P1 p1) { \ | 944 static I* New(Isolate* isolate, Zone* zone, HValue* context, P1 p1) { \ |
939 return new (zone) I(context, p1); \ | 945 return new (zone) I(context, p1); \ |
940 } | 946 } |
941 | 947 |
(...skipping 5591 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6533 | 6539 |
6534 static const int kDefaultKeyedHeaderOffsetSentinel = -1; | 6540 static const int kDefaultKeyedHeaderOffsetSentinel = -1; |
6535 | 6541 |
6536 enum LoadKeyedHoleMode { | 6542 enum LoadKeyedHoleMode { |
6537 NEVER_RETURN_HOLE, | 6543 NEVER_RETURN_HOLE, |
6538 ALLOW_RETURN_HOLE, | 6544 ALLOW_RETURN_HOLE, |
6539 CONVERT_HOLE_TO_UNDEFINED | 6545 CONVERT_HOLE_TO_UNDEFINED |
6540 }; | 6546 }; |
6541 | 6547 |
6542 | 6548 |
6543 class HLoadKeyed final : public HTemplateInstruction<3>, | 6549 class HLoadKeyed final : public HTemplateInstruction<4>, |
6544 public ArrayInstructionInterface { | 6550 public ArrayInstructionInterface { |
6545 public: | 6551 public: |
6546 DECLARE_INSTRUCTION_FACTORY_P4(HLoadKeyed, HValue*, HValue*, HValue*, | 6552 DECLARE_INSTRUCTION_FACTORY_P5(HLoadKeyed, HValue*, HValue*, HValue*, HValue*, |
6547 ElementsKind); | 6553 ElementsKind); |
6548 DECLARE_INSTRUCTION_FACTORY_P5(HLoadKeyed, HValue*, HValue*, HValue*, | 6554 DECLARE_INSTRUCTION_FACTORY_P6(HLoadKeyed, HValue*, HValue*, HValue*, HValue*, |
6549 ElementsKind, LoadKeyedHoleMode); | 6555 ElementsKind, LoadKeyedHoleMode); |
6550 DECLARE_INSTRUCTION_FACTORY_P6(HLoadKeyed, HValue*, HValue*, HValue*, | 6556 DECLARE_INSTRUCTION_FACTORY_P7(HLoadKeyed, HValue*, HValue*, HValue*, HValue*, |
6551 ElementsKind, LoadKeyedHoleMode, int); | 6557 ElementsKind, LoadKeyedHoleMode, int); |
6552 | 6558 |
6553 bool is_fixed_typed_array() const { | 6559 bool is_fixed_typed_array() const { |
6554 return IsFixedTypedArrayElementsKind(elements_kind()); | 6560 return IsFixedTypedArrayElementsKind(elements_kind()); |
6555 } | 6561 } |
6556 HValue* elements() const { return OperandAt(0); } | 6562 HValue* elements() const { return OperandAt(0); } |
6557 HValue* key() const { return OperandAt(1); } | 6563 HValue* key() const { return OperandAt(1); } |
6558 HValue* dependency() const { | 6564 HValue* dependency() const { |
6559 DCHECK(HasDependency()); | 6565 DCHECK(HasDependency()); |
6560 return OperandAt(2); | 6566 return OperandAt(2); |
6561 } | 6567 } |
6562 bool HasDependency() const { return OperandAt(0) != OperandAt(2); } | 6568 bool HasDependency() const { return OperandAt(0) != OperandAt(2); } |
| 6569 HValue* backing_store_owner() const { |
| 6570 DCHECK(HasBackingStoreOwner()); |
| 6571 return OperandAt(3); |
| 6572 } |
| 6573 bool HasBackingStoreOwner() const { return OperandAt(0) != OperandAt(3); } |
6563 uint32_t base_offset() const { return BaseOffsetField::decode(bit_field_); } | 6574 uint32_t base_offset() const { return BaseOffsetField::decode(bit_field_); } |
6564 bool TryIncreaseBaseOffset(uint32_t increase_by_value) override; | 6575 bool TryIncreaseBaseOffset(uint32_t increase_by_value) override; |
6565 HValue* GetKey() override { return key(); } | 6576 HValue* GetKey() override { return key(); } |
6566 void SetKey(HValue* key) override { SetOperandAt(1, key); } | 6577 void SetKey(HValue* key) override { SetOperandAt(1, key); } |
6567 bool IsDehoisted() const override { | 6578 bool IsDehoisted() const override { |
6568 return IsDehoistedField::decode(bit_field_); | 6579 return IsDehoistedField::decode(bit_field_); |
6569 } | 6580 } |
6570 void SetDehoisted(bool is_dehoisted) override { | 6581 void SetDehoisted(bool is_dehoisted) override { |
6571 bit_field_ = IsDehoistedField::update(bit_field_, is_dehoisted); | 6582 bit_field_ = IsDehoistedField::update(bit_field_, is_dehoisted); |
6572 } | 6583 } |
(...skipping 10 matching lines...) Expand all Loading... |
6583 // kind_fixed_typed_array: external[int32] (none) | 6594 // kind_fixed_typed_array: external[int32] (none) |
6584 // kind_external: external[int32] (none) | 6595 // kind_external: external[int32] (none) |
6585 if (index == 0) { | 6596 if (index == 0) { |
6586 return is_fixed_typed_array() ? Representation::External() | 6597 return is_fixed_typed_array() ? Representation::External() |
6587 : Representation::Tagged(); | 6598 : Representation::Tagged(); |
6588 } | 6599 } |
6589 if (index == 1) { | 6600 if (index == 1) { |
6590 return ArrayInstructionInterface::KeyedAccessIndexRequirement( | 6601 return ArrayInstructionInterface::KeyedAccessIndexRequirement( |
6591 OperandAt(1)->representation()); | 6602 OperandAt(1)->representation()); |
6592 } | 6603 } |
6593 return Representation::None(); | 6604 if (index == 2) { |
| 6605 return Representation::None(); |
| 6606 } |
| 6607 DCHECK_EQ(3, index); |
| 6608 return HasBackingStoreOwner() ? Representation::Tagged() |
| 6609 : Representation::None(); |
6594 } | 6610 } |
6595 | 6611 |
6596 Representation observed_input_representation(int index) override { | 6612 Representation observed_input_representation(int index) override { |
6597 return RequiredInputRepresentation(index); | 6613 return RequiredInputRepresentation(index); |
6598 } | 6614 } |
6599 | 6615 |
6600 std::ostream& PrintDataTo(std::ostream& os) const override; // NOLINT | 6616 std::ostream& PrintDataTo(std::ostream& os) const override; // NOLINT |
6601 | 6617 |
6602 bool UsesMustHandleHole() const; | 6618 bool UsesMustHandleHole() const; |
6603 bool AllUsesCanTreatHoleAsNaN() const; | 6619 bool AllUsesCanTreatHoleAsNaN() const; |
6604 bool RequiresHoleCheck() const; | 6620 bool RequiresHoleCheck() const; |
6605 | 6621 |
6606 Range* InferRange(Zone* zone) override; | 6622 Range* InferRange(Zone* zone) override; |
6607 | 6623 |
6608 DECLARE_CONCRETE_INSTRUCTION(LoadKeyed) | 6624 DECLARE_CONCRETE_INSTRUCTION(LoadKeyed) |
6609 | 6625 |
6610 protected: | 6626 protected: |
6611 bool DataEquals(HValue* other) override { | 6627 bool DataEquals(HValue* other) override { |
6612 if (!other->IsLoadKeyed()) return false; | 6628 if (!other->IsLoadKeyed()) return false; |
6613 HLoadKeyed* other_load = HLoadKeyed::cast(other); | 6629 HLoadKeyed* other_load = HLoadKeyed::cast(other); |
6614 | 6630 |
6615 if (base_offset() != other_load->base_offset()) return false; | 6631 if (base_offset() != other_load->base_offset()) return false; |
6616 return elements_kind() == other_load->elements_kind(); | 6632 return elements_kind() == other_load->elements_kind(); |
6617 } | 6633 } |
6618 | 6634 |
6619 private: | 6635 private: |
6620 HLoadKeyed(HValue* obj, HValue* key, HValue* dependency, | 6636 HLoadKeyed(HValue* obj, HValue* key, HValue* dependency, |
6621 ElementsKind elements_kind, | 6637 HValue* backing_store_owner, ElementsKind elements_kind, |
6622 LoadKeyedHoleMode mode = NEVER_RETURN_HOLE, | 6638 LoadKeyedHoleMode mode = NEVER_RETURN_HOLE, |
6623 int offset = kDefaultKeyedHeaderOffsetSentinel) | 6639 int offset = kDefaultKeyedHeaderOffsetSentinel) |
6624 : bit_field_(0) { | 6640 : bit_field_(0) { |
6625 offset = offset == kDefaultKeyedHeaderOffsetSentinel | 6641 offset = offset == kDefaultKeyedHeaderOffsetSentinel |
6626 ? GetDefaultHeaderSizeForElementsKind(elements_kind) | 6642 ? GetDefaultHeaderSizeForElementsKind(elements_kind) |
6627 : offset; | 6643 : offset; |
6628 bit_field_ = ElementsKindField::encode(elements_kind) | | 6644 bit_field_ = ElementsKindField::encode(elements_kind) | |
6629 HoleModeField::encode(mode) | | 6645 HoleModeField::encode(mode) | |
6630 BaseOffsetField::encode(offset); | 6646 BaseOffsetField::encode(offset); |
6631 | 6647 |
6632 SetOperandAt(0, obj); | 6648 SetOperandAt(0, obj); |
6633 SetOperandAt(1, key); | 6649 SetOperandAt(1, key); |
6634 SetOperandAt(2, dependency != NULL ? dependency : obj); | 6650 SetOperandAt(2, dependency != nullptr ? dependency : obj); |
| 6651 SetOperandAt(3, backing_store_owner != nullptr ? backing_store_owner : obj); |
| 6652 DCHECK_EQ(HasBackingStoreOwner(), is_fixed_typed_array()); |
6635 | 6653 |
6636 if (!is_fixed_typed_array()) { | 6654 if (!is_fixed_typed_array()) { |
6637 // I can detect the case between storing double (holey and fast) and | 6655 // I can detect the case between storing double (holey and fast) and |
6638 // smi/object by looking at elements_kind_. | 6656 // smi/object by looking at elements_kind_. |
6639 DCHECK(IsFastSmiOrObjectElementsKind(elements_kind) || | 6657 DCHECK(IsFastSmiOrObjectElementsKind(elements_kind) || |
6640 IsFastDoubleElementsKind(elements_kind)); | 6658 IsFastDoubleElementsKind(elements_kind)); |
6641 | 6659 |
6642 if (IsFastSmiOrObjectElementsKind(elements_kind)) { | 6660 if (IsFastSmiOrObjectElementsKind(elements_kind)) { |
6643 if (IsFastSmiElementsKind(elements_kind) && | 6661 if (IsFastSmiElementsKind(elements_kind) && |
6644 (!IsHoleyElementsKind(elements_kind) || | 6662 (!IsHoleyElementsKind(elements_kind) || |
(...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6977 } | 6995 } |
6978 | 6996 |
6979 Handle<Name> name_; | 6997 Handle<Name> name_; |
6980 Handle<TypeFeedbackVector> feedback_vector_; | 6998 Handle<TypeFeedbackVector> feedback_vector_; |
6981 FeedbackVectorSlot slot_; | 6999 FeedbackVectorSlot slot_; |
6982 LanguageMode language_mode_; | 7000 LanguageMode language_mode_; |
6983 InlineCacheState initialization_state_; | 7001 InlineCacheState initialization_state_; |
6984 }; | 7002 }; |
6985 | 7003 |
6986 | 7004 |
6987 class HStoreKeyed final : public HTemplateInstruction<3>, | 7005 class HStoreKeyed final : public HTemplateInstruction<4>, |
6988 public ArrayInstructionInterface { | 7006 public ArrayInstructionInterface { |
6989 public: | 7007 public: |
6990 DECLARE_INSTRUCTION_FACTORY_P4(HStoreKeyed, HValue*, HValue*, HValue*, | |
6991 ElementsKind); | |
6992 DECLARE_INSTRUCTION_FACTORY_P5(HStoreKeyed, HValue*, HValue*, HValue*, | 7008 DECLARE_INSTRUCTION_FACTORY_P5(HStoreKeyed, HValue*, HValue*, HValue*, |
6993 ElementsKind, StoreFieldOrKeyedMode); | 7009 HValue*, ElementsKind); |
6994 DECLARE_INSTRUCTION_FACTORY_P6(HStoreKeyed, HValue*, HValue*, HValue*, | 7010 DECLARE_INSTRUCTION_FACTORY_P6(HStoreKeyed, HValue*, HValue*, HValue*, |
6995 ElementsKind, StoreFieldOrKeyedMode, int); | 7011 HValue*, ElementsKind, StoreFieldOrKeyedMode); |
| 7012 DECLARE_INSTRUCTION_FACTORY_P7(HStoreKeyed, HValue*, HValue*, HValue*, |
| 7013 HValue*, ElementsKind, StoreFieldOrKeyedMode, |
| 7014 int); |
6996 | 7015 |
6997 Representation RequiredInputRepresentation(int index) override { | 7016 Representation RequiredInputRepresentation(int index) override { |
6998 // kind_fast: tagged[int32] = tagged | 7017 // kind_fast: tagged[int32] = tagged |
6999 // kind_double: tagged[int32] = double | 7018 // kind_double: tagged[int32] = double |
7000 // kind_smi : tagged[int32] = smi | 7019 // kind_smi : tagged[int32] = smi |
7001 // kind_fixed_typed_array: tagged[int32] = (double | int32) | 7020 // kind_fixed_typed_array: tagged[int32] = (double | int32) |
7002 // kind_external: external[int32] = (double | int32) | 7021 // kind_external: external[int32] = (double | int32) |
7003 if (index == 0) { | 7022 if (index == 0) { |
7004 return is_fixed_typed_array() ? Representation::External() | 7023 return is_fixed_typed_array() ? Representation::External() |
7005 : Representation::Tagged(); | 7024 : Representation::Tagged(); |
7006 } else if (index == 1) { | 7025 } else if (index == 1) { |
7007 return ArrayInstructionInterface::KeyedAccessIndexRequirement( | 7026 return ArrayInstructionInterface::KeyedAccessIndexRequirement( |
7008 OperandAt(1)->representation()); | 7027 OperandAt(1)->representation()); |
| 7028 } else if (index == 2) { |
| 7029 return RequiredValueRepresentation(elements_kind(), store_mode()); |
7009 } | 7030 } |
7010 | 7031 |
7011 DCHECK_EQ(index, 2); | 7032 DCHECK_EQ(3, index); |
7012 return RequiredValueRepresentation(elements_kind(), store_mode()); | 7033 return HasBackingStoreOwner() ? Representation::Tagged() |
| 7034 : Representation::None(); |
7013 } | 7035 } |
7014 | 7036 |
7015 static Representation RequiredValueRepresentation( | 7037 static Representation RequiredValueRepresentation( |
7016 ElementsKind kind, StoreFieldOrKeyedMode mode) { | 7038 ElementsKind kind, StoreFieldOrKeyedMode mode) { |
7017 if (IsDoubleOrFloatElementsKind(kind)) { | 7039 if (IsDoubleOrFloatElementsKind(kind)) { |
7018 return Representation::Double(); | 7040 return Representation::Double(); |
7019 } | 7041 } |
7020 | 7042 |
7021 if (kind == FAST_SMI_ELEMENTS && SmiValuesAre32Bits() && | 7043 if (kind == FAST_SMI_ELEMENTS && SmiValuesAre32Bits() && |
7022 mode == STORE_TO_INITIALIZED_ENTRY) { | 7044 mode == STORE_TO_INITIALIZED_ENTRY) { |
7023 return Representation::Integer32(); | 7045 return Representation::Integer32(); |
7024 } | 7046 } |
7025 | 7047 |
7026 if (IsFastSmiElementsKind(kind)) { | 7048 if (IsFastSmiElementsKind(kind)) { |
7027 return Representation::Smi(); | 7049 return Representation::Smi(); |
7028 } | 7050 } |
7029 | 7051 |
7030 if (IsFixedTypedArrayElementsKind(kind)) { | 7052 if (IsFixedTypedArrayElementsKind(kind)) { |
7031 return Representation::Integer32(); | 7053 return Representation::Integer32(); |
7032 } | 7054 } |
7033 return Representation::Tagged(); | 7055 return Representation::Tagged(); |
7034 } | 7056 } |
7035 | 7057 |
7036 bool is_fixed_typed_array() const { | 7058 bool is_fixed_typed_array() const { |
7037 return IsFixedTypedArrayElementsKind(elements_kind()); | 7059 return IsFixedTypedArrayElementsKind(elements_kind()); |
7038 } | 7060 } |
7039 | 7061 |
7040 Representation observed_input_representation(int index) override { | 7062 Representation observed_input_representation(int index) override { |
7041 if (index < 2) return RequiredInputRepresentation(index); | 7063 if (index != 2) return RequiredInputRepresentation(index); |
7042 if (IsUninitialized()) { | 7064 if (IsUninitialized()) { |
7043 return Representation::None(); | 7065 return Representation::None(); |
7044 } | 7066 } |
7045 Representation r = | 7067 Representation r = |
7046 RequiredValueRepresentation(elements_kind(), store_mode()); | 7068 RequiredValueRepresentation(elements_kind(), store_mode()); |
7047 // For fast object elements kinds, don't assume anything. | 7069 // For fast object elements kinds, don't assume anything. |
7048 if (r.IsTagged()) return Representation::None(); | 7070 if (r.IsTagged()) return Representation::None(); |
7049 return r; | 7071 return r; |
7050 } | 7072 } |
7051 | 7073 |
7052 HValue* elements() const { return OperandAt(0); } | 7074 HValue* elements() const { return OperandAt(0); } |
7053 HValue* key() const { return OperandAt(1); } | 7075 HValue* key() const { return OperandAt(1); } |
7054 HValue* value() const { return OperandAt(2); } | 7076 HValue* value() const { return OperandAt(2); } |
| 7077 HValue* backing_store_owner() const { |
| 7078 DCHECK(HasBackingStoreOwner()); |
| 7079 return OperandAt(3); |
| 7080 } |
| 7081 bool HasBackingStoreOwner() const { return OperandAt(0) != OperandAt(3); } |
7055 bool value_is_smi() const { return IsFastSmiElementsKind(elements_kind()); } | 7082 bool value_is_smi() const { return IsFastSmiElementsKind(elements_kind()); } |
7056 StoreFieldOrKeyedMode store_mode() const { | 7083 StoreFieldOrKeyedMode store_mode() const { |
7057 return StoreModeField::decode(bit_field_); | 7084 return StoreModeField::decode(bit_field_); |
7058 } | 7085 } |
7059 ElementsKind elements_kind() const override { | 7086 ElementsKind elements_kind() const override { |
7060 return ElementsKindField::decode(bit_field_); | 7087 return ElementsKindField::decode(bit_field_); |
7061 } | 7088 } |
7062 uint32_t base_offset() const { return base_offset_; } | 7089 uint32_t base_offset() const { return base_offset_; } |
7063 bool TryIncreaseBaseOffset(uint32_t increase_by_value) override; | 7090 bool TryIncreaseBaseOffset(uint32_t increase_by_value) override; |
7064 HValue* GetKey() override { return key(); } | 7091 HValue* GetKey() override { return key(); } |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7100 return PointersToHereCheckForObject(value(), dominator()); | 7127 return PointersToHereCheckForObject(value(), dominator()); |
7101 } | 7128 } |
7102 | 7129 |
7103 bool NeedsCanonicalization(); | 7130 bool NeedsCanonicalization(); |
7104 | 7131 |
7105 std::ostream& PrintDataTo(std::ostream& os) const override; // NOLINT | 7132 std::ostream& PrintDataTo(std::ostream& os) const override; // NOLINT |
7106 | 7133 |
7107 DECLARE_CONCRETE_INSTRUCTION(StoreKeyed) | 7134 DECLARE_CONCRETE_INSTRUCTION(StoreKeyed) |
7108 | 7135 |
7109 private: | 7136 private: |
7110 HStoreKeyed(HValue* obj, HValue* key, HValue* val, ElementsKind elements_kind, | 7137 HStoreKeyed(HValue* obj, HValue* key, HValue* val, |
| 7138 HValue* backing_store_owner, ElementsKind elements_kind, |
7111 StoreFieldOrKeyedMode store_mode = INITIALIZING_STORE, | 7139 StoreFieldOrKeyedMode store_mode = INITIALIZING_STORE, |
7112 int offset = kDefaultKeyedHeaderOffsetSentinel) | 7140 int offset = kDefaultKeyedHeaderOffsetSentinel) |
7113 : base_offset_(offset == kDefaultKeyedHeaderOffsetSentinel | 7141 : base_offset_(offset == kDefaultKeyedHeaderOffsetSentinel |
7114 ? GetDefaultHeaderSizeForElementsKind(elements_kind) | 7142 ? GetDefaultHeaderSizeForElementsKind(elements_kind) |
7115 : offset), | 7143 : offset), |
7116 bit_field_(IsDehoistedField::encode(false) | | 7144 bit_field_(IsDehoistedField::encode(false) | |
7117 IsUninitializedField::encode(false) | | 7145 IsUninitializedField::encode(false) | |
7118 StoreModeField::encode(store_mode) | | 7146 StoreModeField::encode(store_mode) | |
7119 ElementsKindField::encode(elements_kind)), | 7147 ElementsKindField::encode(elements_kind)), |
7120 dominator_(NULL) { | 7148 dominator_(NULL) { |
7121 SetOperandAt(0, obj); | 7149 SetOperandAt(0, obj); |
7122 SetOperandAt(1, key); | 7150 SetOperandAt(1, key); |
7123 SetOperandAt(2, val); | 7151 SetOperandAt(2, val); |
| 7152 SetOperandAt(3, backing_store_owner != nullptr ? backing_store_owner : obj); |
| 7153 DCHECK_EQ(HasBackingStoreOwner(), is_fixed_typed_array()); |
7124 | 7154 |
7125 if (IsFastObjectElementsKind(elements_kind)) { | 7155 if (IsFastObjectElementsKind(elements_kind)) { |
7126 SetFlag(kTrackSideEffectDominators); | 7156 SetFlag(kTrackSideEffectDominators); |
7127 SetDependsOnFlag(kNewSpacePromotion); | 7157 SetDependsOnFlag(kNewSpacePromotion); |
7128 } | 7158 } |
7129 if (IsFastDoubleElementsKind(elements_kind)) { | 7159 if (IsFastDoubleElementsKind(elements_kind)) { |
7130 SetChangesFlag(kDoubleArrayElements); | 7160 SetChangesFlag(kDoubleArrayElements); |
7131 } else if (IsFastSmiElementsKind(elements_kind)) { | 7161 } else if (IsFastSmiElementsKind(elements_kind)) { |
7132 SetChangesFlag(kArrayElements); | 7162 SetChangesFlag(kArrayElements); |
7133 } else if (is_fixed_typed_array()) { | 7163 } else if (is_fixed_typed_array()) { |
(...skipping 781 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7915 | 7945 |
7916 | 7946 |
7917 | 7947 |
7918 #undef DECLARE_INSTRUCTION | 7948 #undef DECLARE_INSTRUCTION |
7919 #undef DECLARE_CONCRETE_INSTRUCTION | 7949 #undef DECLARE_CONCRETE_INSTRUCTION |
7920 | 7950 |
7921 } // namespace internal | 7951 } // namespace internal |
7922 } // namespace v8 | 7952 } // namespace v8 |
7923 | 7953 |
7924 #endif // V8_CRANKSHAFT_HYDROGEN_INSTRUCTIONS_H_ | 7954 #endif // V8_CRANKSHAFT_HYDROGEN_INSTRUCTIONS_H_ |
OLD | NEW |