develooper Front page | perl.perl5.porters | Postings from January 2008

Re: For 5.12: tail calls for methods

Thread Previous | Thread Next
From:
Stevan Little
Date:
January 18, 2008 07:16
Subject:
Re: For 5.12: tail calls for methods
Message ID:
33C68E9B-BD4E-4978-8C52-388BF2BB23BD@iinteractive.com

On Jan 18, 2008, at 6:53 AM, Dave Mitchell wrote:

> On Thu, Jan 17, 2008 at 01:46:50PM -0500, Stevan Little wrote:
>>> And how do you want to detect that?
>>
>> Simple, if the last call is to the same function, then it tail- 
>> recurses.
>
> That implies adding an extra test into every sub call, which we try to
> make as fast as possible.

Actually I would suspect this is something that can be flagged during  
the compilation of the sub. Of course I know little about perl-guts  
so I may be totally off here, but it seems to me that is /should/ be  
possible anyway.

- Stevan

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About