| 961 | } |
| 962 | |
| 963 | void fxArrayLengthGetter(txMachine* the) |
| 964 | { |
| 965 | txSlot* instance = fxToInstance(the, mxThis); |
| 966 | txSlot* array; |
| 967 | while (instance) { |
| 968 | if (instance->flag & XS_EXOTIC_FLAG) { |
| 969 | array = instance->next; |
| 970 | if ((array->kind == XS_ARRAY_KIND) && (array->ID == XS_ARRAY_BEHAVIOR)) |
| 971 | break; |
| 972 | } |
| 973 | instance = fxGetPrototype(the, instance); |
| 974 | } |
| 975 | if (!instance) |
| 976 | return; |
| 977 | #if mxAliasInstance |
| 978 | if (instance->ID) { |
| 979 | txSlot* alias = the->aliasArray[instance->ID]; |
| 980 | if (alias) |
| 981 | array = alias->next; |
| 982 | } |
| 983 | #endif |
| 984 | if (((txInteger)array->value.array.length) < 0) { |
| 985 | mxResult->value.number = array->value.array.length; |
| 986 | mxResult->kind = XS_NUMBER_KIND; |
| 987 | } |
| 988 | else { |
| 989 | mxResult->value.integer = (txInteger)array->value.array.length; |
| 990 | mxResult->kind = XS_INTEGER_KIND; |
| 991 | } |
| 992 | } |
| 993 | |
| 994 | void fxArrayLengthSetter(txMachine* the) |
| 995 | { |
nothing calls this directly
no test coverage detected