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_INSTRUCTION_SELECTOR_H_ | 5 #ifndef V8_COMPILER_INSTRUCTION_SELECTOR_H_ |
6 #define V8_COMPILER_INSTRUCTION_SELECTOR_H_ | 6 #define V8_COMPILER_INSTRUCTION_SELECTOR_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 | 9 |
10 #include "src/compiler/common-operator.h" | 10 #include "src/compiler/common-operator.h" |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
93 InstructionOperand c, InstructionOperand d, | 93 InstructionOperand c, InstructionOperand d, |
94 InstructionOperand e, InstructionOperand f, | 94 InstructionOperand e, InstructionOperand f, |
95 size_t temp_count = 0, InstructionOperand* temps = nullptr); | 95 size_t temp_count = 0, InstructionOperand* temps = nullptr); |
96 Instruction* Emit(InstructionCode opcode, size_t output_count, | 96 Instruction* Emit(InstructionCode opcode, size_t output_count, |
97 InstructionOperand* outputs, size_t input_count, | 97 InstructionOperand* outputs, size_t input_count, |
98 InstructionOperand* inputs, size_t temp_count = 0, | 98 InstructionOperand* inputs, size_t temp_count = 0, |
99 InstructionOperand* temps = nullptr); | 99 InstructionOperand* temps = nullptr); |
100 Instruction* Emit(Instruction* instr); | 100 Instruction* Emit(Instruction* instr); |
101 | 101 |
102 // =========================================================================== | 102 // =========================================================================== |
| 103 // ===== Architecture-independent deoptimization exit emission methods. ====== |
| 104 // =========================================================================== |
| 105 |
| 106 Instruction* EmitDeoptimize(InstructionCode opcode, InstructionOperand output, |
| 107 InstructionOperand a, InstructionOperand b, |
| 108 Node* frame_state); |
| 109 Instruction* EmitDeoptimize(InstructionCode opcode, size_t output_count, |
| 110 InstructionOperand* outputs, size_t input_count, |
| 111 InstructionOperand* inputs, Node* frame_state); |
| 112 |
| 113 // =========================================================================== |
103 // ============== Architecture-independent CPU feature methods. ============== | 114 // ============== Architecture-independent CPU feature methods. ============== |
104 // =========================================================================== | 115 // =========================================================================== |
105 | 116 |
106 class Features final { | 117 class Features final { |
107 public: | 118 public: |
108 Features() : bits_(0) {} | 119 Features() : bits_(0) {} |
109 explicit Features(unsigned bits) : bits_(bits) {} | 120 explicit Features(unsigned bits) : bits_(bits) {} |
110 explicit Features(CpuFeature f) : bits_(1u << f) {} | 121 explicit Features(CpuFeature f) : bits_(1u << f) {} |
111 Features(CpuFeature f1, CpuFeature f2) : bits_((1u << f1) | (1u << f2)) {} | 122 Features(CpuFeature f1, CpuFeature f2) : bits_((1u << f1) | (1u << f2)) {} |
112 | 123 |
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
236 | 247 |
237 void VisitFinishRegion(Node* node); | 248 void VisitFinishRegion(Node* node); |
238 void VisitGuard(Node* node); | 249 void VisitGuard(Node* node); |
239 void VisitParameter(Node* node); | 250 void VisitParameter(Node* node); |
240 void VisitIfException(Node* node); | 251 void VisitIfException(Node* node); |
241 void VisitOsrValue(Node* node); | 252 void VisitOsrValue(Node* node); |
242 void VisitPhi(Node* node); | 253 void VisitPhi(Node* node); |
243 void VisitProjection(Node* node); | 254 void VisitProjection(Node* node); |
244 void VisitConstant(Node* node); | 255 void VisitConstant(Node* node); |
245 void VisitCall(Node* call, BasicBlock* handler = nullptr); | 256 void VisitCall(Node* call, BasicBlock* handler = nullptr); |
| 257 void VisitDeoptimizeIf(Node* node); |
| 258 void VisitDeoptimizeUnless(Node* node); |
246 void VisitTailCall(Node* call); | 259 void VisitTailCall(Node* call); |
247 void VisitGoto(BasicBlock* target); | 260 void VisitGoto(BasicBlock* target); |
248 void VisitBranch(Node* input, BasicBlock* tbranch, BasicBlock* fbranch); | 261 void VisitBranch(Node* input, BasicBlock* tbranch, BasicBlock* fbranch); |
249 void VisitSwitch(Node* node, const SwitchInfo& sw); | 262 void VisitSwitch(Node* node, const SwitchInfo& sw); |
250 void VisitDeoptimize(DeoptimizeKind kind, Node* value); | 263 void VisitDeoptimize(DeoptimizeKind kind, Node* value); |
251 void VisitReturn(Node* ret); | 264 void VisitReturn(Node* ret); |
252 void VisitThrow(Node* value); | 265 void VisitThrow(Node* value); |
253 | 266 |
254 void EmitPrepareArguments(ZoneVector<compiler::PushParameter>* arguments, | 267 void EmitPrepareArguments(ZoneVector<compiler::PushParameter>* arguments, |
255 const CallDescriptor* descriptor, Node* node); | 268 const CallDescriptor* descriptor, Node* node); |
(...skipping 23 matching lines...) Expand all Loading... |
279 IntVector virtual_registers_; | 292 IntVector virtual_registers_; |
280 InstructionScheduler* scheduler_; | 293 InstructionScheduler* scheduler_; |
281 Frame* frame_; | 294 Frame* frame_; |
282 }; | 295 }; |
283 | 296 |
284 } // namespace compiler | 297 } // namespace compiler |
285 } // namespace internal | 298 } // namespace internal |
286 } // namespace v8 | 299 } // namespace v8 |
287 | 300 |
288 #endif // V8_COMPILER_INSTRUCTION_SELECTOR_H_ | 301 #endif // V8_COMPILER_INSTRUCTION_SELECTOR_H_ |
OLD | NEW |