In perl.git, the branch blead has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/5513c2cfd695ea6a900a29be8b479bea61614429?hp=db6e00bd00dae7b918216c69bd58fe860e640276>

- Log -----------------------------------------------------------------
commit 5513c2cfd695ea6a900a29be8b479bea61614429
Author: Daniel Dragan <[email protected]>
Date:   Sat Nov 8 00:48:58 2014 -0500

    optimize Perl_boot_core_UNIVERSAL and Perl_nextargv
    
    Perl_nextargv fuse 2 tests into 1
    
    Perl_boot_core_UNIVERSAL reorder instructions to avoid using a non-vol
    registers (save cv across the Safefree), not reread CV body * after
    Safefree. Compute address of CvFILE once.
    
    for Perl_boot_core_UNIVERSAL on VC 2003 before 0x66 bytes of 32 bit x86
    machine code, after 0x61.
-----------------------------------------------------------------------

Summary of changes:
 doio.c      | 2 +-
 universal.c | 6 ++++--
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/doio.c b/doio.c
index 6087612..b84a14a 100644
--- a/doio.c
+++ b/doio.c
@@ -806,7 +806,7 @@ Perl_nextargv(pTHX_ GV *gv, bool nomagicopen)
 
     if (!PL_argvoutgv)
        PL_argvoutgv = gv_fetchpvs("ARGVOUT", GV_ADD|GV_NOTQUAL, SVt_PVIO);
-    if (io && (IoFLAGS(io) & IOf_ARGV) && (IoFLAGS(io) & IOf_START)) {
+    if (io && (IoFLAGS(io) & (IOf_ARGV|IOf_START)) == (IOf_ARGV|IOf_START)) {
        IoFLAGS(io) &= ~IOf_START;
        if (PL_inplace) {
            assert(PL_defoutgv);
diff --git a/universal.c b/universal.c
index 94169a6..e1e1a0b 100644
--- a/universal.c
+++ b/universal.c
@@ -1049,9 +1049,11 @@ Perl_boot_core_UNIVERSAL(pTHX)
     {
        CV * const cv =
            newCONSTSUB(get_hv("Regexp::", GV_ADD), "DESTROY", NULL);
-       Safefree(CvFILE(cv));
-       CvFILE(cv) = (char *)file;
+       char ** cvfile = &CvFILE(cv);
+       char * oldfile = *cvfile;
        CvDYNFILE_off(cv);
+       *cvfile = (char *)file;
+       Safefree(oldfile);
     }
 }
 

--
Perl5 Master Repository

Reply via email to