In perl.git, the branch blead has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/c7a622b32220ef59969124212598b6848bcaa247?hp=003900e275f0c45375d4d02ffb0ac0fcd2eacfa2>

- Log -----------------------------------------------------------------
commit c7a622b32220ef59969124212598b6848bcaa247
Author: Daniel Dragan <bul...@hotmail.com>
Date:   Wed Jul 15 21:59:58 2015 -0400

    combine PERLDB_LINE and PERLDB_SAVESRC flag tests
    
    On VC2003 32b -O1, the .text section of miniperl.exe decreased from
    0xAEFCD bytes of machine code to 0xAEF9D after this patch.
    
    see also
    http://www.nntp.perl.org/group/perl.perl5.porters/2015/07/msg229308.html
-----------------------------------------------------------------------

Summary of changes:
 gv.c     | 2 +-
 perl.h   | 2 ++
 pp_ctl.c | 6 +++---
 toke.c   | 8 ++++----
 4 files changed, 10 insertions(+), 8 deletions(-)

diff --git a/gv.c b/gv.c
index 242ea87..5d642af 100644
--- a/gv.c
+++ b/gv.c
@@ -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);
diff --git a/perl.h b/perl.h
index bcfeee9..9d57450 100644
--- a/perl.h
+++ b/perl.h
@@ -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
diff --git a/pp_ctl.c b/pp_ctl.c
index e6fdcf4..ad6efc1 100644
--- a/pp_ctl.c
+++ b/pp_ctl.c
@@ -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) {
diff --git a/toke.c b/toke.c
index 9a94f91..db82129 100644
--- a/toke.c
+++ b/toke.c
@@ -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;
                        }

--
Perl5 Master Repository

Reply via email to