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

Function fxCreateArray

xs/sources/xsArray.c:501–516  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

499}
500
501txSlot* fxCreateArray(txMachine* the, txFlag flag, txIndex length)
502{
503 if (mxIsReference(mxThis) && mxIsConstructor(mxThis->value.reference))
504 mxPushSlot(mxThis);
505 else
506 mxPush(mxArrayConstructor);
507 mxNew();
508 if (flag) {
509 mxPushUnsigned(length);
510 mxRunCount(1);
511 }
512 else
513 mxRunCount(0);
514 mxPullSlot(mxResult);
515 return fxCheckArray(the, mxResult, XS_MUTABLE);
516}
517
518txSlot* fxCreateArraySpecies(txMachine* the, txNumber length)
519{

Callers 3

fx_Array_fromFunction · 0.85
fx_Array_fromAsyncFunction · 0.85
fx_Array_ofFunction · 0.85

Calls 1

fxCheckArrayFunction · 0.85

Tested by

no test coverage detected