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

Function fxGetCodeName

xs/tools/xslSlot.c:410–429  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

408}
409
410txString fxGetCodeName(txMachine* the, txByte* which)
411{
412 if (which == gxNoCode)
413 return "(txByte*)(gxNoCode)";
414 {
415 static char buffer[1024];
416 txLinker* linker = xsGetContext(the);
417 txLinkerScript* linkerScript = linker->firstScript;
418 while (linkerScript) {
419 txS1* from = linkerScript->codeBuffer;
420 txS1* to = from + linkerScript->codeSize;
421 if ((from <= which) && (which < to)) {
422 sprintf(buffer, "(txByte*)(&gxCode%d[%ld])", linkerScript->scriptIndex, (long)(which - from));
423 return buffer;
424 }
425 linkerScript = linkerScript->nextScript;
426 }
427 }
428 return "OOPS";
429}
430
431extern const txTypeDispatch gxTypeDispatches[];
432txInteger fxGetTypeDispatchIndex(txTypeDispatch* dispatch)

Callers 1

fxPrintSlotFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected