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

Function fxDebugScriptCDATA

xs/sources/xsDebug.c:1197–1218  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1195}
1196
1197void fxDebugScriptCDATA(txMachine* the, char c)
1198{
1199#if MODDEF_XS_XSBUG_HOOKS
1200 if ((the->debugTag == XS_MODULE_TAG) || (the->debugTag == XS_SCRIPT_TAG)) {
1201 txString string = the->stack[2].value.string;
1202 txInteger size = the->stack[1].value.integer;
1203 txInteger offset = the->stack[0].value.integer;
1204 if (offset == size) {
1205 txString result = (txString)fxRenewChunk(the, string, size + 256);
1206 if (!result) {
1207 result = (txString)fxNewChunk(the, size + 256);
1208 string = the->stack[2].value.string;
1209 c_memcpy(result, string, size);
1210 }
1211 the->stack[2].value.string = string = result;
1212 the->stack[1].value.integer = size + 256;
1213 }
1214 string[offset++] = c;
1215 the->stack[0].value.integer = offset;
1216 }
1217#endif
1218}
1219
1220void fxDebugThrow(txMachine* the, txString path, txInteger line, txString message)
1221{

Callers 1

fxDebugParseFunction · 0.85

Calls 2

fxRenewChunkFunction · 0.85
fxNewChunkFunction · 0.85

Tested by

no test coverage detected