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

Function fxNewWeakMapInstance

xs/sources/xsMapSet.c:1421–1439  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1419}
1420
1421txSlot* fxNewWeakMapInstance(txMachine* the)
1422{
1423 txSlot* map;
1424 txSlot* list;
1425 map = fxNewSlot(the);
1426 map->kind = XS_INSTANCE_KIND;
1427 map->value.instance.garbage = C_NULL;
1428 map->value.instance.prototype = the->stack->value.reference;
1429 the->stack->kind = XS_REFERENCE_KIND;
1430 the->stack->value.reference = map;
1431 /* LIST */
1432 list = map->next = fxNewSlot(the);
1433 list->flag = XS_INTERNAL_FLAG;
1434 list->kind = XS_WEAK_MAP_KIND;
1435 list->value.weakList.first = C_NULL;
1436 list->value.weakList.link = the->firstWeakListLink;
1437 the->firstWeakListLink = list;
1438 return map;
1439}
1440
1441void fx_WeakMap(txMachine* the)
1442{

Callers 1

fx_WeakMapFunction · 0.85

Calls 1

fxNewSlotFunction · 0.85

Tested by

no test coverage detected