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

Function fxRemapScript

xs/sources/xsRun.c:4934–4957  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4932}
4933
4934void fxRemapScript(txMachine* the, txScript* script)
4935{
4936 mxPushUndefined();
4937 if (script->symbolsBuffer) {
4938 txByte* p = script->symbolsBuffer;
4939 txID c, i;
4940 mxDecodeID(p, c);
4941 the->stack->value.callback.address = C_NULL;
4942 the->stack->value.IDs = (txID*)fxNewChunk(the, c * sizeof(txID));
4943 the->stack->kind = XS_IDS_KIND;
4944 the->stack->value.IDs[0] = XS_NO_ID;
4945 for (i = 1; i < c; i++) {
4946 txID id = fxNewNameC(the, (txString)p);
4947 the->stack->value.IDs[i] = id;
4948 p += mxStringLength((char*)p) + 1;
4949 }
4950 fxRemapIDs(the, script->codeBuffer, script->codeSize, the->stack->value.IDs);
4951 the->stack->value.IDs = C_NULL;
4952 }
4953 else {
4954 the->stack->value.IDs = C_NULL;
4955 the->stack->kind = XS_IDS_KIND;
4956 }
4957}
4958
4959txBoolean fxToNumericInteger(txMachine* the, txSlot* theSlot)
4960{

Callers 2

fxRunScriptFunction · 0.85
fxDebugEvalBufferFunction · 0.85

Calls 3

fxNewChunkFunction · 0.85
fxNewNameCFunction · 0.85
fxRemapIDsFunction · 0.85

Tested by

no test coverage detected