Commit 07ba7a6
committed
[runtime] Exported multi payload enum witnesses.
When witness tables for enums are instantiated at runtime via
swift::swift_initEnumMetadataMultiPayload
the witnesses
getEnumTagSinglePayload
storeEnumTagSinglePayload
are filled with swift_getMultiPayloadEnumTagSinglePayload (previously
getMultiPayloadEnumTagSinglePayload) and
swift_storeMultiPayloadEnumTagSinglePayload (previously
storeMultiPayloadEnumTagSinglePayload). Concretely, that occurs when
instantiating the value witness table for a generic enum which has more
than one case with a payload, like Result<T>. To enable the compiler to
do the same work, those functions need to be visible to it.
Here, those functions are made visible to the compiler. Doing so
requires changing the way they are declared and adding them to
RuntimeFunctions.def which in turn requires the definition of some
functions to describe the availability of those functions.1 parent 95aeaf7 commit 07ba7a6
File tree
6 files changed
+75
-17
lines changed- include/swift
- AST
- Runtime
- lib
- AST
- IRGen
- stdlib/public/runtime
6 files changed
+75
-17
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
733 | 733 | | |
734 | 734 | | |
735 | 735 | | |
| 736 | + | |
| 737 | + | |
| 738 | + | |
| 739 | + | |
736 | 740 | | |
737 | 741 | | |
738 | 742 | | |
| |||
749 | 753 | | |
750 | 754 | | |
751 | 755 | | |
| 756 | + | |
| 757 | + | |
| 758 | + | |
| 759 | + | |
752 | 760 | | |
753 | 761 | | |
754 | 762 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
129 | 129 | | |
130 | 130 | | |
131 | 131 | | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
132 | 150 | | |
133 | 151 | | |
134 | 152 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1743 | 1743 | | |
1744 | 1744 | | |
1745 | 1745 | | |
| 1746 | + | |
| 1747 | + | |
| 1748 | + | |
| 1749 | + | |
| 1750 | + | |
| 1751 | + | |
| 1752 | + | |
| 1753 | + | |
| 1754 | + | |
| 1755 | + | |
| 1756 | + | |
| 1757 | + | |
| 1758 | + | |
| 1759 | + | |
| 1760 | + | |
| 1761 | + | |
| 1762 | + | |
| 1763 | + | |
| 1764 | + | |
| 1765 | + | |
| 1766 | + | |
| 1767 | + | |
| 1768 | + | |
1746 | 1769 | | |
1747 | 1770 | | |
1748 | 1771 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
334 | 334 | | |
335 | 335 | | |
336 | 336 | | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
337 | 341 | | |
338 | 342 | | |
339 | 343 | | |
| |||
416 | 420 | | |
417 | 421 | | |
418 | 422 | | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
419 | 426 | | |
420 | 427 | | |
421 | 428 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
781 | 781 | | |
782 | 782 | | |
783 | 783 | | |
| 784 | + | |
| 785 | + | |
| 786 | + | |
| 787 | + | |
| 788 | + | |
| 789 | + | |
| 790 | + | |
| 791 | + | |
| 792 | + | |
784 | 793 | | |
785 | 794 | | |
786 | 795 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
148 | 148 | | |
149 | 149 | | |
150 | 150 | | |
151 | | - | |
152 | | - | |
153 | | - | |
154 | | - | |
155 | | - | |
156 | | - | |
157 | | - | |
158 | | - | |
159 | 151 | | |
160 | 152 | | |
161 | 153 | | |
| |||
209 | 201 | | |
210 | 202 | | |
211 | 203 | | |
212 | | - | |
213 | | - | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
214 | 207 | | |
215 | 208 | | |
216 | 209 | | |
| |||
287 | 280 | | |
288 | 281 | | |
289 | 282 | | |
290 | | - | |
291 | | - | |
292 | | - | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
293 | 287 | | |
294 | 288 | | |
295 | 289 | | |
296 | 290 | | |
297 | 291 | | |
298 | 292 | | |
299 | | - | |
300 | | - | |
301 | | - | |
302 | | - | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
303 | 296 | | |
304 | 297 | | |
305 | 298 | | |
| |||
0 commit comments