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

Function fxCanBeHeldWeakly

xs/sources/xsMapSet.c:1378–1394  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1376}
1377
1378txSlot* fxCanBeHeldWeakly(txMachine* the, txSlot* slot)
1379{
1380 if (slot->kind == XS_REFERENCE_KIND)
1381 slot = slot->value.reference;
1382#if mxKeysGarbageCollection
1383 else if (slot->kind == XS_SYMBOL_KIND) {
1384 slot = fxGetKey(the, slot->value.symbol);
1385 if (slot->kind == XS_REFERENCE_KIND)
1386 slot = slot->value.reference;
1387 else
1388 slot = C_NULL;
1389 }
1390#endif
1391 else
1392 slot = C_NULL;
1393 return slot;
1394}
1395
1396txSlot* fxCheckWeakMapInstance(txMachine* the, txSlot* slot, txBoolean mutable)
1397{

Callers 5

fxCheckWeakMapKeyFunction · 0.85
fxCheckWeakSetValueFunction · 0.85
fx_WeakRefFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected