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

Function fxReadMapSet

xs/sources/xsSnapshot.c:1451–1469  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1449}
1450
1451void fxReadMapSet(txMachine* the, txSlot* table, txBoolean paired)
1452{
1453 txSlot* list = table->next;
1454 txSlot* key = list->value.list.first;
1455 while (key) {
1456 txU4 sum = fxSumEntry(the, key);
1457 txU4 index = sum & (table->value.table.length - 1);
1458 txSlot* entry = fxNewSlot(the);
1459 txSlot** address = &(table->value.table.address[index]);
1460 entry->next = *address;
1461 entry->kind = XS_ENTRY_KIND;
1462 entry->value.entry.slot = key;
1463 entry->value.entry.sum = sum;
1464 *address = entry;
1465 key = key->next;
1466 if (paired)
1467 key = key->next;
1468 }
1469}
1470
1471txMachine* fxReadSnapshot(txSnapshot* snapshot, txString theName, void* theContext)
1472{

Callers 2

fxReadSnapshotFunction · 0.85
fxUseSnapshotFunction · 0.85

Calls 2

fxSumEntryFunction · 0.85
fxNewSlotFunction · 0.85

Tested by

no test coverage detected