void fx_TypedArray_prototype_lastIndexOf(txMachine* the)
{
	mxTypedArrayDeclarations;
	fxInteger(the, mxResult, -1);
	if (length) {
		txIndex index = (txIndex)fxArgToLastIndex(the, 1, length, length);
		txSlot* argument;
		if (mxArgc > 0)
			mxPushSlot(mxArgv(0));
		else
			mxPushUndefined();
		argument = the->stack;
		while (index > 0) {
			index--;
			mxPushSlot(mxThis);
			if (fxHasIndex(the, index)) {
				mxPushSlot(mxThis);
				mxGetIndex(index);
				if (fxIsSameSlot(the, the->stack++, argument)) {
					mxResult->value.integer = index;
					break;
				}
			}
		}
		mxPop();
	}
}
void fx_TypedArray_prototype_lastIndexOf(txMachine* the)
{
	mxTypedArrayDeclarations;
	fxInteger(the, mxResult, -1);
	if (length) {
		txIndex index = (txIndex)fxArgToLastIndex(the, 1, length, length);
		txSlot* argument;
		if (mxArgc > 0)
			mxPushSlot(mxArgv(0));
		else
			mxPushUndefined();
		argument = the->stack;
		while (index > 0) {
			index--;
			mxPushSlot(mxThis);
			if (fxHasIndex(the, index)) {
				mxPushSlot(mxThis);
				mxGetIndex(index);
				if (fxIsSameSlot(the, the->stack++, argument)) {
					mxResult->value.integer = index;
					break;
				}
			}
		}
		mxPop();
	}
}