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

Function fx_Map_groupByAux

xs/sources/xsMapSet.c:319–333  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

317}
318
319static void fx_Map_groupByAux(txMachine* the)
320{
321 txSlot* instance = mxResult->value.reference;
322 txSlot* table = instance->next;
323 txSlot* list = table->next;
324 txSlot* key = the->stack;
325 txSlot* entry = fxGetEntry(the, table, key);
326 if (entry)
327 mxPushSlot(entry->next);
328 else {
329 mxPush(mxArrayPrototype);
330 fxNewArrayInstance(the);
331 fxSetEntry(the, table, list, key, the->stack, 0);
332 }
333}
334
335void fx_Map_groupBy(txMachine* the)
336{

Callers

nothing calls this directly

Calls 3

fxGetEntryFunction · 0.85
fxNewArrayInstanceFunction · 0.85
fxSetEntryFunction · 0.85

Tested by

no test coverage detected