| 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 4833 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4844 index_(index), | 4844 index_(index), |
| 4845 incoming_value_(NULL) { | 4845 incoming_value_(NULL) { |
| 4846 set_representation(Representation::Tagged()); | 4846 set_representation(Representation::Tagged()); |
| 4847 } | 4847 } |
| 4848 | 4848 |
| 4849 HEnvironment* environment_; | 4849 HEnvironment* environment_; |
| 4850 int index_; | 4850 int index_; |
| 4851 HPhi* incoming_value_; | 4851 HPhi* incoming_value_; |
| 4852 }; | 4852 }; |
| 4853 | 4853 |
| 4854 | 4854 class HLoadGlobalGeneric final : public HTemplateInstruction<1> { |
| 4855 class HLoadGlobalGeneric final : public HTemplateInstruction<2> { | |
| 4856 public: | 4855 public: |
| 4857 DECLARE_INSTRUCTION_WITH_CONTEXT_FACTORY_P5(HLoadGlobalGeneric, HValue*, | 4856 DECLARE_INSTRUCTION_WITH_CONTEXT_FACTORY_P4(HLoadGlobalGeneric, |
| 4858 Handle<String>, TypeofMode, | 4857 Handle<String>, TypeofMode, |
| 4859 Handle<TypeFeedbackVector>, | 4858 Handle<TypeFeedbackVector>, |
| 4860 FeedbackVectorSlot); | 4859 FeedbackVectorSlot); |
| 4861 | 4860 |
| 4862 HValue* context() { return OperandAt(0); } | 4861 HValue* context() { return OperandAt(0); } |
| 4863 HValue* global_object() { return OperandAt(1); } | |
| 4864 Handle<String> name() const { return name_; } | 4862 Handle<String> name() const { return name_; } |
| 4865 TypeofMode typeof_mode() const { return typeof_mode_; } | 4863 TypeofMode typeof_mode() const { return typeof_mode_; } |
| 4866 FeedbackVectorSlot slot() const { return slot_; } | 4864 FeedbackVectorSlot slot() const { return slot_; } |
| 4867 Handle<TypeFeedbackVector> feedback_vector() const { | 4865 Handle<TypeFeedbackVector> feedback_vector() const { |
| 4868 return feedback_vector_; | 4866 return feedback_vector_; |
| 4869 } | 4867 } |
| 4870 | 4868 |
| 4871 std::ostream& PrintDataTo(std::ostream& os) const override; // NOLINT | 4869 std::ostream& PrintDataTo(std::ostream& os) const override; // NOLINT |
| 4872 | 4870 |
| 4873 Representation RequiredInputRepresentation(int index) override { | 4871 Representation RequiredInputRepresentation(int index) override { |
| 4874 return Representation::Tagged(); | 4872 return Representation::Tagged(); |
| 4875 } | 4873 } |
| 4876 | 4874 |
| 4877 DECLARE_CONCRETE_INSTRUCTION(LoadGlobalGeneric) | 4875 DECLARE_CONCRETE_INSTRUCTION(LoadGlobalGeneric) |
| 4878 | 4876 |
| 4879 private: | 4877 private: |
| 4880 HLoadGlobalGeneric(HValue* context, HValue* global_object, | 4878 HLoadGlobalGeneric(HValue* context, Handle<String> name, |
| 4881 Handle<String> name, TypeofMode typeof_mode, | 4879 TypeofMode typeof_mode, Handle<TypeFeedbackVector> vector, |
| 4882 Handle<TypeFeedbackVector> vector, FeedbackVectorSlot slot) | 4880 FeedbackVectorSlot slot) |
| 4883 : name_(name), | 4881 : name_(name), |
| 4884 typeof_mode_(typeof_mode), | 4882 typeof_mode_(typeof_mode), |
| 4885 feedback_vector_(vector), | 4883 feedback_vector_(vector), |
| 4886 slot_(slot) { | 4884 slot_(slot) { |
| 4887 SetOperandAt(0, context); | 4885 SetOperandAt(0, context); |
| 4888 SetOperandAt(1, global_object); | |
| 4889 set_representation(Representation::Tagged()); | 4886 set_representation(Representation::Tagged()); |
| 4890 SetAllSideEffects(); | 4887 SetAllSideEffects(); |
| 4891 } | 4888 } |
| 4892 | 4889 |
| 4893 Handle<String> name_; | 4890 Handle<String> name_; |
| 4894 TypeofMode typeof_mode_; | 4891 TypeofMode typeof_mode_; |
| 4895 Handle<TypeFeedbackVector> feedback_vector_; | 4892 Handle<TypeFeedbackVector> feedback_vector_; |
| 4896 FeedbackVectorSlot slot_; | 4893 FeedbackVectorSlot slot_; |
| 4897 }; | 4894 }; |
| 4898 | 4895 |
| (...skipping 2257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7156 bool IsDeletable() const override { return true; } | 7153 bool IsDeletable() const override { return true; } |
| 7157 }; | 7154 }; |
| 7158 | 7155 |
| 7159 #undef DECLARE_INSTRUCTION | 7156 #undef DECLARE_INSTRUCTION |
| 7160 #undef DECLARE_CONCRETE_INSTRUCTION | 7157 #undef DECLARE_CONCRETE_INSTRUCTION |
| 7161 | 7158 |
| 7162 } // namespace internal | 7159 } // namespace internal |
| 7163 } // namespace v8 | 7160 } // namespace v8 |
| 7164 | 7161 |
| 7165 #endif // V8_CRANKSHAFT_HYDROGEN_INSTRUCTIONS_H_ | 7162 #endif // V8_CRANKSHAFT_HYDROGEN_INSTRUCTIONS_H_ |
| OLD | NEW |