| OLD | NEW |
| 1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 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_CODE_ASSEMBLER_H_ | 5 #ifndef V8_COMPILER_CODE_ASSEMBLER_H_ |
| 6 #define V8_COMPILER_CODE_ASSEMBLER_H_ | 6 #define V8_COMPILER_CODE_ASSEMBLER_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <memory> | 9 #include <memory> |
| 10 | 10 |
| (...skipping 426 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 437 | 437 |
| 438 // Call to a C function with two arguments. | 438 // Call to a C function with two arguments. |
| 439 Node* CallCFunction2(MachineType return_type, MachineType arg0_type, | 439 Node* CallCFunction2(MachineType return_type, MachineType arg0_type, |
| 440 MachineType arg1_type, Node* function, Node* arg0, | 440 MachineType arg1_type, Node* function, Node* arg0, |
| 441 Node* arg1); | 441 Node* arg1); |
| 442 | 442 |
| 443 // Exception handling support. | 443 // Exception handling support. |
| 444 void GotoIfException(Node* node, Label* if_exception, | 444 void GotoIfException(Node* node, Label* if_exception, |
| 445 Variable* exception_var = nullptr); | 445 Variable* exception_var = nullptr); |
| 446 | 446 |
| 447 // Branching helpers. | |
| 448 void BranchIf(Node* condition, Label* if_true, Label* if_false); | |
| 449 | |
| 450 #define BRANCH_HELPER(name) \ | |
| 451 void BranchIf##name(Node* a, Node* b, Label* if_true, Label* if_false) { \ | |
| 452 BranchIf(name(a, b), if_true, if_false); \ | |
| 453 } | |
| 454 CODE_ASSEMBLER_COMPARE_BINARY_OP_LIST(BRANCH_HELPER) | |
| 455 #undef BRANCH_HELPER | |
| 456 | |
| 457 // Helpers which delegate to RawMachineAssembler. | 447 // Helpers which delegate to RawMachineAssembler. |
| 458 Factory* factory() const; | 448 Factory* factory() const; |
| 459 Isolate* isolate() const; | 449 Isolate* isolate() const; |
| 460 Zone* zone() const; | 450 Zone* zone() const; |
| 461 | 451 |
| 462 protected: | 452 protected: |
| 463 // Enables subclasses to perform operations before and after a call. | 453 // Enables subclasses to perform operations before and after a call. |
| 464 virtual void CallPrologue(); | 454 virtual void CallPrologue(); |
| 465 virtual void CallEpilogue(); | 455 virtual void CallEpilogue(); |
| 466 | 456 |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 512 // Map of variables to the list of value nodes that have been added from each | 502 // Map of variables to the list of value nodes that have been added from each |
| 513 // merge path in their order of merging. | 503 // merge path in their order of merging. |
| 514 std::map<Variable::Impl*, std::vector<Node*>> variable_merges_; | 504 std::map<Variable::Impl*, std::vector<Node*>> variable_merges_; |
| 515 }; | 505 }; |
| 516 | 506 |
| 517 } // namespace compiler | 507 } // namespace compiler |
| 518 } // namespace internal | 508 } // namespace internal |
| 519 } // namespace v8 | 509 } // namespace v8 |
| 520 | 510 |
| 521 #endif // V8_COMPILER_CODE_ASSEMBLER_H_ | 511 #endif // V8_COMPILER_CODE_ASSEMBLER_H_ |
| OLD | NEW |