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

Function fxTypedArrayGetPropertyValue

xs/sources/xsDataView.c:1334–1350  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1332}
1333
1334txBoolean fxTypedArrayGetPropertyValue(txMachine* the, txSlot* instance, txID id, txIndex index, txSlot* receiver, txSlot* value)
1335{
1336 if ((!id) || fxIsCanonicalIndex(the, id)) {
1337 txSlot* dispatch = instance->next;
1338 txSlot* view = dispatch->next;
1339 txSlot* buffer = view->next;
1340 txU2 shift = dispatch->value.typedArray.dispatch->shift;
1341 txIndex length = fxGetDataViewSize(the, view, buffer) >> shift;
1342 if ((!id) && (index < length)) {
1343 (*dispatch->value.typedArray.dispatch->getter)(the, buffer->value.reference->next, view->value.dataView.offset + (index << shift), value, EndianNative);
1344 return 1;
1345 }
1346 value->kind = XS_UNDEFINED_KIND;
1347 return 0;
1348 }
1349 return fxOrdinaryGetPropertyValue(the, instance, id, index, receiver, value);
1350}
1351
1352txBoolean fxTypedArrayHasProperty(txMachine* the, txSlot* instance, txID id, txIndex index)
1353{

Callers

nothing calls this directly

Calls 3

fxIsCanonicalIndexFunction · 0.85
fxGetDataViewSizeFunction · 0.85

Tested by

no test coverage detected