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
I think my preference would be to extend the & operator with a defer "attribute:"
x = #[defer] &foo;
As a pre-pass to the processing, we would compute the "deferred region" R_D by looking for the next use of x. The 'loans in scope' would then create two loan entries, one for the main loan, and one for the same point that is deferred. We would give the deferred loan the region R_D; the main loans would be generated at the first-uses (i.e., as we exit the region R_D).
We then have to modify also the pass which checks that each action is legal: in particular, issuing a loan when there is a deferred region in scope is only legal if the lifetime of the loan is a subset of the deferred region R_D.
The text was updated successfully, but these errors were encountered:
I think my preference would be to extend the
&
operator with a defer "attribute:"As a pre-pass to the processing, we would compute the "deferred region"
R_D
by looking for the next use ofx
. The 'loans in scope' would then create two loan entries, one for the main loan, and one for the same point that is deferred. We would give the deferred loan the regionR_D
; the main loans would be generated at the first-uses (i.e., as we exit the regionR_D
).We then have to modify also the pass which checks that each action is legal: in particular, issuing a loan when there is a deferred region in scope is only legal if the lifetime of the loan is a subset of the deferred region
R_D
.The text was updated successfully, but these errors were encountered: