On 04/15/2012 06:17 PM, Sebastian Sylvan wrote:
Could tail calls work? I.e. each "label" would equal a separate
function (any state would have to be passed through), and then you'd
just keep tail-calling from state to state. Without really knowing
exactly what kind of code you're trying to generate, this seems like
it might be workable.

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...)

Patrick
_______________________________________________
Rust-dev mailing list
[email protected]
https://mail.mozilla.org/listinfo/rust-dev

Reply via email to