| 3197 | } |
| 3198 | |
| 3199 | void fxForInForOfNodeCode(void* it, void* param) |
| 3200 | { |
| 3201 | txForInForOfNode* self = it; |
| 3202 | txCoder* coder = param; |
| 3203 | txBoolean async = (self->description->code == XS_CODE_FOR_AWAIT_OF) ? 1 : 0; |
| 3204 | txTargetCode* continueTarget; |
| 3205 | txInteger iterator; |
| 3206 | txInteger next; |
| 3207 | txInteger done; |
| 3208 | txInteger result; |
| 3209 | txInteger exception; |
| 3210 | txInteger selector; |
| 3211 | txInteger selection; |
| 3212 | txTargetCode* nextTarget; |
| 3213 | txTargetCode* returnTarget; |
| 3214 | txTargetCode* doneTarget; |
| 3215 | txTargetCode* catchTarget; |
| 3216 | txTargetCode* normalTarget; |
| 3217 | txTargetCode* uncatchTarget; |
| 3218 | txTargetCode* finallyTarget; |
| 3219 | txTargetCode* elseTarget; |
| 3220 | |
| 3221 | iterator = fxCoderUseTemporaryVariable(param); |
| 3222 | next = fxCoderUseTemporaryVariable(param); |
| 3223 | done = fxCoderUseTemporaryVariable(param); |
| 3224 | result = fxCoderUseTemporaryVariable(param); |
| 3225 | exception = fxCoderUseTemporaryVariable(coder); |
| 3226 | selector = fxCoderUseTemporaryVariable(coder); |
| 3227 | |
| 3228 | continueTarget = coder->firstContinueTarget; |
| 3229 | coder->firstContinueTarget = continueTarget->nextTarget; |
| 3230 | continueTarget->nextTarget = C_NULL; |
| 3231 | |
| 3232 | fxScopeCodingBlock(self->scope, param); |
| 3233 | fxScopeCodeDefineNodes(self->scope, param); |
| 3234 | |
| 3235 | if (coder->programFlag) { |
| 3236 | fxCoderAddByte(param, 1, XS_CODE_UNDEFINED); |
| 3237 | fxCoderAddByte(param, -1, XS_CODE_SET_RESULT); |
| 3238 | } |
| 3239 | fxNodeDispatchCode(self->expression, param); |
| 3240 | fxCoderAddByte(param, 0, self->description->code); |
| 3241 | fxCoderAddIndex(param, 0, XS_CODE_SET_LOCAL_1, iterator); |
| 3242 | fxCoderAddSymbol(param, 0, XS_CODE_GET_PROPERTY, coder->parser->nextSymbol); |
| 3243 | fxCoderAddIndex(param, 0, XS_CODE_PULL_LOCAL_1, next); |
| 3244 | |
| 3245 | coder->firstBreakTarget = fxCoderAliasTargets(param, coder->firstBreakTarget); |
| 3246 | coder->firstContinueTarget = fxCoderAliasTargets(param, coder->firstContinueTarget); |
| 3247 | coder->returnTarget = fxCoderAliasTargets(param, coder->returnTarget); |
| 3248 | catchTarget = fxCoderCreateTarget(param); |
| 3249 | normalTarget = fxCoderCreateTarget(param); |
| 3250 | fxCoderAddBranch(param, 0, XS_CODE_CATCH_1, catchTarget); |
| 3251 | |
| 3252 | // LOOP |
| 3253 | nextTarget = fxCoderCreateTarget(param); |
| 3254 | fxCoderAdd(param, 0, nextTarget); |
| 3255 | fxCoderAddByte(param, 1, XS_CODE_TRUE); |
| 3256 | fxCoderAddIndex(param, -1, XS_CODE_PULL_LOCAL_1, done); |
nothing calls this directly
no test coverage detected