diff options
-rw-r--r-- | gv.c | 2 | ||||
-rw-r--r-- | perl.h | 2 | ||||
-rw-r--r-- | pp_ctl.c | 6 | ||||
-rw-r--r-- | toke.c | 8 |
4 files changed, 10 insertions, 8 deletions
@@ -129,7 +129,7 @@ Perl_gv_fetchfile_flags(pTHX_ const char *const name, const STRLEN namelen, sv_setpvn(GvSV(gv), name, namelen); #endif } - if ((PERLDB_LINE || PERLDB_SAVESRC) && !GvAV(gv)) + if (PERLDB_LINE_OR_SAVESRC && !GvAV(gv)) hv_magic(GvHVn(gv), GvAVn(gv), PERL_MAGIC_dbfile); if (tmpbuf != smallbuf) Safefree(tmpbuf); @@ -5767,6 +5767,8 @@ typedef struct am_table_short AMTS; #define PERLDB_SAVESRC_NOSUBS (PL_perldb & PERLDBf_SAVESRC_NOSUBS) #define PERLDB_SAVESRC_INVALID (PL_perldb & PERLDBf_SAVESRC_INVALID) +#define PERLDB_LINE_OR_SAVESRC (PL_perldb & (PERLDBf_LINE | PERLDBf_SAVESRC)) + #ifdef USE_LOCALE /* These locale things are all subject to change */ /* Returns TRUE if the plain locale pragma without a parameter is in effect @@ -4181,7 +4181,7 @@ PP(pp_entereval) /* prepare to compile string */ - if ((PERLDB_LINE || PERLDB_SAVESRC) && PL_curstash != PL_debstash) + if (PERLDB_LINE_OR_SAVESRC && PL_curstash != PL_debstash) save_lines(CopFILEAV(&PL_compiling), PL_parser->linestr); else { /* XXX For C<eval "...">s within BEGIN {} blocks, this ends up @@ -4198,7 +4198,7 @@ PP(pp_entereval) if (doeval(gimme, runcv, seq, saved_hh)) { if (was != PL_breakable_sub_gen /* Some subs defined here. */ - ? (PERLDB_LINE || PERLDB_SAVESRC) + ? PERLDB_LINE_OR_SAVESRC : PERLDB_SAVESRC_NOSUBS) { /* Retain the filegv we created. */ } else if (!saved_delete) { @@ -4210,7 +4210,7 @@ PP(pp_entereval) /* We have already left the scope set up earlier thanks to the LEAVE in doeval(). */ if (was != PL_breakable_sub_gen /* Some subs defined here. */ - ? (PERLDB_LINE || PERLDB_SAVESRC) + ? PERLDB_LINE_OR_SAVESRC : PERLDB_SAVESRC_INVALID) { /* Retain the filegv we created. */ } else if (!saved_delete) { @@ -1338,7 +1338,7 @@ Perl_lex_next_chunk(pTHX_ U32 flags) CopLINE_set(PL_curcop, PL_parser->preambling + 1); PL_parser->preambling = NOLINE; } - if (got_some_for_debugger && (PERLDB_LINE || PERLDB_SAVESRC) && + if (got_some_for_debugger && PERLDB_LINE_OR_SAVESRC && PL_curstash != PL_debstash) { /* debugger active and we're not compiling the debugger code, * so store the line into the debugger's array of lines @@ -4735,7 +4735,7 @@ Perl_yylex(pTHX) PL_oldoldbufptr = PL_oldbufptr = s = PL_linestart = SvPVX(PL_linestr); PL_bufend = SvPVX(PL_linestr) + SvCUR(PL_linestr); PL_last_lop = PL_last_uni = NULL; - if ((PERLDB_LINE || PERLDB_SAVESRC) && PL_curstash != PL_debstash) + if (PERLDB_LINE_OR_SAVESRC && PL_curstash != PL_debstash) update_debugger_info(PL_linestr, NULL, 0); goto retry; } @@ -4969,7 +4969,7 @@ Perl_yylex(pTHX) } while (argc && argv[0][0] == '-' && argv[0][1]); init_argv_symbols(argc,argv); } - if (((PERLDB_LINE || PERLDB_SAVESRC) && !oldpdb) || + if ((PERLDB_LINE_OR_SAVESRC && !oldpdb) || ((PL_minus_n || PL_minus_p) && !(oldn || oldp))) /* if we have already added "LINE: while (<>) {", we must not do it again */ @@ -4979,7 +4979,7 @@ Perl_yylex(pTHX) PL_bufend = SvPVX(PL_linestr) + SvCUR(PL_linestr); PL_last_lop = PL_last_uni = NULL; PL_preambled = FALSE; - if (PERLDB_LINE || PERLDB_SAVESRC) + if (PERLDB_LINE_OR_SAVESRC) (void)gv_fetchfile(PL_origfilename); goto retry; } |