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

Re: For 5.12: tail calls for methods

Thread Previous | Thread Next
Nicholas Clark
January 22, 2008 23:08
Re: For 5.12: tail calls for methods
Message ID:
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 Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About