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

Re: For 5.12: tail calls for methods

Thread Previous | Thread Next
From:
Dave Mitchell
Date:
January 18, 2008 10:55
Subject:
Re: For 5.12: tail calls for methods
Message ID:
20080118185508.GG5335@iabyn.com
On Fri, Jan 18, 2008 at 07:58:39AM -0600, Chris Prather wrote:
> That implies that a simple check[1] to eliminate "Deep Recursion  
> in ... " should be sacrificed to the gods of speed.
> 
> -Chris
> 
> [1]: I assume that this is simple since we should already have the  
> frame information available for caller() to work.

The information is currently only available by an expensive search up the
context stack (skipping blocks, loops etc) until the nearest sub context
is found.

We would probably need a new per-interpreter var that records the current
sub, and whose old value is saved on the context stack and restored on
each sub exit. More straw, as Nicholas says, on the camel's back.

-- 
Fire extinguisher (n) a device for holding open fire doors.

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