On 12-04-15 06:23 PM, Joe Groff wrote:
> On Sun, Apr 15, 2012 at 6:19 PM, Patrick Walton <pwal...@mozilla.com> wrote:
>> Only if LLVM's optimizer is smart enough to turn that code into a goto-based
>> state machine. I'm not sure if it is. (Of course, if it's not, that's
>> possibly fixable...)
> 
> IIRC there was talk of adding explicit tail calls to the language a
> while back. Did that get shot down?

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.

-Graydon

[1] https://github.com/mozilla/rust/issues/217
_______________________________________________
Rust-dev mailing list
Rust-dev@mozilla.org
https://mail.mozilla.org/listinfo/rust-dev

Reply via email to