| 1097 | } |
| 1098 | |
| 1099 | txBoolean fxIsPropertyCompatible(txMachine* the, txSlot* property, txSlot* slot, txFlag mask) |
| 1100 | { |
| 1101 | if (property->flag & XS_DONT_DELETE_FLAG) { |
| 1102 | if ((mask & XS_DONT_DELETE_FLAG) && !(slot->flag & XS_DONT_DELETE_FLAG)) |
| 1103 | return 0; |
| 1104 | if ((mask & XS_DONT_ENUM_FLAG) && ((property->flag & XS_DONT_ENUM_FLAG) != (slot->flag & XS_DONT_ENUM_FLAG))) |
| 1105 | return 0; |
| 1106 | if (mask & XS_ACCESSOR_FLAG) { |
| 1107 | if (property->kind != XS_ACCESSOR_KIND) |
| 1108 | return 0; |
| 1109 | if (mask & XS_GETTER_FLAG) { |
| 1110 | if (property->value.accessor.getter != slot->value.accessor.getter) |
| 1111 | return 0; |
| 1112 | } |
| 1113 | if (mask & XS_SETTER_FLAG) { |
| 1114 | if (property->value.accessor.setter != slot->value.accessor.setter) |
| 1115 | return 0; |
| 1116 | } |
| 1117 | } |
| 1118 | else if ((mask & XS_DONT_SET_FLAG) || (slot->kind != XS_UNINITIALIZED_KIND)) { |
| 1119 | if (property->kind == XS_ACCESSOR_KIND) |
| 1120 | return 0; |
| 1121 | if (property->flag & XS_DONT_SET_FLAG) { |
| 1122 | if ((mask & XS_DONT_SET_FLAG) && !(slot->flag & XS_DONT_SET_FLAG)) |
| 1123 | return 0; |
| 1124 | if ((slot->kind != XS_UNINITIALIZED_KIND) && !fxIsSameValue(the, property, slot, 0)) |
| 1125 | return 0; |
| 1126 | } |
| 1127 | } |
| 1128 | } |
| 1129 | return 1; |
| 1130 | } |
| 1131 | |
| 1132 | static txBoolean fxEnvironmentDefineOwnProperty(txMachine* the, txSlot* instance, txID id, txIndex index, txSlot* slot, txFlag mask); |
| 1133 | static txBoolean fxEnvironmentDeleteProperty(txMachine* the, txSlot* instance, txID id, txIndex index); |
no test coverage detected