File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -3547,6 +3547,27 @@ by an `end_borrow`_ instruction. All `load_borrow`_ instructions must be
3547
3547
paired with exactly one `end_borrow `_ instruction along any path through the
3548
3548
program. Until `end_borrow `_, it is illegal to invalidate or store to ``%0 ``.
3549
3549
3550
+ store_borrow
3551
+ ````````````
3552
+
3553
+ ::
3554
+
3555
+ sil-instruction ::= 'store_borrow' sil-value 'to' sil-operand
3556
+
3557
+ store_borrow %0 to %1 : $*T
3558
+ // $T must be a loadable type
3559
+ // %1 must be an alloc_stack $T
3560
+
3561
+ Stores the value ``%0 `` to a stack location ``%1 ``, which must be an
3562
+ ``alloc_stack $T ``.
3563
+ The stored value is alive until the ``dealloc_stack `` or until another
3564
+ ``store_borrow `` overwrites the value. During the its lifetime, the stored
3565
+ value must not be modified or destroyed.
3566
+ The source value ``%0 `` is borrowed (i.e. not copied) and it's borrow scope
3567
+ must outlive the lifetime of the stored value.
3568
+
3569
+ Note: This is the current implementation and the design is not final.
3570
+
3550
3571
begin_borrow
3551
3572
````````````
3552
3573
You can’t perform that action at this time.
0 commit comments