| 1946 | } |
| 1947 | |
| 1948 | void fxOrderModule(txMachine* the, txSlot* queue, txSlot* order, txSlot* module) |
| 1949 | { |
| 1950 | txSlot** fromAddress = &(queue->next); |
| 1951 | txSlot** toAddress = &(order->next); |
| 1952 | txSlot* from; |
| 1953 | txSlot* to; |
| 1954 | while ((from = *fromAddress)) { |
| 1955 | if (from == module) { |
| 1956 | *fromAddress = module->next; |
| 1957 | module->next = C_NULL; |
| 1958 | break; |
| 1959 | } |
| 1960 | fromAddress = &(from->next); |
| 1961 | } |
| 1962 | if (mxModuleStatus(module) == XS_MODULE_STATUS_LINKING) { |
| 1963 | txSlot* transfer = mxModuleTransfers(module)->value.reference->next; |
| 1964 | while (transfer) { |
| 1965 | from = mxTransferFrom(transfer); |
| 1966 | if (from->kind != XS_NULL_KIND) { |
| 1967 | to = queue->next; |
| 1968 | while (to) { |
| 1969 | if (to->value.reference == from->value.reference) |
| 1970 | break; |
| 1971 | to = to->next; |
| 1972 | } |
| 1973 | if (to) |
| 1974 | fxOrderModule(the, queue, order, to); |
| 1975 | } |
| 1976 | transfer = transfer->next; |
| 1977 | } |
| 1978 | } |
| 1979 | while ((to = *toAddress)) { |
| 1980 | if (to->value.reference == module->value.reference) |
| 1981 | return; |
| 1982 | toAddress = &(to->next); |
| 1983 | } |
| 1984 | *toAddress = module; |
| 1985 | } |
| 1986 | |
| 1987 | void fxOverrideModule(txMachine* the, txSlot* queue, txSlot* list, txSlot* result, txSlot* module, txSlot* record) |
| 1988 | { |