| 482 | } |
| 483 | |
| 484 | void fx_Iterator_from(txMachine* the) |
| 485 | { |
| 486 | txSlot *iterator, *next, *property; |
| 487 | mxTemporary(iterator); |
| 488 | mxTemporary(next); |
| 489 | fxGetIteratorFlattenable(the, mxArgv(0), iterator, next, 1); |
| 490 | mxPush(mxIteratorConstructor); |
| 491 | mxDub(); |
| 492 | mxGetID(mxID(_Symbol_hasInstance)); |
| 493 | mxCall(); |
| 494 | mxPushSlot(iterator); |
| 495 | mxRunCount(1); |
| 496 | if (fxToBoolean(the, the->stack)) { |
| 497 | mxResult->kind = iterator->kind; |
| 498 | mxResult->value = iterator->value; |
| 499 | } |
| 500 | else { |
| 501 | mxPush(mxIteratorWrapperPrototype); |
| 502 | property = fxLastProperty(the, fxNewIteratorInstance(the, iterator, mxID(_Iterator))); |
| 503 | property = fxNextSlotProperty(the, property, next, XS_NO_ID, XS_INTERNAL_FLAG); |
| 504 | mxPullSlot(mxResult); |
| 505 | } |
| 506 | mxPop(); |
| 507 | mxPop(); |
| 508 | mxPop(); |
| 509 | } |
| 510 | |
| 511 | void fx_Iterator_prototype_constructor_get(txMachine* the) |
| 512 | { |
nothing calls this directly
no test coverage detected