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

Function fxSetPrivateProperty

xs/sources/xsProperty.c:613–647  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

611}
612
613txSlot* fxSetPrivateProperty(txMachine* the, txSlot* instance, txSlot* check, txID id)
614{
615 txSlot* result;
616 mxCheck(the, instance->kind == XS_INSTANCE_KIND);
617#if mxAliasInstance
618 if (instance->ID) {
619 txSlot* alias = the->aliasArray[instance->ID];
620 if (alias)
621 instance = alias;
622 else
623 instance = fxAliasInstance(the, instance);
624 }
625#endif
626 result = instance->next;
627 while (result) {
628 if (result->kind == XS_PRIVATE_KIND) {
629 if (result->value.private.check == check)
630 break;
631 }
632 result = result->next;
633 }
634 if (result) {
635 result = result->value.private.first;
636 while (result) {
637 if (result->ID == id)
638 break;
639 result = result->next;
640 }
641 }
642 if (result) {
643 if ((result->kind == XS_ACCESSOR_KIND) && (result->value.accessor.setter == C_NULL))
644 result = C_NULL;
645 }
646 return result;
647}
648
649void fxGroupBy(txMachine* the, txCallback aux)
650{

Callers

nothing calls this directly

Calls 1

fxAliasInstanceFunction · 0.85

Tested by

no test coverage detected