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 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 V(IsStringAndBranch) \ | 101 V(IsStringAndBranch) \ |
102 V(IsSmiAndBranch) \ | 102 V(IsSmiAndBranch) \ |
103 V(IsUndetectableAndBranch) \ | 103 V(IsUndetectableAndBranch) \ |
104 V(LeaveInlined) \ | 104 V(LeaveInlined) \ |
105 V(LoadContextSlot) \ | 105 V(LoadContextSlot) \ |
106 V(LoadFieldByIndex) \ | 106 V(LoadFieldByIndex) \ |
107 V(LoadFunctionPrototype) \ | 107 V(LoadFunctionPrototype) \ |
108 V(LoadKeyed) \ | 108 V(LoadKeyed) \ |
109 V(LoadKeyedGeneric) \ | 109 V(LoadKeyedGeneric) \ |
110 V(LoadNamedField) \ | 110 V(LoadNamedField) \ |
111 V(LoadNamedGeneric) \ | |
112 V(LoadRoot) \ | 111 V(LoadRoot) \ |
113 V(MathFloorOfDiv) \ | 112 V(MathFloorOfDiv) \ |
114 V(MathMinMax) \ | 113 V(MathMinMax) \ |
115 V(MaybeGrowElements) \ | 114 V(MaybeGrowElements) \ |
116 V(Mod) \ | 115 V(Mod) \ |
117 V(Mul) \ | 116 V(Mul) \ |
118 V(OsrEntry) \ | 117 V(OsrEntry) \ |
119 V(Parameter) \ | 118 V(Parameter) \ |
120 V(Power) \ | 119 V(Power) \ |
121 V(Prologue) \ | 120 V(Prologue) \ |
(...skipping 5679 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5801 access.SetGVNFlags(this, LOAD); | 5800 access.SetGVNFlags(this, LOAD); |
5802 } | 5801 } |
5803 | 5802 |
5804 bool IsDeletable() const override { return true; } | 5803 bool IsDeletable() const override { return true; } |
5805 | 5804 |
5806 HObjectAccess access_; | 5805 HObjectAccess access_; |
5807 const UniqueSet<Map>* maps_; | 5806 const UniqueSet<Map>* maps_; |
5808 }; | 5807 }; |
5809 | 5808 |
5810 | 5809 |
5811 class HLoadNamedGeneric final : public HTemplateInstruction<2> { | |
5812 public: | |
5813 DECLARE_INSTRUCTION_WITH_CONTEXT_FACTORY_P4(HLoadNamedGeneric, HValue*, | |
5814 Handle<Name>, | |
5815 Handle<TypeFeedbackVector>, | |
5816 FeedbackVectorSlot); | |
5817 | |
5818 HValue* context() const { return OperandAt(0); } | |
5819 HValue* object() const { return OperandAt(1); } | |
5820 Handle<Name> name() const { return name_; } | |
5821 | |
5822 FeedbackVectorSlot slot() const { return slot_; } | |
5823 Handle<TypeFeedbackVector> feedback_vector() const { | |
5824 return feedback_vector_; | |
5825 } | |
5826 | |
5827 Representation RequiredInputRepresentation(int index) override { | |
5828 return Representation::Tagged(); | |
5829 } | |
5830 | |
5831 std::ostream& PrintDataTo(std::ostream& os) const override; // NOLINT | |
5832 | |
5833 DECLARE_CONCRETE_INSTRUCTION(LoadNamedGeneric) | |
5834 | |
5835 private: | |
5836 HLoadNamedGeneric(HValue* context, HValue* object, Handle<Name> name, | |
5837 Handle<TypeFeedbackVector> vector, FeedbackVectorSlot slot) | |
5838 : name_(name), feedback_vector_(vector), slot_(slot) { | |
5839 SetOperandAt(0, context); | |
5840 SetOperandAt(1, object); | |
5841 set_representation(Representation::Tagged()); | |
5842 SetAllSideEffects(); | |
5843 } | |
5844 | |
5845 Handle<Name> name_; | |
5846 Handle<TypeFeedbackVector> feedback_vector_; | |
5847 FeedbackVectorSlot slot_; | |
5848 }; | |
5849 | |
5850 | |
5851 class HLoadFunctionPrototype final : public HUnaryOperation { | 5810 class HLoadFunctionPrototype final : public HUnaryOperation { |
5852 public: | 5811 public: |
5853 DECLARE_INSTRUCTION_FACTORY_P1(HLoadFunctionPrototype, HValue*); | 5812 DECLARE_INSTRUCTION_FACTORY_P1(HLoadFunctionPrototype, HValue*); |
5854 | 5813 |
5855 HValue* function() { return OperandAt(0); } | 5814 HValue* function() { return OperandAt(0); } |
5856 | 5815 |
5857 Representation RequiredInputRepresentation(int index) override { | 5816 Representation RequiredInputRepresentation(int index) override { |
5858 return Representation::Tagged(); | 5817 return Representation::Tagged(); |
5859 } | 5818 } |
5860 | 5819 |
(...skipping 1133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6994 bool IsDeletable() const override { return true; } | 6953 bool IsDeletable() const override { return true; } |
6995 }; | 6954 }; |
6996 | 6955 |
6997 #undef DECLARE_INSTRUCTION | 6956 #undef DECLARE_INSTRUCTION |
6998 #undef DECLARE_CONCRETE_INSTRUCTION | 6957 #undef DECLARE_CONCRETE_INSTRUCTION |
6999 | 6958 |
7000 } // namespace internal | 6959 } // namespace internal |
7001 } // namespace v8 | 6960 } // namespace v8 |
7002 | 6961 |
7003 #endif // V8_CRANKSHAFT_HYDROGEN_INSTRUCTIONS_H_ | 6962 #endif // V8_CRANKSHAFT_HYDROGEN_INSTRUCTIONS_H_ |
OLD | NEW |