| 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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 ? kEnableScheduling | 65 ? kEnableScheduling |
| 66 : kDisableScheduling, | 66 : kDisableScheduling, |
| 67 EnableSerialization enable_serialization = kDisableSerialization); | 67 EnableSerialization enable_serialization = kDisableSerialization); |
| 68 | 68 |
| 69 // Visit code for the entire graph with the included schedule. | 69 // Visit code for the entire graph with the included schedule. |
| 70 bool SelectInstructions(); | 70 bool SelectInstructions(); |
| 71 | 71 |
| 72 void StartBlock(RpoNumber rpo); | 72 void StartBlock(RpoNumber rpo); |
| 73 void EndBlock(RpoNumber rpo); | 73 void EndBlock(RpoNumber rpo); |
| 74 void AddInstruction(Instruction* instr); | 74 void AddInstruction(Instruction* instr); |
| 75 void SetSourcePosition(const Instruction* instr, SourcePosition value); |
| 75 | 76 |
| 76 // =========================================================================== | 77 // =========================================================================== |
| 77 // ============= Architecture-independent code emission methods. ============= | 78 // ============= Architecture-independent code emission methods. ============= |
| 78 // =========================================================================== | 79 // =========================================================================== |
| 79 | 80 |
| 80 Instruction* Emit(InstructionCode opcode, InstructionOperand output, | 81 Instruction* Emit(InstructionCode opcode, InstructionOperand output, |
| 81 size_t temp_count = 0, InstructionOperand* temps = nullptr); | 82 size_t temp_count = 0, InstructionOperand* temps = nullptr); |
| 82 Instruction* Emit(InstructionCode opcode, InstructionOperand output, | 83 Instruction* Emit(InstructionCode opcode, InstructionOperand output, |
| 83 InstructionOperand a, size_t temp_count = 0, | 84 InstructionOperand a, size_t temp_count = 0, |
| 84 InstructionOperand* temps = nullptr); | 85 InstructionOperand* temps = nullptr); |
| (...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 327 void VisitFinishRegion(Node* node); | 328 void VisitFinishRegion(Node* node); |
| 328 void VisitParameter(Node* node); | 329 void VisitParameter(Node* node); |
| 329 void VisitIfException(Node* node); | 330 void VisitIfException(Node* node); |
| 330 void VisitOsrValue(Node* node); | 331 void VisitOsrValue(Node* node); |
| 331 void VisitPhi(Node* node); | 332 void VisitPhi(Node* node); |
| 332 void VisitProjection(Node* node); | 333 void VisitProjection(Node* node); |
| 333 void VisitConstant(Node* node); | 334 void VisitConstant(Node* node); |
| 334 void VisitCall(Node* call, BasicBlock* handler = nullptr); | 335 void VisitCall(Node* call, BasicBlock* handler = nullptr); |
| 335 void VisitDeoptimizeIf(Node* node); | 336 void VisitDeoptimizeIf(Node* node); |
| 336 void VisitDeoptimizeUnless(Node* node); | 337 void VisitDeoptimizeUnless(Node* node); |
| 338 void VisitTrapIf(Node* node); |
| 339 void VisitTrapUnless(Node* node); |
| 337 void VisitTailCall(Node* call); | 340 void VisitTailCall(Node* call); |
| 338 void VisitGoto(BasicBlock* target); | 341 void VisitGoto(BasicBlock* target); |
| 339 void VisitBranch(Node* input, BasicBlock* tbranch, BasicBlock* fbranch); | 342 void VisitBranch(Node* input, BasicBlock* tbranch, BasicBlock* fbranch); |
| 340 void VisitSwitch(Node* node, const SwitchInfo& sw); | 343 void VisitSwitch(Node* node, const SwitchInfo& sw); |
| 341 void VisitDeoptimize(DeoptimizeKind kind, DeoptimizeReason reason, | 344 void VisitDeoptimize(DeoptimizeKind kind, DeoptimizeReason reason, |
| 342 Node* value); | 345 Node* value); |
| 343 void VisitReturn(Node* ret); | 346 void VisitReturn(Node* ret); |
| 344 void VisitThrow(Node* value); | 347 void VisitThrow(Node* value); |
| 345 void VisitRetain(Node* node); | 348 void VisitRetain(Node* node); |
| 346 | 349 |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 386 EnableSerialization enable_serialization_; | 389 EnableSerialization enable_serialization_; |
| 387 Frame* frame_; | 390 Frame* frame_; |
| 388 bool instruction_selection_failed_; | 391 bool instruction_selection_failed_; |
| 389 }; | 392 }; |
| 390 | 393 |
| 391 } // namespace compiler | 394 } // namespace compiler |
| 392 } // namespace internal | 395 } // namespace internal |
| 393 } // namespace v8 | 396 } // namespace v8 |
| 394 | 397 |
| 395 #endif // V8_COMPILER_INSTRUCTION_SELECTOR_H_ | 398 #endif // V8_COMPILER_INSTRUCTION_SELECTOR_H_ |
| OLD | NEW |