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

Function fxRunProxy

xs/sources/xsRun.c:4730–4757  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4728}
4729
4730void fxRunProxy(txMachine* the, txSlot* instance)
4731{
4732 txSlot* array;
4733 txIndex length = (txIndex)mxArgc;
4734 txIndex index;
4735 txSlot* address;
4736 mxPush(mxArrayPrototype);
4737 array = fxNewArrayInstance(the)->next;
4738 fxSetIndexSize(the, array, length, XS_CHUNK);
4739 index = 0;
4740 address = array->value.array.address;
4741 while (index < length) {
4742 txSlot* property = mxArgv(index);
4743 *((txIndex*)address) = index;
4744 address->ID = XS_NO_ID;
4745 address->kind = property->kind;
4746 address->value = property->value;
4747 index++;
4748 address++;
4749 }
4750 if (!mxHasTarget)
4751 mxBehaviorCall(the, instance, mxThis, the->stack);
4752 else if (instance->flag & XS_CAN_CONSTRUCT_FLAG)
4753 mxBehaviorConstruct(the, instance, the->stack, mxTarget);
4754 else
4755 mxTypeError("new: proxy is not a constructor");
4756 mxPop();
4757}
4758
4759txBoolean fxIsSameReference(txMachine* the, txSlot* a, txSlot* b)
4760{

Callers 1

fxRunIDFunction · 0.85

Calls 2

fxNewArrayInstanceFunction · 0.85
fxSetIndexSizeFunction · 0.85

Tested by

no test coverage detected