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

Re: Perl_linklist (was Re: modules on CPAN defining PERL_CORE)

Thread Previous | Thread Next
Nicholas Clark
November 26, 2008 03:41
Re: Perl_linklist (was Re: modules on CPAN defining PERL_CORE)
Message ID:
On Wed, Nov 26, 2008 at 12:34:13PM +0100, Rafael Garcia-Suarez wrote:
> 2008/11/26 Nicholas Clark <>:

> Hmm. After compilation, that only returns op_next, the next op to be
> executed. During compilation, if op_next isn't set yet, it figures out
> which op comes next and stores it in op_next.
> > Which then makes me wonder whether any of these *should* also be declared
> > public:
> >
> > p       |OP*    |sawparens      |NULLOK OP* o
> > p       |OP*    |scalar         |NULLOK OP* o
> > p       |OP*    |scalarkids     |NULLOK OP* o
> > p       |OP*    |scalarseq      |NULLOK OP* o
> > p       |OP*    |scalarvoid     |NN OP* o
> >
> > And all the rest can be made static, which may cause the trivial ones to be
> > inlined. (Which isn't terrible)
> sawparens is really really short. It could be made static in the hope
> the compiler will inline it.

It's also used in perly.y, and it's called with a parameters that have side
effects. (Yes, I'd been trying this before I got your message)
I can't see a way to either make it static, or to make a macro that does it.

> The various Perl_scalar* functions manipulate the optree being
> constructed. I think they should go static too. They certainly should
> not be made public.


Nicholas Clark

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About