txBoolean fxTypedArraySetPropertyValue(txMachine* the, txSlot* instance, txID id, txIndex index, txSlot* value, txSlot* receiver)
{
	if ((!id) || fxIsCanonicalIndex(the, id)) {
		txSlot* dispatch = instance->next;
		txSlot* view = dispatch->next;
		txSlot* buffer = view->next;
		txU2 shift = dispatch->value.typedArray.dispatch->shift;
		txSlot* arrayBuffer = buffer->value.reference->next;
		txIndex length;
		dispatch->value.typedArray.dispatch->coerce(the, value);
		if (arrayBuffer->flag & XS_DONT_SET_FLAG)
			mxTypeError("read-only buffer");
		length = fxGetDataViewSize(the, view, buffer) >> shift;
		if ((!id) && (index < length)) {
			(*dispatch->value.typedArray.dispatch->setter)(the, buffer->value.reference->next, view->value.dataView.offset + (index << shift), value, EndianNative);
		}
		return 1;
	}
	return fxOrdinarySetPropertyValue(the, instance, id, index, value, receiver);
}
txBoolean fxTypedArraySetPropertyValue(txMachine* the, txSlot* instance, txID id, txIndex index, txSlot* value, txSlot* receiver)
{
	if ((!id) || fxIsCanonicalIndex(the, id)) {
		txSlot* dispatch = instance->next;
		txSlot* view = dispatch->next;
		txSlot* buffer = view->next;
		txU2 shift = dispatch->value.typedArray.dispatch->shift;
		txSlot* arrayBuffer = buffer->value.reference->next;
		txIndex length;
		dispatch->value.typedArray.dispatch->coerce(the, value);
		if (arrayBuffer->flag & XS_DONT_SET_FLAG)
			mxTypeError("read-only buffer");
		length = fxGetDataViewSize(the, view, buffer) >> shift;
		if ((!id) && (index < length)) {
			(*dispatch->value.typedArray.dispatch->setter)(the, buffer->value.reference->next, view->value.dataView.offset + (index << shift), value, EndianNative);
		}
		return 1;
	}
	return fxOrdinarySetPropertyValue(the, instance, id, index, value, receiver);
}