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

Function fxTypedArraySetter

xs/sources/xsDataView.c:1218–1237  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1216}
1217
1218void fxTypedArraySetter(txMachine* the)
1219{
1220 txSlot* instance = fxToInstance(the, mxThis);
1221 while (instance) {
1222 if (instance->flag & XS_EXOTIC_FLAG) {
1223 if (instance->next->ID == XS_TYPED_ARRAY_BEHAVIOR)
1224 break;
1225 }
1226 instance = fxGetPrototype(the, instance);
1227 }
1228 if (instance) {
1229 txSlot* value = mxArgv(0);
1230 txID id = the->scratch.value.at.id;
1231 txIndex index = the->scratch.value.at.index;
1232 if (!fxTypedArraySetPropertyValue(the, instance, id, index, value, mxThis)) {
1233 if (the->frame->next->flag & XS_STRICT_FLAG)
1234 mxTypeError("not extensible or not writable");
1235 }
1236 }
1237}
1238
1239txBoolean fxTypedArrayDefineOwnProperty(txMachine* the, txSlot* instance, txID id, txIndex index, txSlot* slot, txFlag mask)
1240{

Callers

nothing calls this directly

Calls 3

fxToInstanceFunction · 0.85
fxGetPrototypeFunction · 0.85

Tested by

no test coverage detected