(
builder: IRBuilder,
err_handler: BasicBlock,
return_entry: BasicBlock,
main_entry: BasicBlock,
try_body: GenFunc,
)
| 773 | |
| 774 | |
| 775 | def try_finally_try( |
| 776 | builder: IRBuilder, |
| 777 | err_handler: BasicBlock, |
| 778 | return_entry: BasicBlock, |
| 779 | main_entry: BasicBlock, |
| 780 | try_body: GenFunc, |
| 781 | ) -> Register | AssignmentTarget | None: |
| 782 | # Compile the try block with an error handler |
| 783 | control = TryFinallyNonlocalControl(return_entry) |
| 784 | builder.builder.push_error_handler(err_handler) |
| 785 | |
| 786 | builder.nonlocal_control.append(control) |
| 787 | builder.goto_and_activate(BasicBlock()) |
| 788 | try_body() |
| 789 | builder.goto(main_entry) |
| 790 | builder.nonlocal_control.pop() |
| 791 | builder.builder.pop_error_handler() |
| 792 | |
| 793 | return control.ret_reg |
| 794 | |
| 795 | |
| 796 | def try_finally_entry_blocks( |
no test coverage detected
searching dependent graphs…