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

Function fxClearEntries

xs/sources/xsMapSet.c:1079–1091  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1077}
1078
1079void fxClearEntries(txMachine* the, txSlot* table, txSlot* list, txBoolean paired)
1080{
1081 txSlot* slot = list->value.list.first;
1082 while (slot) {
1083 slot->flag = XS_DONT_ENUM_FLAG;
1084 slot->kind = XS_UNDEFINED_KIND;
1085 slot = slot->next;
1086 }
1087 c_memset(table->value.table.address, 0, table->value.table.length * sizeof(txSlot*));
1088 list->next->value.integer = 0;
1089 fxResizeEntries(the, table, list);
1090 fxPurgeEntries(the, list);
1091}
1092
1093txBoolean fxDeleteEntry(txMachine* the, txSlot* table, txSlot* list, txSlot* key, txBoolean paired, txBoolean fit)
1094{

Callers 2

fx_Map_prototype_clearFunction · 0.85
fx_Set_prototype_clearFunction · 0.85

Calls 2

fxResizeEntriesFunction · 0.85
fxPurgeEntriesFunction · 0.85

Tested by

no test coverage detected