Commit c8a55ad
authored
fix: by-ref ARRAY OF ARRAY fn signatures, callsites and GEP stride calculation (#1525)
This PR fixes by-reference ARRAY OF ARRAY function signatures, updates call sites, and corrects GEP stride calculation logic.
- nested array parameters are now declared as/arguments are casted to a pointer to their fundamental element type rather than declaring and passing typed array-pointers (e.g. [3 x [81 x i8]]* -> i8*) to ensure consistent behaviour with our regular array argument handling
- stride calculation for GEP-instructions used for nested array accesses has been fixed
- added some much needed test coverage for nested arrays, both as snapshot tests and lit correctness tests
fixes #13891 parent 2622acd commit c8a55ad
File tree
9 files changed
+963
-30
lines changed- src/codegen
- generators
- tests
- tests/lit/single
- auto_pointers
- complex_return_types
- oop
9 files changed
+963
-30
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| 30 | + | |
30 | 31 | | |
31 | 32 | | |
32 | 33 | | |
| |||
38 | 39 | | |
39 | 40 | | |
40 | 41 | | |
41 | | - | |
| 42 | + | |
42 | 43 | | |
43 | 44 | | |
44 | 45 | | |
| |||
1168 | 1169 | | |
1169 | 1170 | | |
1170 | 1171 | | |
| 1172 | + | |
1171 | 1173 | | |
1172 | 1174 | | |
1173 | | - | |
1174 | | - | |
1175 | | - | |
1176 | | - | |
1177 | | - | |
1178 | | - | |
| 1175 | + | |
1179 | 1176 | | |
1180 | 1177 | | |
1181 | 1178 | | |
| |||
1629 | 1626 | | |
1630 | 1627 | | |
1631 | 1628 | | |
1632 | | - | |
| 1629 | + | |
1633 | 1630 | | |
1634 | 1631 | | |
1635 | 1632 | | |
| |||
1708 | 1705 | | |
1709 | 1706 | | |
1710 | 1707 | | |
1711 | | - | |
| 1708 | + | |
1712 | 1709 | | |
1713 | 1710 | | |
1714 | 1711 | | |
| 1712 | + | |
| 1713 | + | |
| 1714 | + | |
| 1715 | + | |
| 1716 | + | |
| 1717 | + | |
| 1718 | + | |
| 1719 | + | |
| 1720 | + | |
| 1721 | + | |
| 1722 | + | |
| 1723 | + | |
| 1724 | + | |
| 1725 | + | |
| 1726 | + | |
| 1727 | + | |
| 1728 | + | |
| 1729 | + | |
| 1730 | + | |
| 1731 | + | |
| 1732 | + | |
| 1733 | + | |
| 1734 | + | |
| 1735 | + | |
| 1736 | + | |
| 1737 | + | |
| 1738 | + | |
| 1739 | + | |
| 1740 | + | |
| 1741 | + | |
| 1742 | + | |
| 1743 | + | |
| 1744 | + | |
| 1745 | + | |
| 1746 | + | |
| 1747 | + | |
| 1748 | + | |
| 1749 | + | |
| 1750 | + | |
| 1751 | + | |
| 1752 | + | |
| 1753 | + | |
| 1754 | + | |
| 1755 | + | |
| 1756 | + | |
| 1757 | + | |
| 1758 | + | |
1715 | 1759 | | |
1716 | | - | |
| 1760 | + | |
1717 | 1761 | | |
1718 | | - | |
1719 | | - | |
1720 | | - | |
1721 | | - | |
1722 | 1762 | | |
1723 | 1763 | | |
1724 | 1764 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
402 | 402 | | |
403 | 403 | | |
404 | 404 | | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
| |||
219 | 220 | | |
220 | 221 | | |
221 | 222 | | |
222 | | - | |
| 223 | + | |
223 | 224 | | |
224 | | - | |
| 225 | + | |
225 | 226 | | |
226 | 227 | | |
227 | 228 | | |
228 | | - | |
229 | | - | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
230 | 232 | | |
231 | 233 | | |
232 | 234 | | |
| |||
245 | 247 | | |
246 | 248 | | |
247 | 249 | | |
248 | | - | |
249 | | - | |
250 | | - | |
251 | | - | |
252 | | - | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
253 | 258 | | |
254 | 259 | | |
255 | 260 | | |
| |||
0 commit comments