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 391 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
402 Node* CallJS(Callable const& callable, Node* context, Node* function, | 402 Node* CallJS(Callable const& callable, Node* context, Node* function, |
403 Node* receiver, size_t result_size = 1); | 403 Node* receiver, size_t result_size = 1); |
404 Node* CallJS(Callable const& callable, Node* context, Node* function, | 404 Node* CallJS(Callable const& callable, Node* context, Node* function, |
405 Node* receiver, Node* arg1, size_t result_size = 1); | 405 Node* receiver, Node* arg1, size_t result_size = 1); |
406 Node* CallJS(Callable const& callable, Node* context, Node* function, | 406 Node* CallJS(Callable const& callable, Node* context, Node* function, |
407 Node* receiver, Node* arg1, Node* arg2, size_t result_size = 1); | 407 Node* receiver, Node* arg1, Node* arg2, size_t result_size = 1); |
408 | 408 |
409 // Branching helpers. | 409 // Branching helpers. |
410 void BranchIf(Node* condition, Label* if_true, Label* if_false); | 410 void BranchIf(Node* condition, Label* if_true, Label* if_false); |
411 | 411 |
| 412 void BranchIfSuccess(Node* node, Label* if_success, Label* if_exception, |
| 413 Variable* exception_var = nullptr); |
| 414 void GotoIfException(Node* node, Label* if_exception, |
| 415 Variable* exception_var = nullptr); |
| 416 |
412 #define BRANCH_HELPER(name) \ | 417 #define BRANCH_HELPER(name) \ |
413 void BranchIf##name(Node* a, Node* b, Label* if_true, Label* if_false) { \ | 418 void BranchIf##name(Node* a, Node* b, Label* if_true, Label* if_false) { \ |
414 BranchIf(name(a, b), if_true, if_false); \ | 419 BranchIf(name(a, b), if_true, if_false); \ |
415 } | 420 } |
416 CODE_ASSEMBLER_COMPARE_BINARY_OP_LIST(BRANCH_HELPER) | 421 CODE_ASSEMBLER_COMPARE_BINARY_OP_LIST(BRANCH_HELPER) |
417 #undef BRANCH_HELPER | 422 #undef BRANCH_HELPER |
418 | 423 |
419 // Helpers which delegate to RawMachineAssembler. | 424 // Helpers which delegate to RawMachineAssembler. |
420 Factory* factory() const; | 425 Factory* factory() const; |
421 Isolate* isolate() const; | 426 Isolate* isolate() const; |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
474 // Map of variables to the list of value nodes that have been added from each | 479 // Map of variables to the list of value nodes that have been added from each |
475 // merge path in their order of merging. | 480 // merge path in their order of merging. |
476 std::map<Variable::Impl*, std::vector<Node*>> variable_merges_; | 481 std::map<Variable::Impl*, std::vector<Node*>> variable_merges_; |
477 }; | 482 }; |
478 | 483 |
479 } // namespace compiler | 484 } // namespace compiler |
480 } // namespace internal | 485 } // namespace internal |
481 } // namespace v8 | 486 } // namespace v8 |
482 | 487 |
483 #endif // V8_COMPILER_CODE_ASSEMBLER_H_ | 488 #endif // V8_COMPILER_CODE_ASSEMBLER_H_ |
OLD | NEW |