From 5c49e90fd624f3ab1cdb1f1d8e4f0525d7881b99 Mon Sep 17 00:00:00 2001 From: Father Chrysostomos Date: Thu, 30 Aug 2012 13:34:14 -0700 Subject: [PATCH] toke.c: PL_in_eval purge Many uses of PL_in_eval in toke.c are redundant. PL_in_eval indicates not that we are parsing a string eval, but that we are being called from an eval, whether stringy on not. Even if PL_in_eval were only for string eval, it would still not indicate that we are parsing a string eval, because of eval 'require'. This commit removes redundant uses of it (making things theoretically slightly faster). --- toke.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/toke.c b/toke.c index ba7b920..c9384d2 100644 --- a/toke.c +++ b/toke.c @@ -5250,8 +5250,8 @@ Perl_yylex(pTHX) PL_faketokens = 0; #endif if (PL_lex_state != LEX_NORMAL || - (PL_in_eval && !PL_rsfp && !PL_parser->filtered)) { - if (*s == '#' && s == PL_linestart && PL_in_eval + (!PL_rsfp && !PL_parser->filtered)) { + if (*s == '#' && s == PL_linestart && !PL_rsfp && !PL_parser->filtered) { /* handle eval qq[#line 1 "foo"\n ...] */ CopLINE_dec(PL_curcop); @@ -5259,7 +5259,7 @@ Perl_yylex(pTHX) } if (PL_madskills && !PL_lex_formbrack && !PL_in_eval) { s = SKIPSPACE0(s); - if (!PL_in_eval || PL_rsfp || PL_parser->filtered) + if (PL_rsfp || PL_parser->filtered) incline(s); } else { @@ -6039,7 +6039,7 @@ Perl_yylex(pTHX) if (PL_expect == XSTATE && isALPHA(tmp) && (s == PL_linestart+1 || s[-2] == '\n') ) { - if ((PL_in_eval && !PL_rsfp && !PL_parser->filtered) + if ((!PL_rsfp && !PL_parser->filtered) || PL_lex_state != LEX_NORMAL) { d = PL_bufend; while (s < d) { -- 2.7.4