| 797 | } |
| 798 | |
| 799 | void fx_Object_getOwnPropertyDescriptors(txMachine* the) |
| 800 | { |
| 801 | txSlot* instance; |
| 802 | txSlot* result; |
| 803 | txSlot* at; |
| 804 | txSlot* property; |
| 805 | if ((mxArgc < 1) || (mxArgv(0)->kind == XS_UNDEFINED_KIND) || (mxArgv(0)->kind == XS_NULL_KIND)) |
| 806 | mxTypeError("invalid object"); |
| 807 | instance = fxToInstance(the, mxArgv(0)); |
| 808 | mxPush(mxObjectPrototype); |
| 809 | result = fxNewObjectInstance(the); |
| 810 | mxPullSlot(mxResult); |
| 811 | at = fxNewInstance(the); |
| 812 | mxBehaviorOwnKeys(the, instance, XS_EACH_NAME_FLAG | XS_EACH_SYMBOL_FLAG, at); |
| 813 | mxPushUndefined(); |
| 814 | property = the->stack; |
| 815 | while ((at = at->next)) { |
| 816 | if (mxBehaviorGetOwnProperty(the, instance, at->value.at.id, at->value.at.index, property)) { |
| 817 | fxDescribeProperty(the, property, XS_GET_ONLY); |
| 818 | mxBehaviorDefineOwnProperty(the, result, at->value.at.id, at->value.at.index, the->stack, XS_GET_ONLY); |
| 819 | mxPop(); |
| 820 | } |
| 821 | } |
| 822 | mxPop(); |
| 823 | } |
| 824 | |
| 825 | void fx_Object_getOwnPropertyNames(txMachine* the) |
| 826 | { |
nothing calls this directly
no test coverage detected