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

Function fxNewWeakSetInstance

xs/sources/xsMapSet.c:1587–1605  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1585}
1586
1587txSlot* fxNewWeakSetInstance(txMachine* the)
1588{
1589 txSlot* set;
1590 txSlot* list;
1591 set = fxNewSlot(the);
1592 set->kind = XS_INSTANCE_KIND;
1593 set->value.instance.garbage = C_NULL;
1594 set->value.instance.prototype = the->stack->value.reference;
1595 the->stack->kind = XS_REFERENCE_KIND;
1596 the->stack->value.reference = set;
1597 /* LIST */
1598 list = set->next = fxNewSlot(the);
1599 list->flag = XS_INTERNAL_FLAG;
1600 list->kind = XS_WEAK_SET_KIND;
1601 list->value.weakList.first = C_NULL;
1602 list->value.weakList.link = the->firstWeakListLink;
1603 the->firstWeakListLink = list;
1604 return set;
1605}
1606
1607void fx_WeakSet(txMachine* the)
1608{

Callers 1

fx_WeakSetFunction · 0.85

Calls 1

fxNewSlotFunction · 0.85

Tested by

no test coverage detected