File tree Expand file tree Collapse file tree 1 file changed +34
-2
lines changed Expand file tree Collapse file tree 1 file changed +34
-2
lines changed Original file line number Diff line number Diff line change @@ -5268,13 +5268,45 @@ operations on the same address.
5268
5268
5269
5269
load_unowned
5270
5270
````````````
5271
+ ::
5272
+
5273
+ sil-instruction ::= 'load_unowned' '[take]'? sil-operand
5274
+
5275
+ %1 = load_unowned [take] %0 : $*@sil_unowned T
5276
+ // T must be a reference type
5277
+
5278
+ Increments the strong reference count of the object stored at ``%0 ``.
5279
+
5280
+ Decrements the unowned reference count of the object stored at ``%0 `` if
5281
+ ``[take] `` is specified. Additionally, the storage is invalidated.
5271
5282
5272
- TODO: Fill this in
5283
+ Requires that the strong reference count of the heap object stored at ``%0 `` is
5284
+ positive. Otherwise, traps.
5285
+
5286
+ This operation must be atomic with respect to the final ``strong_release `` on
5287
+ the operand (source) heap object. It need not be atomic with respect to
5288
+ ``store_unowned `` or ``load_unowned `` operations on the same address.
5273
5289
5274
5290
store_unowned
5275
5291
`````````````
5292
+ ::
5293
+
5294
+ sil-instruction ::= 'store_unowned' sil-value 'to' '[init]'? sil-operand
5295
+
5296
+ store_unowned %0 to [init] %1 : $*@sil_unowned T
5297
+ // T must be a reference type
5298
+
5299
+ Increments the unowned reference count of the object at ``%0 ``.
5300
+
5301
+ Decrements the unowned reference count of the object previously stored at ``%1 ``
5302
+ if ``[init] `` is not specified.
5303
+
5304
+ The storage must be initialized iff ``[init] `` is not specified.
5305
+
5306
+ This operation must be atomic with respect to the final ``strong_release `` on
5307
+ the operand (source) heap object. It need not be atomic with respect to
5308
+ ``store_unowned `` or ``load_unowned `` operations on the same address.
5276
5309
5277
- TODO: Fill this in
5278
5310
5279
5311
fix_lifetime
5280
5312
````````````
You can’t perform that action at this time.
0 commit comments