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

Function fx_Array_from_aux

xs/sources/xsArray.c:1232–1253  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1230}
1231
1232void fx_Array_from_aux(txMachine* the, txSlot* function, txSlot* value, txIndex index)
1233{
1234 if (function) {
1235 /* THIS */
1236 if (mxArgc > 2)
1237 mxPushSlot(mxArgv(2));
1238 else
1239 mxPushUndefined();
1240 /* FUNCTION */
1241 mxPushSlot(function);
1242 mxCall();
1243 /* ARGUMENTS */
1244 mxPushSlot(value);
1245 mxPushInteger(index);
1246 mxRunCount(2);
1247 }
1248 else
1249 mxPushSlot(value);
1250 mxPushSlot(mxResult);
1251 mxDefineIndex(index, 0, XS_GET_ONLY);
1252 mxPop();
1253}
1254
1255void fx_Array_fromAsync(txMachine* the)
1256{

Callers 1

fx_Array_fromFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected