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

Function fxEchoTypedArray

xs/sources/xsDebug.c:2271–2299  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2269}
2270
2271void fxEchoTypedArray(txMachine* the, txSlot* theInstance, txInspectorNameList* theList)
2272{
2273 txSlot* dispatch = theInstance->next;
2274 txSlot* view = dispatch->next;
2275 txSlot* buffer = view->next;
2276 txU2 shift = dispatch->value.typedArray.dispatch->shift;
2277 txInteger size = fxGetDataViewSize(the, view, buffer) >> shift;
2278 fxEcho(the, "<property");
2279 fxEchoFlags(the, " ", dispatch->flag);
2280 fxEcho(the, " name=\"(");
2281 fxIDToString(the, dispatch->value.typedArray.dispatch->constructorID, the->nameBuffer, sizeof(the->nameBuffer));
2282 fxEchoString(the, the->nameBuffer);
2283 fxEcho(the, ")\"");
2284 fxEcho(the, " value=\"");
2285 fxEchoInteger(the, size);
2286 fxEcho(the, " items\"/>");
2287 if (size > 0) {
2288 txInteger index = 0;
2289 if (size > 1024)
2290 size = 1024;
2291 mxPushUndefined();
2292 while (index < size) {
2293 (*dispatch->value.typedArray.dispatch->getter)(the, buffer->value.reference->next, view->value.dataView.offset + (index << shift), the->stack, EndianNative);
2294 fxEchoProperty(the, the->stack, theList, "[", index, "]");
2295 index++;
2296 }
2297 mxPop();
2298 }
2299}
2300
2301txSlot* fxFindFrame(txMachine* the)
2302{

Callers 1

fxEchoInstanceFunction · 0.85

Calls 7

fxGetDataViewSizeFunction · 0.85
fxEchoFunction · 0.85
fxEchoFlagsFunction · 0.85
fxIDToStringFunction · 0.85
fxEchoStringFunction · 0.85
fxEchoIntegerFunction · 0.85
fxEchoPropertyFunction · 0.85

Tested by

no test coverage detected