| 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 3839 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3850 } | 3850 } |
| 3851 | 3851 |
| 3852 class TailCallModeField : public BitField<TailCallMode, 0, 1> {}; | 3852 class TailCallModeField : public BitField<TailCallMode, 0, 1> {}; |
| 3853 uint32_t bit_field_; | 3853 uint32_t bit_field_; |
| 3854 }; | 3854 }; |
| 3855 | 3855 |
| 3856 | 3856 |
| 3857 class HArgumentsElements final : public HTemplateInstruction<0> { | 3857 class HArgumentsElements final : public HTemplateInstruction<0> { |
| 3858 public: | 3858 public: |
| 3859 DECLARE_INSTRUCTION_FACTORY_P1(HArgumentsElements, bool); | 3859 DECLARE_INSTRUCTION_FACTORY_P1(HArgumentsElements, bool); |
| 3860 DECLARE_INSTRUCTION_FACTORY_P2(HArgumentsElements, bool, bool); |
| 3860 | 3861 |
| 3861 DECLARE_CONCRETE_INSTRUCTION(ArgumentsElements) | 3862 DECLARE_CONCRETE_INSTRUCTION(ArgumentsElements) |
| 3862 | 3863 |
| 3863 Representation RequiredInputRepresentation(int index) override { | 3864 Representation RequiredInputRepresentation(int index) override { |
| 3864 return Representation::None(); | 3865 return Representation::None(); |
| 3865 } | 3866 } |
| 3866 | 3867 |
| 3867 bool from_inlined() const { return from_inlined_; } | 3868 bool from_inlined() const { return from_inlined_; } |
| 3869 bool arguments_adaptor() const { return arguments_adaptor_; } |
| 3868 | 3870 |
| 3869 protected: | 3871 protected: |
| 3870 bool DataEquals(HValue* other) override { return true; } | 3872 bool DataEquals(HValue* other) override { return true; } |
| 3871 | 3873 |
| 3872 private: | 3874 private: |
| 3873 explicit HArgumentsElements(bool from_inlined) : from_inlined_(from_inlined) { | 3875 explicit HArgumentsElements(bool from_inlined, bool arguments_adaptor = true) |
| 3876 : from_inlined_(from_inlined), arguments_adaptor_(arguments_adaptor) { |
| 3874 // The value produced by this instruction is a pointer into the stack | 3877 // The value produced by this instruction is a pointer into the stack |
| 3875 // that looks as if it was a smi because of alignment. | 3878 // that looks as if it was a smi because of alignment. |
| 3876 set_representation(Representation::Tagged()); | 3879 set_representation(Representation::Tagged()); |
| 3877 SetFlag(kUseGVN); | 3880 SetFlag(kUseGVN); |
| 3878 } | 3881 } |
| 3879 | 3882 |
| 3880 bool IsDeletable() const override { return true; } | 3883 bool IsDeletable() const override { return true; } |
| 3881 | 3884 |
| 3882 bool from_inlined_; | 3885 bool from_inlined_; |
| 3886 bool arguments_adaptor_; |
| 3883 }; | 3887 }; |
| 3884 | 3888 |
| 3885 | 3889 |
| 3886 class HArgumentsLength final : public HUnaryOperation { | 3890 class HArgumentsLength final : public HUnaryOperation { |
| 3887 public: | 3891 public: |
| 3888 DECLARE_INSTRUCTION_FACTORY_P1(HArgumentsLength, HValue*); | 3892 DECLARE_INSTRUCTION_FACTORY_P1(HArgumentsLength, HValue*); |
| 3889 | 3893 |
| 3890 Representation RequiredInputRepresentation(int index) override { | 3894 Representation RequiredInputRepresentation(int index) override { |
| 3891 return Representation::Tagged(); | 3895 return Representation::Tagged(); |
| 3892 } | 3896 } |
| (...skipping 1980 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5873 return HObjectAccess(kInobject, | 5877 return HObjectAccess(kInobject, |
| 5874 Map::kBitField2Offset, | 5878 Map::kBitField2Offset, |
| 5875 Representation::UInteger8()); | 5879 Representation::UInteger8()); |
| 5876 } | 5880 } |
| 5877 | 5881 |
| 5878 static HObjectAccess ForMapBitField3() { | 5882 static HObjectAccess ForMapBitField3() { |
| 5879 return HObjectAccess(kInobject, Map::kBitField3Offset, | 5883 return HObjectAccess(kInobject, Map::kBitField3Offset, |
| 5880 Representation::Integer32()); | 5884 Representation::Integer32()); |
| 5881 } | 5885 } |
| 5882 | 5886 |
| 5887 static HObjectAccess ForMapDescriptors() { |
| 5888 return HObjectAccess(kInobject, Map::kDescriptorsOffset); |
| 5889 } |
| 5890 |
| 5883 static HObjectAccess ForNameHashField() { | 5891 static HObjectAccess ForNameHashField() { |
| 5884 return HObjectAccess(kInobject, | 5892 return HObjectAccess(kInobject, |
| 5885 Name::kHashFieldOffset, | 5893 Name::kHashFieldOffset, |
| 5886 Representation::Integer32()); | 5894 Representation::Integer32()); |
| 5887 } | 5895 } |
| 5888 | 5896 |
| 5889 static HObjectAccess ForMapInstanceTypeAndBitField() { | 5897 static HObjectAccess ForMapInstanceTypeAndBitField() { |
| 5890 STATIC_ASSERT((Map::kInstanceTypeAndBitFieldOffset & 1) == 0); | 5898 STATIC_ASSERT((Map::kInstanceTypeAndBitFieldOffset & 1) == 0); |
| 5891 // Ensure the two fields share one 16-bit word, endian-independent. | 5899 // Ensure the two fields share one 16-bit word, endian-independent. |
| 5892 STATIC_ASSERT((Map::kBitFieldOffset & ~1) == | 5900 STATIC_ASSERT((Map::kBitFieldOffset & ~1) == |
| (...skipping 1698 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7591 | 7599 |
| 7592 | 7600 |
| 7593 | 7601 |
| 7594 #undef DECLARE_INSTRUCTION | 7602 #undef DECLARE_INSTRUCTION |
| 7595 #undef DECLARE_CONCRETE_INSTRUCTION | 7603 #undef DECLARE_CONCRETE_INSTRUCTION |
| 7596 | 7604 |
| 7597 } // namespace internal | 7605 } // namespace internal |
| 7598 } // namespace v8 | 7606 } // namespace v8 |
| 7599 | 7607 |
| 7600 #endif // V8_CRANKSHAFT_HYDROGEN_INSTRUCTIONS_H_ | 7608 #endif // V8_CRANKSHAFT_HYDROGEN_INSTRUCTIONS_H_ |
| OLD | NEW |