Commit 77332ee
authored
Fix multiple return areas being generated for imports in one function (#466)
* Fix multiple return areas being generated for imports in one function
This commit fixes the issues brought up in #444 and #454 by moving the
generation of the local variable to outside the `FunctionBindgen`
structure into just after the function has been generated. That way when
two return areas are requested they'll get unified into one storage.
Closes #444
Closes #454
* Exclude the new test on the teavm-java generator1 parent 98c2b1e commit 77332ee
4 files changed
Lines changed: 65 additions & 22 deletions
File tree
- crates
- gen-guest-c/src
- gen-guest-rust/src
- gen-guest-teavm-java/tests
- tests/codegen
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
790 | 790 | | |
791 | 791 | | |
792 | 792 | | |
793 | | - | |
| 793 | + | |
| 794 | + | |
| 795 | + | |
| 796 | + | |
| 797 | + | |
| 798 | + | |
| 799 | + | |
| 800 | + | |
| 801 | + | |
| 802 | + | |
| 803 | + | |
| 804 | + | |
| 805 | + | |
| 806 | + | |
| 807 | + | |
794 | 808 | | |
795 | 809 | | |
796 | 810 | | |
| |||
1527 | 1541 | | |
1528 | 1542 | | |
1529 | 1543 | | |
| 1544 | + | |
| 1545 | + | |
1530 | 1546 | | |
1531 | 1547 | | |
1532 | 1548 | | |
| |||
1547 | 1563 | | |
1548 | 1564 | | |
1549 | 1565 | | |
| 1566 | + | |
| 1567 | + | |
1550 | 1568 | | |
1551 | 1569 | | |
1552 | 1570 | | |
| |||
1612 | 1630 | | |
1613 | 1631 | | |
1614 | 1632 | | |
| 1633 | + | |
| 1634 | + | |
1615 | 1635 | | |
1616 | | - | |
1617 | | - | |
1618 | | - | |
1619 | | - | |
1620 | | - | |
1621 | | - | |
1622 | | - | |
1623 | | - | |
1624 | | - | |
1625 | | - | |
1626 | | - | |
1627 | | - | |
| 1636 | + | |
| 1637 | + | |
| 1638 | + | |
1628 | 1639 | | |
1629 | 1640 | | |
1630 | 1641 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
387 | 387 | | |
388 | 388 | | |
389 | 389 | | |
| 390 | + | |
| 391 | + | |
390 | 392 | | |
391 | 393 | | |
392 | 394 | | |
393 | 395 | | |
394 | 396 | | |
395 | 397 | | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
396 | 408 | | |
397 | 409 | | |
398 | 410 | | |
| |||
708 | 720 | | |
709 | 721 | | |
710 | 722 | | |
| 723 | + | |
| 724 | + | |
711 | 725 | | |
712 | 726 | | |
713 | 727 | | |
| |||
721 | 735 | | |
722 | 736 | | |
723 | 737 | | |
| 738 | + | |
| 739 | + | |
724 | 740 | | |
725 | 741 | | |
726 | 742 | | |
| |||
841 | 857 | | |
842 | 858 | | |
843 | 859 | | |
| 860 | + | |
| 861 | + | |
| 862 | + | |
| 863 | + | |
844 | 864 | | |
845 | | - | |
846 | | - | |
847 | | - | |
848 | | - | |
849 | | - | |
850 | | - | |
851 | | - | |
852 | | - | |
853 | | - | |
| 865 | + | |
| 866 | + | |
| 867 | + | |
| 868 | + | |
854 | 869 | | |
855 | 870 | | |
856 | 871 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
7 | 10 | | |
8 | 11 | | |
9 | 12 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
0 commit comments