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

Function fx_Reflect_defineProperty

xs/sources/xsProxy.c:879–893  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

877}
878
879void fx_Reflect_defineProperty(txMachine* the)
880{
881 txSlot* at;
882 txFlag mask;
883 if ((mxArgc < 1) || (mxArgv(0)->kind != XS_REFERENCE_KIND))
884 mxTypeError("target: not an object");
885 if (mxArgc < 2)
886 mxTypeError("no key");
887 at = fxAt(the, mxArgv(1));
888 if ((mxArgc < 3) || (mxArgv(2)->kind != XS_REFERENCE_KIND))
889 mxTypeError("invalid descriptor");
890 mask = fxDescriptorToSlot(the, mxArgv(2));
891 mxResult->value.boolean = mxBehaviorDefineOwnProperty(the, mxArgv(0)->value.reference, at->value.at.id, at->value.at.index, mxArgv(2), mask);
892 mxResult->kind = XS_BOOLEAN_KIND;
893}
894
895void fx_Reflect_deleteProperty(txMachine* the)
896{

Callers

nothing calls this directly

Calls 2

fxAtFunction · 0.85
fxDescriptorToSlotFunction · 0.85

Tested by

no test coverage detected