It would be nice if there was an attribute for expressing the wish that a function be tail call optimised (like Scala), It's otherwise hard to rely on tail calls if they don't work in the general case (and I'm assuming LLVM doesn't support general tail calls).
On 10 April 2013 17:32, Patrick Walton <[email protected]> wrote: > On 4/10/13 5:43 AM, Artella Coding wrote: > >> Hi does rust do tail call optimization? The reason I am asking is that >> the following tail call recursive implementation results in a stack >> overflow. Thanks. >> > > Not in the general case. But the WIP patch I have to use the machine > return value may allow LLVM to optimize that function into a loop. > > Patrick > > ______________________________**_________________ > Rust-dev mailing list > [email protected] > https://mail.mozilla.org/**listinfo/rust-dev<https://mail.mozilla.org/listinfo/rust-dev> >
_______________________________________________ Rust-dev mailing list [email protected] https://mail.mozilla.org/listinfo/rust-dev
