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 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
176 int ParameterIndexOf(const Operator* const); | 176 int ParameterIndexOf(const Operator* const); |
177 const ParameterInfo& ParameterInfoOf(const Operator* const); | 177 const ParameterInfo& ParameterInfoOf(const Operator* const); |
178 | 178 |
179 | 179 |
180 // Interface for building common operators that can be used at any level of IR, | 180 // Interface for building common operators that can be used at any level of IR, |
181 // including JavaScript, mid-level, and low-level. | 181 // including JavaScript, mid-level, and low-level. |
182 class CommonOperatorBuilder final : public ZoneObject { | 182 class CommonOperatorBuilder final : public ZoneObject { |
183 public: | 183 public: |
184 explicit CommonOperatorBuilder(Zone* zone); | 184 explicit CommonOperatorBuilder(Zone* zone); |
185 | 185 |
186 // Special operator used only in Branches to mark them as always taken, but | |
187 // still unfoldable. This is required to properly connect non terminating | |
188 // loops to end (in both the sea of nodes and the CFG). | |
189 const Operator* Always(); | |
190 | |
191 const Operator* Dead(); | 186 const Operator* Dead(); |
192 const Operator* End(); | 187 const Operator* End(); |
193 const Operator* Branch(BranchHint = BranchHint::kNone); | 188 const Operator* Branch(BranchHint = BranchHint::kNone); |
194 const Operator* IfTrue(); | 189 const Operator* IfTrue(); |
195 const Operator* IfFalse(); | 190 const Operator* IfFalse(); |
196 const Operator* IfSuccess(); | 191 const Operator* IfSuccess(); |
197 const Operator* IfException(); | 192 const Operator* IfException(); |
198 const Operator* Switch(size_t control_output_count); | 193 const Operator* Switch(size_t control_output_count); |
199 const Operator* IfValue(int32_t value); | 194 const Operator* IfValue(int32_t value); |
200 const Operator* IfDefault(); | 195 const Operator* IfDefault(); |
201 const Operator* Throw(); | 196 const Operator* Throw(); |
202 const Operator* Deoptimize(); | 197 const Operator* Deoptimize(); |
203 const Operator* Return(); | 198 const Operator* Return(); |
| 199 const Operator* Terminate(); |
204 | 200 |
205 const Operator* Start(int num_formal_parameters); | 201 const Operator* Start(int num_formal_parameters); |
206 const Operator* Loop(int control_input_count); | 202 const Operator* Loop(int control_input_count); |
207 const Operator* Merge(int control_input_count); | 203 const Operator* Merge(int control_input_count); |
208 const Operator* Parameter(int index, const char* debug_name = nullptr); | 204 const Operator* Parameter(int index, const char* debug_name = nullptr); |
209 | 205 |
210 const Operator* OsrNormalEntry(); | 206 const Operator* OsrNormalEntry(); |
211 const Operator* OsrLoopEntry(); | 207 const Operator* OsrLoopEntry(); |
212 const Operator* OsrValue(int index); | 208 const Operator* OsrValue(int index); |
213 | 209 |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
246 Zone* const zone_; | 242 Zone* const zone_; |
247 | 243 |
248 DISALLOW_COPY_AND_ASSIGN(CommonOperatorBuilder); | 244 DISALLOW_COPY_AND_ASSIGN(CommonOperatorBuilder); |
249 }; | 245 }; |
250 | 246 |
251 } // namespace compiler | 247 } // namespace compiler |
252 } // namespace internal | 248 } // namespace internal |
253 } // namespace v8 | 249 } // namespace v8 |
254 | 250 |
255 #endif // V8_COMPILER_COMMON_OPERATOR_H_ | 251 #endif // V8_COMPILER_COMMON_OPERATOR_H_ |
OLD | NEW |