| 419 | } |
| 420 | |
| 421 | void fx_Iterator_concat(txMachine* the) |
| 422 | { |
| 423 | txSlot* list = fxNewInstance(the); |
| 424 | txSlot* slot = list; |
| 425 | txSlot* property; |
| 426 | txInteger c = mxArgc, i; |
| 427 | for (i = 0; i < c; i++) { |
| 428 | txSlot* item = mxArgv(i); |
| 429 | if (!mxIsReference(item)) |
| 430 | mxTypeError("items[%d]: not an object", i); |
| 431 | mxPushSlot(item); |
| 432 | slot = fxNextSlotProperty(the, slot, the->stack, XS_NO_ID, XS_NO_FLAG); |
| 433 | mxGetID(mxID(_Symbol_iterator)); |
| 434 | if (!fxIsCallable(the, the->stack)) |
| 435 | mxTypeError("items[%d]: not iterable", i); |
| 436 | slot = fxNextSlotProperty(the, slot, the->stack, XS_NO_ID, XS_NO_FLAG); |
| 437 | mxPop(); |
| 438 | } |
| 439 | mxPushNull(); |
| 440 | property = fxLastProperty(the, fxNewIteratorHelperInstance(the, the->stack, mx_Iterator_concat)); |
| 441 | property = fxNextReferenceProperty(the, property, list, XS_NO_ID, XS_INTERNAL_FLAG); |
| 442 | mxPullSlot(mxResult); |
| 443 | mxPop(); |
| 444 | mxPop(); |
| 445 | } |
| 446 | |
| 447 | txBoolean fx_Iterator_concat_step(txMachine* the, txSlot* iterator, txSlot* next, txSlot* extra, txSlot* value, txFlag status) |
| 448 | { |
nothing calls this directly
no test coverage detected