This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Re: [PATCH] MAD disable constant inlining
authorGerard Goossen <gerard@tty.nl>
Thu, 29 Mar 2007 17:31:32 +0000 (19:31 +0200)
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>
Tue, 3 Apr 2007 16:12:08 +0000 (16:12 +0000)
Message-ID: <20070329153132.GD20231@ostwald>

p4raw-id: //depot/perl@30837

toke.c

diff --git a/toke.c b/toke.c
index d11cdcc..f8e11c9 100644 (file)
--- a/toke.c
+++ b/toke.c
@@ -5421,8 +5421,9 @@ Perl_yylex(pTHX)
                                    PL_nextwhite = 0;
                                }
                            }
+                           else
 #endif
-                           goto its_constant;
+                               goto its_constant;
                        }
                    }
 #ifdef PERL_MAD
@@ -5469,7 +5470,7 @@ Perl_yylex(pTHX)
                                "Ambiguous use of -%s resolved as -&%s()",
                                PL_tokenbuf, PL_tokenbuf);
                    /* Check for a constant sub */
-                   if ((sv = gv_const_sv(gv))) {
+                   if ((sv = gv_const_sv(gv)) && !PL_madskills) {
                  its_constant:
                        SvREFCNT_dec(((SVOP*)yylval.opval)->op_sv);
                        ((SVOP*)yylval.opval)->op_sv = SvREFCNT_inc_simple(sv);