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

Function fxListGlobal

xs/sources/xsDebug.c:2364–2389  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2362}
2363
2364void fxListGlobal(txMachine* the)
2365{
2366 txInspectorNameList aList = { C_NULL, C_NULL };
2367 txSlot* realm = fxFindRealm(the);
2368 txSlot* global = mxRealmGlobal(realm)->value.reference;
2369 txSlot* slot = fxGetPrototype(the, global);
2370 fxEcho(the, "<global>");
2371 if (slot != mxObjectPrototype.value.reference) {
2372 fxEchoPropertyInstance(the, &aList, "(..)", -1, C_NULL, XS_NO_ID, global->flag & XS_MARK_FLAG, slot);
2373 }
2374 slot = global->next;
2375 while (slot->flag & XS_INTERNAL_FLAG) {
2376 slot = slot->next;
2377 }
2378 while (slot) {
2379 fxEchoProperty(the, slot, &aList, C_NULL, -1, C_NULL);
2380 slot = slot->next;
2381 }
2382 global = mxRealmClosures(realm)->value.reference;
2383 slot = global->next;
2384 while (slot) {
2385 fxEchoProperty(the, slot, &aList, C_NULL, -1, C_NULL);
2386 slot = slot->next;
2387 }
2388 fxEcho(the, "</global>");
2389}
2390
2391void fxListLocal(txMachine* the)
2392{

Callers 3

fxDebugEvalFunction · 0.85
fxDebugLoopFunction · 0.85
fxDebugPushTagFunction · 0.85

Calls 5

fxFindRealmFunction · 0.85
fxGetPrototypeFunction · 0.85
fxEchoFunction · 0.85
fxEchoPropertyInstanceFunction · 0.85
fxEchoPropertyFunction · 0.85

Tested by

no test coverage detected