| 3139 | } |
| 3140 | |
| 3141 | void fxForNodeCode(void* it, void* param) |
| 3142 | { |
| 3143 | txForNode* self = it; |
| 3144 | txCoder* coder = param; |
| 3145 | txTargetCode* continueTarget; |
| 3146 | txTargetCode* nextTarget; |
| 3147 | txTargetCode* doneTarget; |
| 3148 | txUsingContext context; |
| 3149 | |
| 3150 | continueTarget = coder->firstContinueTarget; |
| 3151 | coder->firstContinueTarget = continueTarget->nextTarget; |
| 3152 | continueTarget->nextTarget = C_NULL; |
| 3153 | |
| 3154 | fxScopeCodingBlock(self->scope, param); |
| 3155 | fxScopeCodeDefineNodes(self->scope, param); |
| 3156 | if (self->scope->disposableNodeCount) |
| 3157 | fxScopeCodeUsing(self->scope, coder, &context); |
| 3158 | nextTarget = fxCoderCreateTarget(param); |
| 3159 | doneTarget = fxCoderCreateTarget(param); |
| 3160 | if (self->initialization) |
| 3161 | fxNodeDispatchCode(self->initialization, param); |
| 3162 | if (coder->programFlag) { |
| 3163 | fxCoderAddByte(param, 1, XS_CODE_UNDEFINED); |
| 3164 | fxCoderAddByte(param, -1, XS_CODE_SET_RESULT); |
| 3165 | } |
| 3166 | fxScopeCodeRefresh(self->scope, param); |
| 3167 | fxCoderAdd(param, 0, nextTarget); |
| 3168 | if (self->expression) { |
| 3169 | fxNodeDispatchCode(self->expression, param); |
| 3170 | fxCoderAddBranch(param, -1, XS_CODE_BRANCH_ELSE_1, doneTarget); |
| 3171 | } |
| 3172 | |
| 3173 | continueTarget->environmentLevel = coder->environmentLevel; |
| 3174 | continueTarget->scopeLevel = coder->scopeLevel; |
| 3175 | continueTarget->stackLevel = coder->stackLevel; |
| 3176 | continueTarget->nextTarget = coder->firstContinueTarget; |
| 3177 | coder->firstContinueTarget = continueTarget; |
| 3178 | fxNodeDispatchCode(self->statement, param); |
| 3179 | fxCoderAdd(param, 0, continueTarget); |
| 3180 | coder->firstContinueTarget = continueTarget->nextTarget; |
| 3181 | continueTarget->nextTarget = C_NULL; |
| 3182 | |
| 3183 | if (self->iteration) { |
| 3184 | fxScopeCodeRefresh(self->scope, param); |
| 3185 | self->iteration->flags |= mxExpressionNoValue; |
| 3186 | fxNodeDispatchCode(self->iteration, param); |
| 3187 | fxCoderAddByte(param, -1, XS_CODE_POP); |
| 3188 | } |
| 3189 | fxCoderAddBranch(param, 0, XS_CODE_BRANCH_1, nextTarget); |
| 3190 | fxCoderAdd(param, 0, doneTarget); |
| 3191 | if (self->scope->disposableNodeCount) |
| 3192 | fxScopeCodeUsed(self->scope, coder, &context); |
| 3193 | fxScopeCoded(self->scope, param); |
| 3194 | |
| 3195 | continueTarget->nextTarget = coder->firstContinueTarget; |
| 3196 | coder->firstContinueTarget = continueTarget; |
| 3197 | } |
| 3198 |
nothing calls this directly
no test coverage detected