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 2075 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2086 set_representation(Representation::Tagged()); | 2086 set_representation(Representation::Tagged()); |
2087 SetFlag(kUseGVN); | 2087 SetFlag(kUseGVN); |
2088 } | 2088 } |
2089 | 2089 |
2090 bool IsDeletable() const override { return true; } | 2090 bool IsDeletable() const override { return true; } |
2091 }; | 2091 }; |
2092 | 2092 |
2093 | 2093 |
2094 class HDeclareGlobals final : public HUnaryOperation { | 2094 class HDeclareGlobals final : public HUnaryOperation { |
2095 public: | 2095 public: |
2096 DECLARE_INSTRUCTION_WITH_CONTEXT_FACTORY_P2(HDeclareGlobals, | 2096 DECLARE_INSTRUCTION_WITH_CONTEXT_FACTORY_P3(HDeclareGlobals, |
2097 Handle<FixedArray>, | 2097 Handle<FixedArray>, int, |
2098 int); | 2098 Handle<TypeFeedbackVector>); |
2099 | 2099 |
2100 HValue* context() { return OperandAt(0); } | 2100 HValue* context() { return OperandAt(0); } |
2101 Handle<FixedArray> pairs() const { return pairs_; } | 2101 Handle<FixedArray> pairs() const { return pairs_; } |
2102 int flags() const { return flags_; } | 2102 int flags() const { return flags_; } |
| 2103 Handle<TypeFeedbackVector> feedback_vector() const { |
| 2104 return feedback_vector_; |
| 2105 } |
2103 | 2106 |
2104 DECLARE_CONCRETE_INSTRUCTION(DeclareGlobals) | 2107 DECLARE_CONCRETE_INSTRUCTION(DeclareGlobals) |
2105 | 2108 |
2106 Representation RequiredInputRepresentation(int index) override { | 2109 Representation RequiredInputRepresentation(int index) override { |
2107 return Representation::Tagged(); | 2110 return Representation::Tagged(); |
2108 } | 2111 } |
2109 | 2112 |
2110 private: | 2113 private: |
2111 HDeclareGlobals(HValue* context, | 2114 HDeclareGlobals(HValue* context, Handle<FixedArray> pairs, int flags, |
2112 Handle<FixedArray> pairs, | 2115 Handle<TypeFeedbackVector> feedback_vector) |
2113 int flags) | |
2114 : HUnaryOperation(context), | 2116 : HUnaryOperation(context), |
2115 pairs_(pairs), | 2117 pairs_(pairs), |
| 2118 feedback_vector_(feedback_vector), |
2116 flags_(flags) { | 2119 flags_(flags) { |
2117 set_representation(Representation::Tagged()); | 2120 set_representation(Representation::Tagged()); |
2118 SetAllSideEffects(); | 2121 SetAllSideEffects(); |
2119 } | 2122 } |
2120 | 2123 |
2121 Handle<FixedArray> pairs_; | 2124 Handle<FixedArray> pairs_; |
| 2125 Handle<TypeFeedbackVector> feedback_vector_; |
2122 int flags_; | 2126 int flags_; |
2123 }; | 2127 }; |
2124 | 2128 |
2125 | 2129 |
2126 template <int V> | 2130 template <int V> |
2127 class HCall : public HTemplateInstruction<V> { | 2131 class HCall : public HTemplateInstruction<V> { |
2128 public: | 2132 public: |
2129 // The argument count includes the receiver. | 2133 // The argument count includes the receiver. |
2130 explicit HCall<V>(int argument_count) : argument_count_(argument_count) { | 2134 explicit HCall<V>(int argument_count) : argument_count_(argument_count) { |
2131 this->set_representation(Representation::Tagged()); | 2135 this->set_representation(Representation::Tagged()); |
(...skipping 5022 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7154 bool IsDeletable() const override { return true; } | 7158 bool IsDeletable() const override { return true; } |
7155 }; | 7159 }; |
7156 | 7160 |
7157 #undef DECLARE_INSTRUCTION | 7161 #undef DECLARE_INSTRUCTION |
7158 #undef DECLARE_CONCRETE_INSTRUCTION | 7162 #undef DECLARE_CONCRETE_INSTRUCTION |
7159 | 7163 |
7160 } // namespace internal | 7164 } // namespace internal |
7161 } // namespace v8 | 7165 } // namespace v8 |
7162 | 7166 |
7163 #endif // V8_CRANKSHAFT_HYDROGEN_INSTRUCTIONS_H_ | 7167 #endif // V8_CRANKSHAFT_HYDROGEN_INSTRUCTIONS_H_ |
OLD | NEW |