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

Function fxTraceCallBegin

xs/sources/xsRun.c:376–389  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

374int gxTraceCall = 0;
375static int depth = 0;
376static void fxTraceCallBegin(txMachine* the, txSlot* function)
377{
378 if (gxTraceCall) {
379 txSlot* slot = mxBehaviorGetProperty(the, function->value.reference, mxID(_name), 0, XS_ANY);
380 int i;
381 for (i = 0; i < depth; i++)
382 fprintf(stderr, "\t");
383 if (slot && ((slot->kind == XS_STRING_KIND) || (slot->kind == XS_STRING_X_KIND)))
384 fprintf(stderr, " [%s]\n", slot->value.string);
385 else
386 fprintf(stderr, " [?]\n");
387 depth++;
388 }
389}
390static void fxTraceCallEnd(txMachine* the, txSlot* function)
391{
392 if (gxTraceCall) {

Callers 2

fxRunIDFunction · 0.85
ifFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected