| 1138 | } |
| 1139 | |
| 1140 | void fxDefineAll(txMachine* the, txSlot* stack, txID id, txIndex index, txFlag flag, txFlag mask) |
| 1141 | { |
| 1142 | txSlot* instance = fxToInstance(the, stack); |
| 1143 | txSlot* slot = stack + 1; |
| 1144 | if (mask & XS_GETTER_FLAG) { |
| 1145 | slot->value.accessor.getter = slot->value.reference; |
| 1146 | slot->value.accessor.setter = C_NULL; |
| 1147 | slot->kind = XS_ACCESSOR_KIND; |
| 1148 | } |
| 1149 | else if (mask & XS_SETTER_FLAG) { |
| 1150 | slot->value.accessor.setter = slot->value.reference; |
| 1151 | slot->value.accessor.getter = C_NULL; |
| 1152 | slot->kind = XS_ACCESSOR_KIND; |
| 1153 | } |
| 1154 | slot->flag = flag & XS_GET_ONLY; |
| 1155 | if (!mxBehaviorDefineOwnProperty(the, instance, id, index, slot, mask)) |
| 1156 | mxTypeError("define %ld: not configurable", id); |
| 1157 | the->stack = stack; |
| 1158 | mxPop(); |
| 1159 | } |
| 1160 | |
| 1161 | void fxDefineAt(txMachine* the, txFlag flag, txFlag mask) |
| 1162 | { |
no test coverage detected