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

Function fxGetEntry

xs/sources/xsMapSet.c:1128–1143  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1126}
1127
1128txSlot* fxGetEntry(txMachine* the, txSlot* table, txSlot* slot)
1129{
1130 txU4 sum = fxSumEntry(the, slot);
1131 txU4 index = sum & (table->value.table.length - 1);
1132 txSlot* entry = table->value.table.address[index];
1133 txSlot* result;
1134 while (entry) {
1135 if (entry->value.entry.sum == sum) {
1136 result = entry->value.entry.slot;
1137 if (fxTestEntry(the, result, slot))
1138 return result;
1139 }
1140 entry = entry->next;
1141 }
1142 return C_NULL;
1143}
1144
1145void fxPurgeEntries(txMachine* the, txSlot* list)
1146{

Calls 2

fxSumEntryFunction · 0.85
fxTestEntryFunction · 0.85

Tested by

no test coverage detected