You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/// Categorize all uses in terms of their ownership effect. Implies ownership and lifetime constraints.
147
+
publicenumOperandOwnership{
148
+
/// Operands that do not use the value. They only represent a dependence on a dominating definition and do not require liveness. (type-dependent operands)
149
+
case nonUse
150
+
151
+
/// Uses that can only handle trivial values. The operand value must have None ownership. These uses require liveness but are otherwise unverified.
152
+
case trivialUse
153
+
154
+
/// Use the value only for the duration of the operation, which may have side effects. (single-instruction apply with @guaranteed argument)
155
+
case instantaneousUse
156
+
157
+
/// Use a value without requiring or propagating ownership. The operation may not have side-effects that could affect ownership. This is limited to a small number of operations that are allowed to take Unowned values. (copy_value, single-instruction apply with @unowned argument))
158
+
case unownedInstantaneousUse
159
+
160
+
/// Forwarding instruction with an Unowned result. Its operands may have any ownership.
161
+
case forwardingUnowned
162
+
163
+
/// Escape a pointer into a value which cannot be tracked or verified.
164
+
///
165
+
/// PointerEscape operands indicate a SIL deficiency to suffuciently model dependencies. They never arise from user-level escapes.
166
+
case pointerEscape
167
+
168
+
/// Bitwise escape. Escapes the nontrivial contents of the value. OSSA does not enforce the lifetime of the escaping bits. The programmer must explicitly force lifetime extension. (ref_to_unowned, unchecked_trivial_bitcast)
169
+
case bitwiseEscape
170
+
171
+
/// Borrow. Propagates the owned or guaranteed value within a scope, without ending its lifetime. (begin_borrow, begin_apply with @guaranteed argument)
172
+
case borrow
173
+
174
+
/// Destroying Consume. Destroys the owned value immediately. (store, destroy, @owned destructure).
175
+
case destroyingConsume
176
+
177
+
/// Forwarding Consume. Consumes the owned value indirectly via a move. (br, destructure, tuple, struct, cast, switch).
178
+
case forwardingConsume
179
+
180
+
/// Interior Pointer. Propagates a trivial value (e.g. address, pointer, or no-escape closure) that depends on the guaranteed value within the base's borrow scope. The verifier checks that all uses of the trivial
181
+
/// value are in scope. (ref_element_addr, open_existential_box)
182
+
case interiorPointer
183
+
184
+
/// Forwarded Borrow. Propagates the guaranteed value within the base's borrow scope. (tuple_extract, struct_extract, cast, switch)
185
+
case guaranteedForwarding
186
+
187
+
/// End Borrow. End the borrow scope opened directly by the operand. The operand must be a begin_borrow, begin_apply, or function argument. (end_borrow, end_apply)
188
+
case endBorrow
189
+
190
+
/// Reborrow. Ends the borrow scope opened directly by the operand and begins one or multiple disjoint borrow scopes. If a forwarded value is reborrowed, then its base must also be reborrowed at the same point. (br, FIXME: should also include destructure, tuple, struct)
0 commit comments