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

Re: Perl_peep (was Re: Perl_linklist)

Thread Previous | Thread Next
From:
Matt S Trout
Date:
December 6, 2008 09:04
Subject:
Re: Perl_peep (was Re: Perl_linklist)
Message ID:
20081206170408.GG21042@agaton.scsys.co.uk
On Wed, Dec 03, 2008 at 10:57:16PM +0100, Rafael Garcia-Suarez wrote:
> 2008/12/3 Matt S Trout <matt-p5p@trout.me.uk>:
> > I'd like to be able to do much of what the compiler is able to currently.
> >
> > I'm also aware that's a lot of API to maintain.
> >
> > But at the very least I think we should consider current CPAN usages to be
> > a baseline - "some sort of op creation callback" plus "a way to construct your
> > own optree (fragments) and turn them into something runnable" plus "a way to
> > run an optree fragment" - though I wouldn't horribly mind building a proper
> > CV and executing it normally, I worry about the performance for that when
> > trying to do clever things like building macros (also when writing keywords
> > that take an expr ala map/grep, rather than just ones that take a sub).
> 
> That's true. An optree constructed by hand is made "runnable" by
> linklist. Actually it's a good way to describe what linklist does.
> That would be a good argument to make linklist public.

Yeah, I suspect it is - especially given B::Generate currently duplicates
this logic in perl-space.

Seems like something that perhaps should not only be public but maybe in
the B::OP API so that people replacing the optimiser can call it easily?

-- 
      Matt S Trout       Need help with your Catalyst or DBIx::Class project?
   Technical Director                    http://www.shadowcat.co.uk/catalyst/
 Shadowcat Systems Ltd.  Want a managed development or deployment platform?
http://chainsawblues.vox.com/            http://www.shadowcat.co.uk/servers/

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