develooper Front page | perl.perl5.porters | Postings from March 2007

Re: [PATCH] MAD disable constant inlining

Thread Previous
From:
Gerard Goossen
Date:
March 21, 2007 13:34
Subject:
Re: [PATCH] MAD disable constant inlining
Message ID:
20070321203750.GG31539@ostwald
On Wed, Mar 21, 2007 at 07:15:23PM +0000, Nicholas Clark wrote:
> On Wed, Mar 21, 2007 at 07:42:08PM +0100, Gerard Goossen wrote:
> > The p55 translator replaced constants subs call with their values.
> > The patch disable constants inling when MAD is enabled. 
> 
> > -#endif
> > +#else
> >  			    goto its_constant;
> > +#endif
> >  			}
> >  		    }
> >  #ifdef PERL_MAD
> > @@ -5450,6 +5451,7 @@ Perl_yylex(pTHX)
> >  			Perl_warner(aTHX_ packWARN(WARN_AMBIGUOUS),
> >  				"Ambiguous use of -%s resolved as -&%s()",
> >  				PL_tokenbuf, PL_tokenbuf);
> > +#ifndef PERL_MAD
> >  		    /* Check for a constant sub */
> >  		    if ((sv = gv_const_sv(gv))) {
> >  		  its_constant:
> > @@ -5458,6 +5460,7 @@ Perl_yylex(pTHX)
> >  			yylval.opval->op_private = 0;
> >  			TOKEN(WORD);
> >  		    }
> > +#endif
> 
> Shouldn't these changes be conditional on PL_madskills instead?
> 
> I think as is, if you compile with PERL_MAD you're going to disable
> inlining come what may, whereas I thought that the intent of PL_madskills
> was that the "normal" behaviour (no PERL_MAD) was still the default, just
> now runtime switchable to storing all the madprops data.

Yes, I think you're right. I'll rewrite it to depend on PL_madskills instead.


Gerard Goossen


Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About