OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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_COMPILER_COMMON_OPERATOR_H_ | 5 #ifndef V8_COMPILER_COMMON_OPERATOR_H_ |
6 #define V8_COMPILER_COMMON_OPERATOR_H_ | 6 #define V8_COMPILER_COMMON_OPERATOR_H_ |
7 | 7 |
8 #include "src/compiler/machine-type.h" | 8 #include "src/compiler/machine-type.h" |
9 #include "src/unique.h" | 9 #include "src/unique.h" |
10 | 10 |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 } | 60 } |
61 size_t GetOffsetToPokeAt() const { | 61 size_t GetOffsetToPokeAt() const { |
62 DCHECK_EQ(kPokeAt, kind()); | 62 DCHECK_EQ(kPokeAt, kind()); |
63 return parameter_; | 63 return parameter_; |
64 } | 64 } |
65 | 65 |
66 bool IsOutputIgnored() const { | 66 bool IsOutputIgnored() const { |
67 return kind_ == kPushOutput && parameter_ == 0; | 67 return kind_ == kPushOutput && parameter_ == 0; |
68 } | 68 } |
69 | 69 |
| 70 size_t ConsumedOutputCount() const { |
| 71 return kind_ == kPushOutput ? GetPushCount() : 1; |
| 72 } |
| 73 |
70 bool operator==(OutputFrameStateCombine const& other) const { | 74 bool operator==(OutputFrameStateCombine const& other) const { |
71 return kind_ == other.kind_ && parameter_ == other.parameter_; | 75 return kind_ == other.kind_ && parameter_ == other.parameter_; |
72 } | 76 } |
73 bool operator!=(OutputFrameStateCombine const& other) const { | 77 bool operator!=(OutputFrameStateCombine const& other) const { |
74 return !(*this == other); | 78 return !(*this == other); |
75 } | 79 } |
76 | 80 |
77 friend size_t hash_value(OutputFrameStateCombine const&); | 81 friend size_t hash_value(OutputFrameStateCombine const&); |
78 friend std::ostream& operator<<(std::ostream&, | 82 friend std::ostream& operator<<(std::ostream&, |
79 OutputFrameStateCombine const&); | 83 OutputFrameStateCombine const&); |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
170 | 174 |
171 const CommonOperatorBuilderImpl& impl_; | 175 const CommonOperatorBuilderImpl& impl_; |
172 Zone* const zone_; | 176 Zone* const zone_; |
173 }; | 177 }; |
174 | 178 |
175 } // namespace compiler | 179 } // namespace compiler |
176 } // namespace internal | 180 } // namespace internal |
177 } // namespace v8 | 181 } // namespace v8 |
178 | 182 |
179 #endif // V8_COMPILER_COMMON_OPERATOR_H_ | 183 #endif // V8_COMPILER_COMMON_OPERATOR_H_ |
OLD | NEW |