| 4565 | } |
| 4566 | |
| 4567 | void fxTryNodeCode(void* it, void* param) |
| 4568 | { |
| 4569 | txTryNode* self = it; |
| 4570 | txCoder* coder = param; |
| 4571 | txInteger exception; |
| 4572 | txInteger selector; |
| 4573 | txInteger result; |
| 4574 | txInteger selection; |
| 4575 | txTargetCode* catchTarget; |
| 4576 | txTargetCode* normalTarget; |
| 4577 | txTargetCode* finallyTarget; |
| 4578 | |
| 4579 | exception = fxCoderUseTemporaryVariable(coder); |
| 4580 | selector = fxCoderUseTemporaryVariable(coder); |
| 4581 | result = fxCoderUseTemporaryVariable(coder); |
| 4582 | |
| 4583 | coder->firstBreakTarget = fxCoderAliasTargets(param, coder->firstBreakTarget); |
| 4584 | coder->firstContinueTarget = fxCoderAliasTargets(param, coder->firstContinueTarget); |
| 4585 | coder->returnTarget = fxCoderAliasTargets(param, coder->returnTarget); |
| 4586 | catchTarget = fxCoderCreateTarget(param); |
| 4587 | normalTarget = fxCoderCreateTarget(param); |
| 4588 | finallyTarget = fxCoderCreateTarget(param); |
| 4589 | |
| 4590 | fxCoderAddInteger(param, 1, XS_CODE_INTEGER_1, 0); |
| 4591 | fxCoderAddIndex(param, 0, XS_CODE_SET_LOCAL_1, selector); |
| 4592 | fxCoderAddByte(param, -1, XS_CODE_POP); |
| 4593 | |
| 4594 | fxCoderAddBranch(param, 0, XS_CODE_CATCH_1, catchTarget); |
| 4595 | if (coder->programFlag) { |
| 4596 | fxCoderAddByte(param, 1, XS_CODE_UNDEFINED); |
| 4597 | fxCoderAddByte(param, -1, XS_CODE_SET_RESULT); |
| 4598 | } |
| 4599 | fxNodeDispatchCode(self->tryBlock, param); |
| 4600 | fxCoderAddBranch(param, 0, XS_CODE_BRANCH_1, normalTarget); |
| 4601 | if (self->catchBlock) { |
| 4602 | fxCoderAddByte(param, 0, XS_CODE_UNCATCH); |
| 4603 | fxCoderAdd(param, 0, catchTarget); |
| 4604 | catchTarget = fxCoderCreateTarget(param); |
| 4605 | fxCoderAddBranch(param, 0, XS_CODE_CATCH_1, catchTarget); |
| 4606 | if (coder->programFlag) { |
| 4607 | fxCoderAddByte(param, 1, XS_CODE_UNDEFINED); |
| 4608 | fxCoderAddByte(param, -1, XS_CODE_SET_RESULT); |
| 4609 | } |
| 4610 | fxNodeDispatchCode(self->catchBlock, param); |
| 4611 | fxCoderAddBranch(param, 0, XS_CODE_BRANCH_1, normalTarget); |
| 4612 | } |
| 4613 | |
| 4614 | selection = 1; |
| 4615 | coder->firstBreakTarget = fxCoderFinalizeTargets(param, coder->firstBreakTarget, selector, &selection, finallyTarget); |
| 4616 | coder->firstContinueTarget = fxCoderFinalizeTargets(param, coder->firstContinueTarget, selector, &selection, finallyTarget); |
| 4617 | coder->returnTarget = fxCoderFinalizeTargets(param, coder->returnTarget, selector, &selection, finallyTarget); |
| 4618 | fxCoderAdd(param, 0, normalTarget); |
| 4619 | fxCoderAddInteger(param, 1, XS_CODE_INTEGER_1, selection); |
| 4620 | fxCoderAddIndex(param, 0, XS_CODE_SET_LOCAL_1, selector); |
| 4621 | fxCoderAddByte(param, -1, XS_CODE_POP); |
| 4622 | fxCoderAdd(param, 0, finallyTarget); |
| 4623 | fxCoderAddByte(param, 0, XS_CODE_UNCATCH); |
| 4624 | fxCoderAdd(param, 0, catchTarget); |
nothing calls this directly
no test coverage detected