Michal Wallace <[EMAIL PROTECTED]> wrote: > On Sun, 10 Aug 2003, Leopold Toetsch wrote:
>> Piers Cawley <[EMAIL PROTECTED]> wrote: >> > If and only if that's not a tail call of course. >> >> Good point. But I can imagine, that's by far more simple to detect tail >> calls at the AST level > Well, if you write it, I'll have pirate inspect the AST > and try it out for you. :) I have checked in a first attempt to do tail call optimizations. I don't know yet, when its safe or not to perform this optimization and if a rather simple test like now may detect all these cases. So for now, $HL could append a comment "#tail_call" after the prototyped specifier of the sub call. Then we can compare the debug output of $ parrot -Oc -d60 x.imc if both would do a tail call or not. > Sincerely, > > Michal J Wallace leo