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

Function fxRunForAwaitOf

xs/sources/xsRun.c:4646–4665  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4644}
4645
4646void fxRunForAwaitOf(txMachine* the)
4647{
4648 txSlot* slot = the->stack;
4649 fxBeginHost(the);
4650 mxPushSlot(slot);
4651 mxDub();
4652 mxGetID(mxID(_Symbol_asyncIterator));
4653 if (mxIsUndefined(the->stack) || mxIsNull(the->stack)) {
4654 mxPop();
4655 mxPop();
4656 fxGetIterator(the, slot, the->stack, C_NULL, 0);
4657 fxNewAsyncFromSyncIteratorInstance(the);
4658 }
4659 else {
4660 mxCall();
4661 mxRunCount(0);
4662 }
4663 mxPullSlot(slot);
4664 fxEndHost(the);
4665}
4666
4667void fxRunForOf(txMachine* the)
4668{

Callers

nothing calls this directly

Calls 4

fxBeginHostFunction · 0.85
fxGetIteratorFunction · 0.85
fxEndHostFunction · 0.85

Tested by

no test coverage detected