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 1929 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1940 }; | 1940 }; |
1941 | 1941 |
1942 | 1942 |
1943 class HDeclareGlobals final : public HUnaryOperation { | 1943 class HDeclareGlobals final : public HUnaryOperation { |
1944 public: | 1944 public: |
1945 DECLARE_INSTRUCTION_WITH_CONTEXT_FACTORY_P3(HDeclareGlobals, | 1945 DECLARE_INSTRUCTION_WITH_CONTEXT_FACTORY_P3(HDeclareGlobals, |
1946 Handle<FixedArray>, int, | 1946 Handle<FixedArray>, int, |
1947 Handle<TypeFeedbackVector>); | 1947 Handle<TypeFeedbackVector>); |
1948 | 1948 |
1949 HValue* context() { return OperandAt(0); } | 1949 HValue* context() { return OperandAt(0); } |
1950 Handle<FixedArray> pairs() const { return pairs_; } | 1950 Handle<FixedArray> declarations() const { return declarations_; } |
1951 int flags() const { return flags_; } | 1951 int flags() const { return flags_; } |
1952 Handle<TypeFeedbackVector> feedback_vector() const { | 1952 Handle<TypeFeedbackVector> feedback_vector() const { |
1953 return feedback_vector_; | 1953 return feedback_vector_; |
1954 } | 1954 } |
1955 | 1955 |
1956 DECLARE_CONCRETE_INSTRUCTION(DeclareGlobals) | 1956 DECLARE_CONCRETE_INSTRUCTION(DeclareGlobals) |
1957 | 1957 |
1958 Representation RequiredInputRepresentation(int index) override { | 1958 Representation RequiredInputRepresentation(int index) override { |
1959 return Representation::Tagged(); | 1959 return Representation::Tagged(); |
1960 } | 1960 } |
1961 | 1961 |
1962 private: | 1962 private: |
1963 HDeclareGlobals(HValue* context, Handle<FixedArray> pairs, int flags, | 1963 HDeclareGlobals(HValue* context, Handle<FixedArray> declarations, int flags, |
1964 Handle<TypeFeedbackVector> feedback_vector) | 1964 Handle<TypeFeedbackVector> feedback_vector) |
1965 : HUnaryOperation(context), | 1965 : HUnaryOperation(context), |
1966 pairs_(pairs), | 1966 declarations_(declarations), |
1967 feedback_vector_(feedback_vector), | 1967 feedback_vector_(feedback_vector), |
1968 flags_(flags) { | 1968 flags_(flags) { |
1969 set_representation(Representation::Tagged()); | 1969 set_representation(Representation::Tagged()); |
1970 SetAllSideEffects(); | 1970 SetAllSideEffects(); |
1971 } | 1971 } |
1972 | 1972 |
1973 Handle<FixedArray> pairs_; | 1973 Handle<FixedArray> declarations_; |
1974 Handle<TypeFeedbackVector> feedback_vector_; | 1974 Handle<TypeFeedbackVector> feedback_vector_; |
1975 int flags_; | 1975 int flags_; |
1976 }; | 1976 }; |
1977 | 1977 |
1978 | 1978 |
1979 template <int V> | 1979 template <int V> |
1980 class HCall : public HTemplateInstruction<V> { | 1980 class HCall : public HTemplateInstruction<V> { |
1981 public: | 1981 public: |
1982 // The argument count includes the receiver. | 1982 // The argument count includes the receiver. |
1983 explicit HCall<V>(int argument_count) : argument_count_(argument_count) { | 1983 explicit HCall<V>(int argument_count) : argument_count_(argument_count) { |
(...skipping 4775 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6759 bool IsDeletable() const override { return true; } | 6759 bool IsDeletable() const override { return true; } |
6760 }; | 6760 }; |
6761 | 6761 |
6762 #undef DECLARE_INSTRUCTION | 6762 #undef DECLARE_INSTRUCTION |
6763 #undef DECLARE_CONCRETE_INSTRUCTION | 6763 #undef DECLARE_CONCRETE_INSTRUCTION |
6764 | 6764 |
6765 } // namespace internal | 6765 } // namespace internal |
6766 } // namespace v8 | 6766 } // namespace v8 |
6767 | 6767 |
6768 #endif // V8_CRANKSHAFT_HYDROGEN_INSTRUCTIONS_H_ | 6768 #endif // V8_CRANKSHAFT_HYDROGEN_INSTRUCTIONS_H_ |
OLD | NEW |