| 605 | } |
| 606 | |
| 607 | void fx_Object_entries(txMachine* the) |
| 608 | { |
| 609 | txSlot* instance; |
| 610 | txSlot* result; |
| 611 | txSlot* array; |
| 612 | txSlot* property; |
| 613 | txSlot** address; |
| 614 | txSlot* item; |
| 615 | if ((mxArgc < 1) || (mxArgv(0)->kind == XS_UNDEFINED_KIND) || (mxArgv(0)->kind == XS_NULL_KIND)) |
| 616 | mxTypeError("invalid object"); |
| 617 | instance = fxToInstance(the, mxArgv(0)); |
| 618 | mxPush(mxArrayPrototype); |
| 619 | result = fxNewArrayInstance(the); |
| 620 | mxPullSlot(mxResult); |
| 621 | array = result->next; |
| 622 | mxBehaviorOwnKeys(the, instance, XS_EACH_NAME_FLAG, array); |
| 623 | mxPushUndefined(); |
| 624 | property = the->stack; |
| 625 | address = &array->next; |
| 626 | while ((item = *address)) { |
| 627 | if (mxBehaviorGetOwnProperty(the, instance, item->value.at.id, item->value.at.index, property) && !(property->flag & XS_DONT_ENUM_FLAG)) { |
| 628 | array->value.array.length++; |
| 629 | mxPushUndefined(); |
| 630 | fxKeyAt(the, item->value.at.id, item->value.at.index, the->stack); |
| 631 | mxPushReference(instance); |
| 632 | mxGetAll(item->value.at.id, item->value.at.index); |
| 633 | fxConstructArrayEntry(the, item); |
| 634 | address = &(item->next); |
| 635 | } |
| 636 | else |
| 637 | *address = item->next; |
| 638 | } |
| 639 | mxPop(); |
| 640 | fxCacheArray(the, result); |
| 641 | } |
| 642 | |
| 643 | void fx_Object_freeze(txMachine* the) |
| 644 | { |
nothing calls this directly
no test coverage detected