File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -3987,22 +3987,22 @@ store_borrow
3987
3987
3988
3988
sil-instruction ::= 'store_borrow' sil-value 'to' sil-operand
3989
3989
3990
- store_borrow %0 to %1 : $*T
3990
+ %2 = store_borrow %0 to %1 : $*T
3991
3991
// $T must be a loadable type
3992
3992
// %1 must be an alloc_stack $T
3993
+ // %2 is the return address
3993
3994
3994
3995
Stores the value ``%0 `` to a stack location ``%1 ``, which must be an
3995
3996
``alloc_stack $T ``.
3996
3997
The stack location must not be modified by other instructions than
3997
3998
``store_borrow ``.
3998
- The stored value is alive until the ``dealloc_stack `` or until another
3999
- ``store_borrow `` overwrites the value. During the its lifetime, the stored
4000
- value must not be modified or destroyed.
3999
+ All uses of the store_borrow destination ```%1 `` should be via the store_borrow
4000
+ return address ``%2 `` except dealloc_stack.
4001
+ The stored value is alive until the ``end_borrow ``. During the its lifetime,the
4002
+ stored value must not be modified or destroyed.
4001
4003
The source value ``%0 `` is borrowed (i.e. not copied) and it's borrow scope
4002
4004
must outlive the lifetime of the stored value.
4003
4005
4004
- Note: This is the current implementation and the design is not final.
4005
-
4006
4006
begin_borrow
4007
4007
````````````
4008
4008
You can’t perform that action at this time.
0 commit comments