OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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/assembler.h" | 8 #include "src/assembler.h" |
9 #include "src/compiler/frame-states.h" | 9 #include "src/compiler/frame-states.h" |
10 #include "src/deoptimize-reason.h" | 10 #include "src/deoptimize-reason.h" |
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
164 | 164 |
165 std::ostream& operator<<(std::ostream&, RegionObservability); | 165 std::ostream& operator<<(std::ostream&, RegionObservability); |
166 | 166 |
167 RegionObservability RegionObservabilityOf(Operator const*) WARN_UNUSED_RESULT; | 167 RegionObservability RegionObservabilityOf(Operator const*) WARN_UNUSED_RESULT; |
168 | 168 |
169 std::ostream& operator<<(std::ostream& os, | 169 std::ostream& operator<<(std::ostream& os, |
170 const ZoneVector<MachineType>* types); | 170 const ZoneVector<MachineType>* types); |
171 | 171 |
172 Type* TypeGuardTypeOf(Operator const*) WARN_UNUSED_RESULT; | 172 Type* TypeGuardTypeOf(Operator const*) WARN_UNUSED_RESULT; |
173 | 173 |
174 int OsrValueIndexOf(Operator const*); | |
175 | |
176 enum class OsrGuardType { kUninitialized, kSignedSmall, kAny }; | |
177 size_t hash_value(OsrGuardType type); | |
178 std::ostream& operator<<(std::ostream&, OsrGuardType); | |
179 OsrGuardType OsrGuardTypeOf(Operator const*); | |
180 | |
181 // Interface for building common operators that can be used at any level of IR, | 174 // Interface for building common operators that can be used at any level of IR, |
182 // including JavaScript, mid-level, and low-level. | 175 // including JavaScript, mid-level, and low-level. |
183 class CommonOperatorBuilder final : public ZoneObject { | 176 class CommonOperatorBuilder final : public ZoneObject { |
184 public: | 177 public: |
185 explicit CommonOperatorBuilder(Zone* zone); | 178 explicit CommonOperatorBuilder(Zone* zone); |
186 | 179 |
187 const Operator* Dead(); | 180 const Operator* Dead(); |
188 const Operator* End(size_t control_input_count); | 181 const Operator* End(size_t control_input_count); |
189 const Operator* Branch(BranchHint = BranchHint::kNone); | 182 const Operator* Branch(BranchHint = BranchHint::kNone); |
190 const Operator* IfTrue(); | 183 const Operator* IfTrue(); |
(...skipping 11 matching lines...) Expand all Loading... |
202 const Operator* Terminate(); | 195 const Operator* Terminate(); |
203 | 196 |
204 const Operator* Start(int value_output_count); | 197 const Operator* Start(int value_output_count); |
205 const Operator* Loop(int control_input_count); | 198 const Operator* Loop(int control_input_count); |
206 const Operator* Merge(int control_input_count); | 199 const Operator* Merge(int control_input_count); |
207 const Operator* Parameter(int index, const char* debug_name = nullptr); | 200 const Operator* Parameter(int index, const char* debug_name = nullptr); |
208 | 201 |
209 const Operator* OsrNormalEntry(); | 202 const Operator* OsrNormalEntry(); |
210 const Operator* OsrLoopEntry(); | 203 const Operator* OsrLoopEntry(); |
211 const Operator* OsrValue(int index); | 204 const Operator* OsrValue(int index); |
212 const Operator* OsrGuard(OsrGuardType type); | |
213 | 205 |
214 const Operator* Int32Constant(int32_t); | 206 const Operator* Int32Constant(int32_t); |
215 const Operator* Int64Constant(int64_t); | 207 const Operator* Int64Constant(int64_t); |
216 const Operator* Float32Constant(volatile float); | 208 const Operator* Float32Constant(volatile float); |
217 const Operator* Float64Constant(volatile double); | 209 const Operator* Float64Constant(volatile double); |
218 const Operator* ExternalConstant(const ExternalReference&); | 210 const Operator* ExternalConstant(const ExternalReference&); |
219 const Operator* NumberConstant(volatile double); | 211 const Operator* NumberConstant(volatile double); |
220 const Operator* HeapConstant(const Handle<HeapObject>&); | 212 const Operator* HeapConstant(const Handle<HeapObject>&); |
221 | 213 |
222 const Operator* RelocatableInt32Constant(int32_t value, | 214 const Operator* RelocatableInt32Constant(int32_t value, |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
263 Zone* const zone_; | 255 Zone* const zone_; |
264 | 256 |
265 DISALLOW_COPY_AND_ASSIGN(CommonOperatorBuilder); | 257 DISALLOW_COPY_AND_ASSIGN(CommonOperatorBuilder); |
266 }; | 258 }; |
267 | 259 |
268 } // namespace compiler | 260 } // namespace compiler |
269 } // namespace internal | 261 } // namespace internal |
270 } // namespace v8 | 262 } // namespace v8 |
271 | 263 |
272 #endif // V8_COMPILER_COMMON_OPERATOR_H_ | 264 #endif // V8_COMPILER_COMMON_OPERATOR_H_ |
OLD | NEW |