Skip to content

Commit

Permalink
XS: #479 #480
Browse files Browse the repository at this point in the history
  • Loading branch information
Patrick Soquet committed Oct 21, 2020
1 parent a8e1d81 commit 748fda9
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions xs/sources/xsDataView.c
Original file line number Diff line number Diff line change
Expand Up @@ -286,8 +286,11 @@ void fxBuildDataView(txMachine* the)
slot = fxBuildHostConstructor(the, mxCallback(fx_TypedArray), 3, mxID(dispatch->constructorID));
the->stackPrototypes[-1 - dispatch->constructorID] = *the->stack; //@@
slot->value.instance.prototype = constructor;
property = mxFunctionInstanceHome(slot);
slot = property->next;
property = fxNextTypeDispatchProperty(the, property, (txTypeDispatch*)dispatch, (txTypeAtomics*)atomics, XS_NO_ID, XS_INTERNAL_FLAG | XS_GET_ONLY);
property->next = slot;
slot = fxLastProperty(the, slot);
slot = fxNextTypeDispatchProperty(the, slot, (txTypeDispatch*)dispatch, (txTypeAtomics*)atomics, XS_NO_ID, XS_INTERNAL_FLAG | XS_GET_ONLY);
slot = fxNextIntegerProperty(the, slot, dispatch->size, mxID(_BYTES_PER_ELEMENT), XS_GET_ONLY);
the->stack++;
}
Expand Down Expand Up @@ -1085,8 +1088,9 @@ txSlot* fxConstructTypedArray(txMachine* the)
txSlot* instance;
if (mxIsUndefined(mxTarget))
mxTypeError("call: TypedArray");
dispatch = mxFunctionInstanceHome(mxFunction->value.reference);
dispatch = dispatch->next;
prototype = mxBehaviorGetProperty(the, mxFunction->value.reference, mxID(_prototype), XS_NO_ID, XS_ANY);
dispatch = prototype->next;
if (!dispatch || (dispatch->kind != XS_TYPED_ARRAY_KIND))
mxTypeError("new: TypedArray");
mxPushSlot(mxTarget);
Expand Down

0 comments on commit 748fda9

Please sign in to comment.