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
// Visit the introducers of a forwarded lifetime (Value -> LifetimeIntroducer).
30
-
//
31
-
// A lifetime introducer produces an initial OSSA lifetime which may be extended by forwarding instructions. The introducer is never itself the result of a ForwardingInstruction. Example:
// The lifetime of a single owned value ends when it is forwarded, but certain lifetime properties are relevant for the entire forward-extended lifetime. For example, if an owned lifetime has a pointer-escaping use, then all values in the forward-extended lifetime are also considered pointer-escaping. Certain propeties, like lexical lifetimes, only exist on the forward introducer and apply to all forwarded values.
43
-
//
44
-
// Note: Although move_value conceptually forwards an owned value, it also summarizes lifetime attributes; therefore, it is not formally a ForwardingInstruction.
45
-
//
46
-
// The lifetime introducer of a guaranteed value is the borrow introducer:
47
-
//
48
-
// # lifetime introducer / borrow introducer
49
-
// %1 = begin_borrow -+
50
-
// ... | OSSA lifetime == forwarded lifetime
51
-
// # forwarding instruction |
52
-
// %2 = struct $S (%1) | - forwarded uses are within the OSSA lifetime
53
-
// |
54
-
// end_borrow %1 -+
55
-
//
56
-
// TODO: When a begin_borrow has no lifetime flags, it can be ignored as a lifetime introducer. In that case, an owned value may introduce guaranteed OSSA lifetimes.
57
-
//
58
-
// Forwarded lifetimes also extend through phis. In this case, however, there is no ForwardingInstruction.
// TODO: when phi lifetime flags are implemented, phis will introduce a lifetime in the same way as move_value.
71
-
//
72
-
// This walker is used to query basic lifetime attributes on values, such as "escaping" or "lexical". It must be precise for correctness and is performance critical.
29
+
/// Visit the introducers of a forwarded lifetime (Value -> LifetimeIntroducer).
30
+
///
31
+
/// A lifetime introducer produces an initial OSSA lifetime which may
32
+
/// be extended by forwarding instructions. The introducer is never
33
+
/// itself the result of a ForwardingInstruction. Example:
// This conveniently allows a closure to be called for each leaf use of a forward-extended lifetime. It should be called on a forward introducer provided by ForwardingDefUseWalker.introducer() or gatherLifetimeIntroducers().
237
-
//
238
-
// TODO: make the visitor non-escaping once Swift supports stored non-escaping closues.
256
+
/// This conveniently allows a closure to be called for each leaf use of a forward-extended lifetime. It should be called on a forward introducer provided by ForwardingDefUseWalker.introducer() or gatherLifetimeIntroducers().
257
+
///
258
+
/// TODO: make the visitor non-escaping once Swift supports stored non-escaping closues.
0 commit comments