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

Function fxKeepDuringJobs

xs/sources/xsMapSet.c:1763–1776  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1761}
1762
1763void fxKeepDuringJobs(txMachine* the, txSlot* target)
1764{
1765 txSlot* instance = mxDuringJobs.value.reference;
1766 txSlot** address = &(instance->next);
1767 txSlot* slot;
1768 while ((slot = *address)) {
1769 if (slot->value.reference == target)
1770 return;
1771 address = &(slot->next);
1772 }
1773 *address = slot = fxNewSlot(the);
1774 slot->value.reference = target;
1775 slot->kind = XS_REFERENCE_KIND;
1776}
1777
1778txSlot* fxCheckWeakRefInstance(txMachine* the, txSlot* slot)
1779{

Callers 2

fx_WeakRefFunction · 0.85

Calls 1

fxNewSlotFunction · 0.85

Tested by

no test coverage detected