|
7 | 7 |
|
8 | 8 | import Builtin
|
9 | 9 |
|
10 |
| -sil [ossa] @destroy_value_before_end_borrow : $@convention(thin) (@owned Builtin.NativeObject) -> () { |
11 |
| -bb0(%0 : @owned $Builtin.NativeObject): |
12 |
| - %1 = begin_borrow %0 : $Builtin.NativeObject |
13 |
| - end_borrow %1 : $Builtin.NativeObject |
14 |
| - destroy_value %0 : $Builtin.NativeObject |
15 |
| - %9999 = tuple() |
16 |
| - return %9999 : $() |
17 |
| -} |
18 |
| - |
19 | 10 | sil [ossa] @coroutine_callee : $@yield_once (@guaranteed Builtin.NativeObject) -> () {
|
20 | 11 | bb0(%0 : @guaranteed $Builtin.NativeObject):
|
21 | 12 | yield (), resume bb1, unwind bb2
|
|
28 | 19 | unwind
|
29 | 20 | }
|
30 | 21 |
|
| 22 | +sil [ossa] @destroy_value_before_end_borrow : $@convention(thin) (@owned Builtin.NativeObject) -> () { |
| 23 | +bb0(%0 : @owned $Builtin.NativeObject): |
| 24 | + %1 = begin_borrow %0 : $Builtin.NativeObject |
| 25 | + end_borrow %1 : $Builtin.NativeObject |
| 26 | + destroy_value %0 : $Builtin.NativeObject |
| 27 | + %9999 = tuple() |
| 28 | + return %9999 : $() |
| 29 | +} |
| 30 | + |
31 | 31 | sil [ossa] @destroy_value_before_end_borrow_coroutine : $@convention(thin) (@owned Builtin.NativeObject) -> () {
|
32 | 32 | bb0(%0 : @owned $Builtin.NativeObject):
|
33 | 33 | %coro = function_ref @coroutine_callee : $@yield_once @convention(thin) (@guaranteed Builtin.NativeObject) -> ()
|
|
94 | 94 | %r = tuple ()
|
95 | 95 | return %r : $()
|
96 | 96 | }
|
| 97 | + |
| 98 | +sil [ossa] @end_parent_scope_before_end_borrow_coroutine : $@convention(thin) (@owned Builtin.NativeObject) -> () { |
| 99 | +bb0(%0 : @owned $Builtin.NativeObject): |
| 100 | + %1 = begin_borrow %0 : $Builtin.NativeObject |
| 101 | + %coro = function_ref @coroutine_callee : $@yield_once @convention(thin) (@guaranteed Builtin.NativeObject) -> () |
| 102 | + %token = begin_apply %coro(%1) : $@yield_once @convention(thin) (@guaranteed Builtin.NativeObject) -> () |
| 103 | + end_apply %token |
| 104 | + end_borrow %1 : $Builtin.NativeObject |
| 105 | + destroy_value %0 : $Builtin.NativeObject |
| 106 | + %r = tuple () |
| 107 | + return %r : $() |
| 108 | +} |
| 109 | + |
| 110 | +sil [ossa] @end_parent_scope_before_end_borrow_coroutine_1a : $@convention(thin) (@owned Builtin.NativeObject) -> () { |
| 111 | +bb0(%0 : @owned $Builtin.NativeObject): |
| 112 | + %1 = begin_borrow %0 : $Builtin.NativeObject |
| 113 | + %coro = function_ref @coroutine_callee : $@yield_once @convention(thin) (@guaranteed Builtin.NativeObject) -> () |
| 114 | + %token = begin_apply %coro(%1) : $@yield_once @convention(thin) (@guaranteed Builtin.NativeObject) -> () |
| 115 | + end_apply %token |
| 116 | + br bb1 |
| 117 | + |
| 118 | +bb1: |
| 119 | + end_borrow %1 : $Builtin.NativeObject |
| 120 | + destroy_value %0 : $Builtin.NativeObject |
| 121 | + %r = tuple () |
| 122 | + return %r : $() |
| 123 | +} |
| 124 | + |
| 125 | +sil [ossa] @end_parent_scope_before_end_borrow_coroutine_2 : $@convention(thin) (@owned Builtin.NativeObject) -> () { |
| 126 | +bb0(%0 : @owned $Builtin.NativeObject): |
| 127 | + %1 = begin_borrow %0 : $Builtin.NativeObject |
| 128 | + %coro = function_ref @coroutine_callee : $@yield_once @convention(thin) (@guaranteed Builtin.NativeObject) -> () |
| 129 | + %token = begin_apply %coro(%1) : $@yield_once @convention(thin) (@guaranteed Builtin.NativeObject) -> () |
| 130 | + abort_apply %token |
| 131 | + end_borrow %1 : $Builtin.NativeObject |
| 132 | + destroy_value %0 : $Builtin.NativeObject |
| 133 | + %r = tuple () |
| 134 | + return %r : $() |
| 135 | +} |
| 136 | + |
| 137 | +sil [ossa] @end_parent_scope_before_end_borrow_coroutine_2b : $@convention(thin) (@owned Builtin.NativeObject) -> () { |
| 138 | +bb0(%0 : @owned $Builtin.NativeObject): |
| 139 | + %1 = begin_borrow %0 : $Builtin.NativeObject |
| 140 | + %coro = function_ref @coroutine_callee : $@yield_once @convention(thin) (@guaranteed Builtin.NativeObject) -> () |
| 141 | + %token = begin_apply %coro(%1) : $@yield_once @convention(thin) (@guaranteed Builtin.NativeObject) -> () |
| 142 | + abort_apply %token |
| 143 | + br bb1 |
| 144 | + |
| 145 | +bb1: |
| 146 | + end_borrow %1 : $Builtin.NativeObject |
| 147 | + destroy_value %0 : $Builtin.NativeObject |
| 148 | + %r = tuple () |
| 149 | + return %r : $() |
| 150 | +} |
| 151 | + |
| 152 | +sil [ossa] @positive_end_parent_scope_before_end_borrow_coroutine_3 : $@convention(thin) (@owned Builtin.NativeObject) -> () { |
| 153 | +bb0(%0 : @owned $Builtin.NativeObject): |
| 154 | + %1 = begin_borrow %0 : $Builtin.NativeObject |
| 155 | + %coro = function_ref @coroutine_callee : $@yield_once @convention(thin) (@guaranteed Builtin.NativeObject) -> () |
| 156 | + %token = begin_apply %coro(%1) : $@yield_once @convention(thin) (@guaranteed Builtin.NativeObject) -> () |
| 157 | + cond_br undef, bb1, bb2 |
| 158 | + |
| 159 | +bb1: |
| 160 | + abort_apply %token |
| 161 | + end_borrow %1 : $Builtin.NativeObject |
| 162 | + destroy_value %0 : $Builtin.NativeObject |
| 163 | + br bb3 |
| 164 | + |
| 165 | +bb2: |
| 166 | + end_apply %token |
| 167 | + end_borrow %1 : $Builtin.NativeObject |
| 168 | + destroy_value %0 : $Builtin.NativeObject |
| 169 | + br bb3 |
| 170 | + |
| 171 | +bb3: |
| 172 | + %r = tuple () |
| 173 | + return %r : $() |
| 174 | +} |
0 commit comments