Commit b73676e
authored
Bridging: Implement several optional- and enum-related bridges (#85756)
In #85757, part of the changes resolving #68944 is submitted. Most
bridges required for #85757 were previously implemented in #84648. After
#82653 got merged, we have demand for several new bridges in order to
properly support optimizing derivatives of throwing functions via
AutoDiff Closure Specialization pass.
This patch implements:
- **AST:**
* `var optionalObjectType: Type` property of `Type` struct
* `var optionalType: Type` property of `Type` struct
- **SIL:**
* `let name: StringRef` property of `EnumCase` struct
* `func createOptionalSome(operand: Value, type: Type) -> EnumInst`
method of `Builder`
* `func createOptionalNone(type: Type) -> EnumInst` method of `Builder`1 parent 12cb3f9 commit b73676e
File tree
5 files changed
+38
-1
lines changed- SwiftCompilerSources/Sources
- AST
- SIL
- include/swift/AST
5 files changed
+38
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
66 | 75 | | |
67 | 76 | | |
68 | 77 | | |
| |||
92 | 101 | | |
93 | 102 | | |
94 | 103 | | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
95 | 108 | | |
96 | 109 | | |
97 | 110 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
573 | 573 | | |
574 | 574 | | |
575 | 575 | | |
| 576 | + | |
| 577 | + | |
| 578 | + | |
| 579 | + | |
| 580 | + | |
| 581 | + | |
| 582 | + | |
| 583 | + | |
| 584 | + | |
| 585 | + | |
| 586 | + | |
576 | 587 | | |
577 | 588 | | |
578 | 589 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
291 | 291 | | |
292 | 292 | | |
293 | 293 | | |
| 294 | + | |
294 | 295 | | |
295 | 296 | | |
296 | 297 | | |
| |||
329 | 330 | | |
330 | 331 | | |
331 | 332 | | |
332 | | - | |
| 333 | + | |
333 | 334 | | |
334 | 335 | | |
335 | 336 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
| 86 | + | |
86 | 87 | | |
87 | 88 | | |
88 | 89 | | |
| |||
3046 | 3047 | | |
3047 | 3048 | | |
3048 | 3049 | | |
| 3050 | + | |
3049 | 3051 | | |
3050 | 3052 | | |
3051 | 3053 | | |
| |||
3079 | 3081 | | |
3080 | 3082 | | |
3081 | 3083 | | |
| 3084 | + | |
| 3085 | + | |
3082 | 3086 | | |
3083 | 3087 | | |
3084 | 3088 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
639 | 639 | | |
640 | 640 | | |
641 | 641 | | |
| 642 | + | |
| 643 | + | |
| 644 | + | |
| 645 | + | |
642 | 646 | | |
643 | 647 | | |
644 | 648 | | |
| |||
782 | 786 | | |
783 | 787 | | |
784 | 788 | | |
| 789 | + | |
| 790 | + | |
| 791 | + | |
| 792 | + | |
785 | 793 | | |
786 | 794 | | |
787 | 795 | | |
| |||
0 commit comments