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

Function fxTypedArrayHasProperty

xs/sources/xsDataView.c:1352–1363  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1350}
1351
1352txBoolean fxTypedArrayHasProperty(txMachine* the, txSlot* instance, txID id, txIndex index)
1353{
1354 if ((!id) || fxIsCanonicalIndex(the, id)) {
1355 txSlot* dispatch = instance->next;
1356 txSlot* view = dispatch->next;
1357 txSlot* buffer = view->next;
1358 txU2 shift = dispatch->value.typedArray.dispatch->shift;
1359 txIndex length = fxGetDataViewSize(the, view, buffer) >> shift;
1360 return ((!id) && (index < length)) ? 1 : 0;
1361 }
1362 return fxOrdinaryHasProperty(the, instance, id, index);
1363}
1364
1365void fxTypedArrayOwnKeys(txMachine* the, txSlot* instance, txFlag flag, txSlot* keys)
1366{

Callers

nothing calls this directly

Calls 3

fxIsCanonicalIndexFunction · 0.85
fxGetDataViewSizeFunction · 0.85
fxOrdinaryHasPropertyFunction · 0.85

Tested by

no test coverage detected