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

Function fxNewWeakRefInstance

xs/sources/xsMapSet.c:1789–1804  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1787}
1788
1789txSlot* fxNewWeakRefInstance(txMachine* the)
1790{
1791 txSlot* slot;
1792 txSlot* instance = fxNewSlot(the);
1793 instance->kind = XS_INSTANCE_KIND;
1794 instance->value.instance.garbage = C_NULL;
1795 instance->value.instance.prototype = the->stack->value.reference;
1796 the->stack->kind = XS_REFERENCE_KIND;
1797 the->stack->value.reference = instance;
1798 slot = instance->next = fxNewSlot(the);
1799 slot->flag = XS_INTERNAL_FLAG;
1800 slot->kind = XS_WEAK_REF_KIND;
1801 slot->value.weakRef.target = C_NULL;
1802 slot->value.weakRef.link = C_NULL;
1803 return instance;
1804}
1805
1806void fx_WeakRef(txMachine* the)
1807{

Callers 1

fx_WeakRefFunction · 0.85

Calls 1

fxNewSlotFunction · 0.85

Tested by

no test coverage detected