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

Function fxEchoInstance

xs/sources/xsDebug.c:1523–1780  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1521}
1522
1523void fxEchoInstance(txMachine* the, txSlot* theInstance, txInspectorNameList* theList)
1524{
1525 txSlot* aParent;
1526 txSlot* aProperty;
1527 txSlot* aSlot;
1528 txInteger anIndex;
1529
1530#if mxAliasInstance
1531 if (theInstance->ID) {
1532 txSlot* aliasInstance = the->aliasArray[theInstance->ID];
1533 if (aliasInstance)
1534 theInstance = aliasInstance;
1535 }
1536#endif
1537 aParent = fxGetPrototype(the, theInstance);
1538 if (aParent)
1539 fxEchoPropertyInstance(the, theList, "(..)", -1, C_NULL, XS_NO_ID, theInstance->flag & XS_MARK_FLAG, aParent);
1540 aProperty = theInstance->next;
1541 if (aProperty && (aProperty->flag & XS_INTERNAL_FLAG) && (aProperty->ID == XS_ARRAY_BEHAVIOR)) {
1542 fxEchoProperty(the, aProperty, theList, "(array)", -1, C_NULL);
1543 }
1544 else if (aProperty && (aProperty->flag & XS_INTERNAL_FLAG)) {
1545 switch (aProperty->kind) {
1546 case XS_CALLBACK_KIND:
1547 case XS_CALLBACK_X_KIND:
1548 case XS_CODE_KIND:
1549 case XS_CODE_X_KIND:
1550 if (aProperty->value.code.closures)
1551 fxEchoPropertyInstance(the, theList, "(closures)", -1, C_NULL, XS_NO_ID, aProperty->flag & (XS_GET_ONLY | XS_INSPECTOR_FLAG | XS_MARK_FLAG), aProperty->value.code.closures);
1552 fxEchoProperty(the, aProperty, theList, "(function)", -1, C_NULL);
1553 aProperty = aProperty->next;
1554 if ((aProperty->kind == XS_HOME_KIND) && (aProperty->value.home.object))
1555 fxEchoPropertyInstance(the, theList, "(home)", -1, C_NULL, XS_NO_ID, aProperty->flag, aProperty->value.home.object);
1556 aProperty = aProperty->next;
1557 break;
1558 case XS_ARRAY_BUFFER_KIND:
1559 fxEchoArrayBuffer(the, theInstance, theList);
1560 aProperty = aProperty->next;
1561 fxEchoProperty(the, aProperty, theList, "(buffer)", -1, C_NULL);
1562 aProperty = aProperty->next;
1563 break;
1564 case XS_STRING_KIND:
1565 case XS_STRING_X_KIND:
1566 fxEchoProperty(the, aProperty, theList, "(string)", -1, C_NULL);
1567 aProperty = aProperty->next;
1568 break;
1569 case XS_BOOLEAN_KIND:
1570 fxEchoProperty(the, aProperty, theList, "(boolean)", -1, C_NULL);
1571 aProperty = aProperty->next;
1572 break;
1573 case XS_NUMBER_KIND:
1574 fxEchoProperty(the, aProperty, theList, "(number)", -1, C_NULL);
1575 aProperty = aProperty->next;
1576 break;
1577 case XS_BIGINT_KIND:
1578 case XS_BIGINT_X_KIND:
1579 fxEchoProperty(the, aProperty, theList, "(bigint)", -1, C_NULL);
1580 aProperty = aProperty->next;

Callers 3

fxEchoModuleFunction · 0.85
fxEchoPropertyInstanceFunction · 0.85
fxListModulesFunction · 0.85

Calls 14

fxGetPrototypeFunction · 0.85
fxEchoPropertyInstanceFunction · 0.85
fxEchoPropertyFunction · 0.85
fxEchoArrayBufferFunction · 0.85
fxEchoPropertyHostFunction · 0.85
fxEchoTypedArrayFunction · 0.85
fxGetIndexSizeFunction · 0.85
fxToInstanceInspectorFunction · 0.85
fxBufferFunctionNameFunction · 0.85
fxEchoFunction · 0.85
fxEchoFlagsFunction · 0.85
fxEchoStringFunction · 0.85

Tested by

no test coverage detected