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

Re: For 5.12: tail calls for methods

Thread Previous | Thread Next
From:
Nicholas Clark
Date:
January 22, 2008 23:08
Subject:
Re: For 5.12: tail calls for methods
Message ID:
20080123070801.GV23703@plum.flirble.org
On Tue, Jan 22, 2008 at 01:54:39PM -0700, Jim Cromie wrote:

> IIUC,  CUSTOM_OPS work originally envisioned finding OP-pairs which 
> occur with hi-frequency
> and mashing the 2 PP-bodies together, removing some of the boiler-plate 
> in the process. 
> This pair; entersub,leavesub looks like a good candidate for a tail-call 
> custom op.
> 
> If this OP can be sanely defined (and thats not obvious), finding and 
> replacing the
> enter-leave pairs looks practical to add to Perl_peep.  (modulo usual 
> caveats)
> Its worth noting that optimizer / B-Generate could also "pimp-my-optree" 
> in this way,
> once the PP_TAILCALL is written.

I think that the intent was also that these custom ops could be written as
XS modules without needing to touch the code. That would make an excellent
way to prototype it.

What doesn't yet work in that plan?

Nicholas Clark

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