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

Re: For 5.12: tail calls for methods

Thread Previous | Thread Next
From:
Reini Urban
Date:
November 19, 2008 07:34
Subject:
Re: For 5.12: tail calls for methods
Message ID:
6910a60811190733x7c742636xe0bcd979c578cecf@mail.gmail.com
2008/1/23 Nicholas Clark <nick@ccl4.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?

The name.

I think of use tailcall as lexical pragma to enable/disable that
feature at first.
Just a simple xs module, similar to optimizer.
I just started with tailcall-0.01, but will not much time to do it.
We'll see. Next week I'm back from my endless service intervention.

If that works fine we can move the code to peep() into core.
-- 
Reini Urban
http://phpwiki.org/              http://murbreak.at/

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