| 1016 | } |
| 1017 | |
| 1018 | void fx_Object_keys(txMachine* the) |
| 1019 | { |
| 1020 | txSlot* instance; |
| 1021 | txSlot* result; |
| 1022 | txSlot* array; |
| 1023 | txSlot* property; |
| 1024 | txSlot** address; |
| 1025 | txSlot* item; |
| 1026 | if ((mxArgc < 1) || (mxArgv(0)->kind == XS_UNDEFINED_KIND) || (mxArgv(0)->kind == XS_NULL_KIND)) |
| 1027 | mxTypeError("invalid object"); |
| 1028 | instance = fxToInstance(the, mxArgv(0)); |
| 1029 | mxPush(mxArrayPrototype); |
| 1030 | result = fxNewArrayInstance(the); |
| 1031 | mxPullSlot(mxResult); |
| 1032 | array = result->next; |
| 1033 | mxBehaviorOwnKeys(the, instance, XS_EACH_NAME_FLAG, array); |
| 1034 | mxPushUndefined(); |
| 1035 | property = the->stack; |
| 1036 | address = &array->next; |
| 1037 | while ((item = *address)) { |
| 1038 | if (mxBehaviorGetOwnProperty(the, instance, item->value.at.id, item->value.at.index, property) && !(property->flag & XS_DONT_ENUM_FLAG)) { |
| 1039 | array->value.array.length++; |
| 1040 | fxKeyAt(the, item->value.at.id, item->value.at.index, item); |
| 1041 | address = &(item->next); |
| 1042 | } |
| 1043 | else |
| 1044 | *address = item->next; |
| 1045 | } |
| 1046 | mxPop(); |
| 1047 | fxCacheArray(the, result); |
| 1048 | } |
| 1049 | |
| 1050 | void fx_Object_preventExtensions(txMachine* the) |
| 1051 | { |
nothing calls this directly
no test coverage detected