| 1068 | } |
| 1069 | |
| 1070 | void fxDescribeProperty(txMachine* the, txSlot* property, txFlag mask) |
| 1071 | { |
| 1072 | txSlot* slot; |
| 1073 | mxPush(mxObjectPrototype); |
| 1074 | slot = fxLastProperty(the, fxNewObjectInstance(the)); |
| 1075 | if (property->kind == XS_ACCESSOR_KIND) { |
| 1076 | slot = fxNextUndefinedProperty(the, slot, mxID(_get), XS_NO_FLAG); |
| 1077 | if (property->value.accessor.getter) { |
| 1078 | slot->kind = XS_REFERENCE_KIND; |
| 1079 | slot->value.reference = property->value.accessor.getter; |
| 1080 | } |
| 1081 | slot = fxNextUndefinedProperty(the, slot, mxID(_set), XS_NO_FLAG); |
| 1082 | if (property->value.accessor.setter) { |
| 1083 | slot->kind = XS_REFERENCE_KIND; |
| 1084 | slot->value.reference = property->value.accessor.setter; |
| 1085 | } |
| 1086 | } |
| 1087 | else { |
| 1088 | if (property->kind != XS_UNINITIALIZED_KIND) |
| 1089 | slot = fxNextSlotProperty(the, slot, property, mxID(_value), XS_NO_FLAG); |
| 1090 | if (mask & XS_DONT_SET_FLAG) |
| 1091 | slot = fxNextBooleanProperty(the, slot, (property->flag & XS_DONT_SET_FLAG) ? 0 : 1, mxID(_writable), XS_NO_FLAG); |
| 1092 | } |
| 1093 | if (mask & XS_DONT_ENUM_FLAG) |
| 1094 | slot= fxNextBooleanProperty(the, slot, (property->flag & XS_DONT_ENUM_FLAG) ? 0 : 1, mxID(_enumerable), XS_NO_FLAG); |
| 1095 | if (mask & XS_DONT_DELETE_FLAG) |
| 1096 | slot= fxNextBooleanProperty(the, slot, (property->flag & XS_DONT_DELETE_FLAG) ? 0 : 1, mxID(_configurable), XS_NO_FLAG); |
| 1097 | } |
| 1098 | |
| 1099 | txBoolean fxIsPropertyCompatible(txMachine* the, txSlot* property, txSlot* slot, txFlag mask) |
| 1100 | { |
no test coverage detected