>  What about having both the
> increment and decrement happen on g's side?  Is that possible, and if
> so, would it do any you any good with respect to optimizability?

Not really. The caller would have to give up its lease on the box as
it passes it to the callee (if you want to support tail calls). The
refcount might hit zero at this point, freeing the box. Also, the
opportunities for optimization are much slimmer here -- you're getting
the arguments out the blue, so there are no situations where you can
see that you're holding on the value in some other way, like there are
on the caller side.
_______________________________________________
Rust-dev mailing list
[email protected]
https://mail.mozilla.org/listinfo/rust-dev

Reply via email to