MCPcopy Create free account
hub / github.com/Moddable-OpenSource/moddable / fxCoderFinalizeTargets

Function fxCoderFinalizeTargets

xs/sources/xsCode.c:1253–1273  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1251}
1252
1253txTargetCode* fxCoderFinalizeTargets(txCoder* self, txTargetCode* alias, txInteger selector, txInteger* address, txTargetCode* finallyTarget)
1254{
1255 txTargetCode* result = NULL;
1256 txInteger selection = *address;
1257 if (alias) {
1258 result = alias->original;
1259 while (alias) {
1260 if (alias->used) {
1261 fxCoderAdd(self, 0, alias);
1262 fxCoderAddInteger(self, 1, XS_CODE_INTEGER_1, selection);
1263 fxCoderAddIndex(self, -1, XS_CODE_PULL_LOCAL_1, selector);
1264 fxCoderAddBranch(self, 0, XS_CODE_BRANCH_1, finallyTarget);
1265 alias->original->used = 1;
1266 }
1267 alias = alias->nextTarget;
1268 selection++;
1269 }
1270 }
1271 *address = selection;
1272 return result;
1273}
1274
1275void fxCoderJumpTargets(txCoder* self, txTargetCode* target, txInteger selector, txInteger* address)
1276{

Callers 4

fxScopeCodeUsedFunction · 0.85
fxForInForOfNodeCodeFunction · 0.85
fxTryNodeCodeFunction · 0.85

Calls 4

fxCoderAddFunction · 0.85
fxCoderAddIntegerFunction · 0.85
fxCoderAddIndexFunction · 0.85
fxCoderAddBranchFunction · 0.85

Tested by

no test coverage detected