On 12-04-16 11:49 AM, Patrick Walton wrote:
> On 4/16/12 11:46 AM, Graydon Hoare wrote:
>> They're already "present" (were from the beginning) but they broke when
>> we shifted from rustboot (hand-rolled code generator) to rustc (LLVM).
>> It turns out that you have to adopt a somewhat pessimistic ABI in all
>> cases if your functions are to be tail-callable. There's a bug open on
>> this[1] that discusses in some more detail, but I think the feature is
>> drifting towards a decision to remove the feature altogether.
> 
> I actually disagree with this; I think that we should measure. I'm not
> sure that the Pascal calling convention is worse than the C calling
> convention in practice.
> 
> In any case, I believe we're doing sibling call optimization already.

Ok! I certainly don't _dislike_ tail calls (put them in intentionally),
I just thought the mood had mostly soured on them due to the assumed
perf overhead. I'm happy to dig further and try to get this working again.

(They also interact with borrowing rules and alias analysis -- the
caller frame may not exist -- but it's probably tractable to express
that in terms of region constraints a tail-caller must make sure to satisfy)

-Graydon
_______________________________________________
Rust-dev mailing list
Rust-dev@mozilla.org
https://mail.mozilla.org/listinfo/rust-dev

Reply via email to