| 1154 | }; |
| 1155 | |
| 1156 | txSlot* fxNewEnvironmentInstance(txMachine* the, txSlot* environment) |
| 1157 | { |
| 1158 | txSlot* with = the->stack; |
| 1159 | txSlot* instance = fxNewSlot(the); |
| 1160 | txSlot* slot; |
| 1161 | instance->flag = XS_EXOTIC_FLAG; |
| 1162 | instance->kind = XS_INSTANCE_KIND; |
| 1163 | instance->value.instance.garbage = C_NULL; |
| 1164 | instance->value.instance.prototype = (environment && (environment->kind == XS_REFERENCE_KIND)) ? environment->value.reference : C_NULL; |
| 1165 | mxPushReference(instance); |
| 1166 | slot = instance->next = fxNewSlot(the); |
| 1167 | slot->flag = XS_INTERNAL_FLAG; |
| 1168 | slot->ID = XS_ENVIRONMENT_BEHAVIOR; |
| 1169 | slot->kind = with->kind; |
| 1170 | slot->value = with->value; |
| 1171 | mxPop(); |
| 1172 | the->stack->value.reference = instance; |
| 1173 | the->stack->kind = XS_REFERENCE_KIND; |
| 1174 | return instance; |
| 1175 | } |
| 1176 | |
| 1177 | txBoolean fxEnvironmentDefineOwnProperty(txMachine* the, txSlot* instance, txID id, txIndex index, txSlot* slot, txFlag mask) |
| 1178 | { |
no test coverage detected