@@ -5191,8 +5191,9 @@ case, the strong reference count will be incremented before any changes to the
51915191weak reference count.
51925192
51935193This operation must be atomic with respect to the final ``strong_release `` on
5194- the operand heap object. It need not be atomic with respect to ``store_weak ``
5195- or ``load_weak ``/``strong_copy_weak_value `` operations on the same address.
5194+ the operand heap object. It need not be atomic with respect to
5195+ ``store_weak ``/``weak_copy_value `` or ``load_weak ``/``strong_copy_weak_value ``
5196+ operations on the same address.
51965197
51975198strong_copy_weak_value
51985199``````````````````````
@@ -5212,8 +5213,9 @@ its strong reference count and produces the value ``Optional.some`` holding the
52125213object. Otherwise, produces the value ``Optional.none ``.
52135214
52145215This operation must be atomic with respect to the final ``strong_release `` on
5215- the operand heap object. It need not be atomic with respect to ``store_weak ``
5216- or ``load_weak ``/``strong_copy_weak_value `` operations on the same address.
5216+ the operand heap object. It need not be atomic with respect to
5217+ ``store_weak ``/``weak_copy_value `` or ``load_weak ``/``strong_copy_weak_value ``
5218+ operations on the same address.
52175219
52185220store_weak
52195221``````````
@@ -5239,8 +5241,30 @@ currently be initialized. After the evaluation:
52395241
52405242This operation must be atomic with respect to the final ``strong_release `` on
52415243the operand (source) heap object. It need not be atomic with respect to
5242- ``store_weak `` or ``load_weak ``/``strong_copy_weak_value `` operations on the
5243- same address.
5244+ ``store_weak ``/``weak_copy_value `` or ``load_weak ``/``strong_copy_weak_value ``
5245+ operations on the same address.
5246+
5247+ weak_copy_value
5248+ ```````````````
5249+ ::
5250+
5251+ sil-instruction ::= 'weak_copy_value' sil-operand
5252+
5253+ %1 = weak_copy_value %0 : $Optional<T>
5254+ // %1 will be an @owned value of type $@sil_weak Optional<T>.
5255+ // $T must be a reference type
5256+ // $@sil_weak Optional<T> must be address-only
5257+
5258+ Only valid in opaque values mode. Lowered by AddressLowering to store_weak.
5259+
5260+ If ``%0 `` is non-nil, produces the value ``@sil_weak Optional.some `` holding the
5261+ object and increments the weak reference count by 1. Otherwise, produces the
5262+ value ``Optional.none `` wrapped in a ``@sil_weak `` box.
5263+
5264+ This operation must be atomic with respect to the final ``strong_release `` on
5265+ the operand (source) heap object. It need not be atomic with respect to
5266+ ``store_weak ``/``weak_copy_value `` or ``load_weak ``/``strong_copy_weak_value ``
5267+ operations on the same address.
52445268
52455269load_unowned
52465270````````````
0 commit comments