| 4726 | } |
| 4727 | |
| 4728 | void fxYieldNodeCode(void* it, void* param) |
| 4729 | { |
| 4730 | txStatementNode* self = it; |
| 4731 | txBoolean async = (self->flags & mxAsyncFlag) ? 1 : 0; |
| 4732 | txCoder* coder = param; |
| 4733 | txTargetCode* target = fxCoderCreateTarget(coder); |
| 4734 | if (async) { |
| 4735 | fxNodeDispatchCode(self->expression, param); |
| 4736 | } |
| 4737 | else { |
| 4738 | fxCoderAddByte(param, 1, XS_CODE_OBJECT); |
| 4739 | fxCoderAddByte(param, 1, XS_CODE_DUB); |
| 4740 | fxNodeDispatchCode(self->expression, param); |
| 4741 | fxCoderAddSymbol(param, -2, XS_CODE_NEW_PROPERTY, coder->parser->valueSymbol); |
| 4742 | fxCoderAddInteger(param, 0, XS_CODE_INTEGER_1, 0); |
| 4743 | fxCoderAddByte(param, 1, XS_CODE_DUB); |
| 4744 | fxCoderAddByte(param, 1, XS_CODE_FALSE); |
| 4745 | fxCoderAddSymbol(param, -2, XS_CODE_NEW_PROPERTY, coder->parser->doneSymbol); |
| 4746 | fxCoderAddInteger(param, 0, XS_CODE_INTEGER_1, 0); |
| 4747 | } |
| 4748 | fxCoderAddByte(coder, 0, XS_CODE_YIELD); |
| 4749 | fxCoderAddBranch(coder, 1, XS_CODE_BRANCH_STATUS_1, target); |
| 4750 | if (async) { |
| 4751 | fxCoderAddByte(param, 0, XS_CODE_AWAIT); |
| 4752 | fxCoderAddByte(coder, 0, XS_CODE_THROW_STATUS); |
| 4753 | } |
| 4754 | fxCoderAddByte(param, -1, XS_CODE_SET_RESULT); |
| 4755 | fxCoderAdjustEnvironment(coder, coder->returnTarget); |
| 4756 | fxCoderAdjustScope(coder, coder->returnTarget); |
| 4757 | fxCoderAddBranch(coder, 0, XS_CODE_BRANCH_1, coder->returnTarget); |
| 4758 | fxCoderAdd(coder, 0, target); |
| 4759 | } |
| 4760 |
nothing calls this directly
no test coverage detected