| 569 | } |
| 570 | |
| 571 | void fxLinkCircularities(txMachine* the, txSlot* module, txSlot* circularities, txSlot* exports) |
| 572 | { |
| 573 | txSlot* circularitiesInstance; |
| 574 | txSlot* circularity; |
| 575 | txSlot* transfers; |
| 576 | txSlot* exportsInstance; |
| 577 | txSlot* export; |
| 578 | txSlot* transfer; |
| 579 | txSlot* aliases; |
| 580 | txSlot* alias; |
| 581 | txSlot* circularitiesCopy; |
| 582 | txSlot* circularityCopy; |
| 583 | txSlot* from; |
| 584 | txSlot* stars; |
| 585 | txSlot* star; |
| 586 | circularitiesInstance = circularities->value.reference; |
| 587 | circularity = circularitiesInstance->next; |
| 588 | while (circularity) { |
| 589 | if (circularity->value.reference == module->value.reference) |
| 590 | return; |
| 591 | circularity = circularity->next; |
| 592 | } |
| 593 | circularity = fxDuplicateSlot(the, module); |
| 594 | circularity->next = circularitiesInstance->next; |
| 595 | circularitiesInstance->next = circularity; |
| 596 | exportsInstance = exports->value.reference; |
| 597 | export = exportsInstance; |
| 598 | transfers = mxModuleExports(module); |
| 599 | if (transfers->kind == XS_REFERENCE_KIND) { |
| 600 | transfer = transfers->value.reference->next; |
| 601 | while (transfer) { |
| 602 | export = export->next = fxNewSlot(the); |
| 603 | export->ID = transfer->ID; |
| 604 | export->kind = transfer->kind; |
| 605 | export->value = transfer->value; |
| 606 | transfer = transfer->next; |
| 607 | } |
| 608 | return; |
| 609 | } |
| 610 | transfers = mxModuleTransfers(module); |
| 611 | if (transfers->kind == XS_REFERENCE_KIND) { |
| 612 | txBoolean starFlag = 0; |
| 613 | transfer = transfers->value.reference->next; |
| 614 | while (transfer) { |
| 615 | aliases = mxTransferAliases(transfer); |
| 616 | if (aliases->kind == XS_REFERENCE_KIND) { |
| 617 | alias = aliases->value.reference->next; |
| 618 | if (alias) { |
| 619 | while (alias) { |
| 620 | export = export->next = fxNewSlot(the); |
| 621 | export->ID = alias->value.symbol; |
| 622 | export->kind = transfer->kind; |
| 623 | export->value = transfer->value; |
| 624 | alias = alias->next; |
| 625 | } |
| 626 | } |
| 627 | else { |
| 628 | mxCheck(the, mxTransferLocal(transfer)->kind == XS_NULL_KIND); |
no test coverage detected