| 2036 | } |
| 2037 | |
| 2038 | txSlot* fxNewAsyncFromSyncIteratorInstance(txMachine* the) |
| 2039 | { |
| 2040 | txSlot* iterator = the->stack; |
| 2041 | txSlot* instance; |
| 2042 | txSlot* slot; |
| 2043 | txSlot* function; |
| 2044 | txSlot* home; |
| 2045 | mxPush(mxAsyncFromSyncIteratorPrototype); |
| 2046 | instance = fxNewObjectInstance(the); |
| 2047 | slot = fxLastProperty(the, instance); |
| 2048 | |
| 2049 | slot = fxNextSlotProperty(the, slot, iterator, mxID(_iterator), XS_INTERNAL_FLAG); |
| 2050 | |
| 2051 | mxPushSlot(iterator); |
| 2052 | mxGetID(mxID(_next)); |
| 2053 | slot = fxNextSlotProperty(the, slot, the->stack, XS_NO_ID, XS_INTERNAL_FLAG); |
| 2054 | mxPop(); |
| 2055 | |
| 2056 | function = fxNewHostFunction(the, fxAsyncFromSyncIteratorDone, 1, XS_NO_ID, mxAsyncFromSyncIteratorDoneProfileID); |
| 2057 | home = mxFunctionInstanceHome(function); |
| 2058 | home->value.home.object = instance; |
| 2059 | slot = fxNextSlotProperty(the, slot, the->stack, XS_NO_ID, XS_INTERNAL_FLAG); |
| 2060 | mxPop(); |
| 2061 | |
| 2062 | slot = fxNextBooleanProperty(the, slot, 0, XS_NO_ID, XS_INTERNAL_FLAG); |
| 2063 | |
| 2064 | function = fxNewHostFunction(the, fxAsyncFromSyncIteratorFailed, 1, XS_NO_ID, mxAsyncFromSyncIteratorDoneProfileID); |
| 2065 | home = mxFunctionInstanceHome(function); |
| 2066 | home->value.home.object = instance; |
| 2067 | slot = fxNextSlotProperty(the, slot, the->stack, XS_NO_ID, XS_INTERNAL_FLAG); |
| 2068 | mxPop(); |
| 2069 | |
| 2070 | mxPullSlot(iterator); |
| 2071 | return instance; |
| 2072 | } |
| 2073 | |
| 2074 | void fx_AsyncFromSyncIterator_prototype_aux(txMachine* the, txFlag status, txSlot* iterator, txBoolean* flag) |
| 2075 | { |
no test coverage detected