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

Function fxRunArguments

xs/sources/xsRun.c:4493–4516  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4491#endif
4492
4493void fxRunArguments(txMachine* the, txIndex offset)
4494{
4495 txSlot* array;
4496 txIndex length = (txIndex)mxArgc;
4497 txIndex index;
4498 txSlot* address;
4499 mxPush(mxArrayPrototype);
4500 array = fxNewArrayInstance(the)->next;
4501 if (offset < length) {
4502 length -= offset;
4503 fxSetIndexSize(the, array, length, XS_CHUNK);
4504 index = 0;
4505 address = array->value.array.address;
4506 while (index < length) {
4507 txSlot* property = mxArgv(offset + index);
4508 *((txIndex*)address) = index;
4509 address->ID = XS_NO_ID;
4510 address->kind = property->kind;
4511 address->value = property->value;
4512 index++;
4513 address++;
4514 }
4515 }
4516}
4517
4518void fxRunBase(txMachine* the)
4519{

Callers 1

fxRunIDFunction · 0.85

Calls 2

fxNewArrayInstanceFunction · 0.85
fxSetIndexSizeFunction · 0.85

Tested by

no test coverage detected