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

Function fxProxySetter

xs/sources/xsProxy.c:196–213  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

194}
195
196void fxProxySetter(txMachine* the)
197{
198 txSlot* instance = fxToInstance(the, mxThis);
199 while (instance) {
200 if (mxIsProxy(instance))
201 break;
202 instance = fxGetPrototype(the, instance);
203 }
204 if (instance) {
205 txID id = the->scratch.value.at.id;
206 txIndex index = the->scratch.value.at.index;
207 txBoolean result = fxProxySetPropertyValue(the, instance, id, index, mxArgv(0), mxThis);
208 if (!result) {
209 if (the->frame->next->flag & XS_STRICT_FLAG)
210 mxTypeError("(proxy).set: not extensible or not writable");
211 }
212 }
213}
214
215void fxProxyCall(txMachine* the, txSlot* instance, txSlot* _this, txSlot* arguments)
216{

Callers

nothing calls this directly

Calls 3

fxToInstanceFunction · 0.85
fxGetPrototypeFunction · 0.85
fxProxySetPropertyValueFunction · 0.85

Tested by

no test coverage detected