In perl.git, the branch sprout/cvgv has been created

<http://perl5.git.perl.org/perl.git/commitdiff/ca0581ae9f7290a000ff72d8e22663934c597907?hp=0000000000000000000000000000000000000000>

        at  ca0581ae9f7290a000ff72d8e22663934c597907 (commit)

- Log -----------------------------------------------------------------
commit ca0581ae9f7290a000ff72d8e22663934c597907
Author: Father Chrysostomos <[email protected]>
Date:   Sat Sep 6 16:22:53 2014 -0700

    Tweak Peek.t
    
    beab08741 introduced XSUB constants, but the code it added to
    newATTRSUB does not set CvSTASH if there is already a CV stub.  It
    does set it if there is no sub there at all (because it goes through
    newCONSTSUB).
    
    Recent changes have made constant declarations like ‘sub foo(){}’
    put just a constant reference in the stash if possible, the way con-
    stant.pm does.  When this gets upgraded to a typeglob, the CV is rei-
    fied via newCONSTSUB, so it gets a CvSTASH pointer.
    
    CvSTASH on a constant sub really makes no difference in practice.
    It’s mostly cosmetic.
    
    This exercises the two code paths with the oldest perl installa-
    tion I have:
    
    $ /opt/bin/perl5.8.8 -MDevel::Peek -e 'BEGIN{\&foo} sub foo(){3} Dump \&foo'
    SV = RV(0x9baa18) at 0x98d580
      REFCNT = 1
      FLAGS = (TEMP,ROK)
      RV = 0x9b7398
      SV = PVCV(0x9b4810) at 0x9b7398
        REFCNT = 2
        FLAGS = (POK,pPOK,CONST)
        IV = 0
        NV = 0
        PROTOTYPE = ""
        COMP_STASH = 0x98d4a8   "main"          <----------
        ROOT = 0x0
        XSUB = 0x5bb44
        XSUBANY = 10018864
        GVGV::GV = 0x98df7c     "main" :: "foo"
        FILE = "-e"
        DEPTH = 0
        FLAGS = 0x200
        OUTSIDE_SEQ = 96
        PADLIST = 0x98e228
        PADNAME = 0x98e24c(0x0) PAD = 0x98e264(0x22d560)
        OUTSIDE = 0x98df34 (UNIQUE)
    $ /opt/bin/perl5.8.8 -MDevel::Peek -e 'sub foo(){3} Dump \&foo'
    SV = RV(0xc11018) at 0xbe3b80
      REFCNT = 1
      FLAGS = (TEMP,ROK)
      RV = 0xbe4570
      SV = PVCV(0xc0ae10) at 0xbe4570
        REFCNT = 2
        FLAGS = (POK,pPOK,CONST)
        IV = 0
        NV = 0
        PROTOTYPE = ""
        COMP_STASH = 0x0                <--------------------------
        ROOT = 0x0
        XSUB = 0x5bb44
        XSUBANY = 12469628
        GVGV::GV = 0xbe3c40     "main" :: "foo"
        FILE = "-e"
        DEPTH = 0
        FLAGS = 0x200
        OUTSIDE_SEQ = 0
        PADLIST = 0x0
        OUTSIDE = 0x0 (null)

M       ext/Devel-Peek/t/Peek.t

commit 96e46084dfaa86cfa6992364c3254e086a7cc96e
Author: Father Chrysostomos <[email protected]>
Date:   Sat Sep 6 13:09:05 2014 -0700

    Fix-ups for Attribute::Handlers
    
    It was making unreliable assumptions about the contents of stashes.

M       dist/Attribute-Handlers/lib/Attribute/Handlers.pm

commit 32378866fae2ef989895966c4a50dcda6ed45399
Author: Father Chrysostomos <[email protected]>
Date:   Sun Aug 31 18:05:49 2014 -0700

    sv.h: Expand comment about potential SVf_UTF8 conflict

M       sv.h

commit b8644391682c88cc8534b339ab1d64ae2b5d3e05
Author: Father Chrysostomos <[email protected]>
Date:   Sun Aug 31 20:13:21 2014 -0700

    Avoid creating GVs when subs are declared
    
    This patch changes ‘sub foo {...}’ declarations to store subroutine
    references in the stash, to save memory.
    
    Typeglobs still notionally exist.  Accessing CvGV(cv) will reify them.
    Hence, currently the savings are lost when a sub call is compiled.
    
    $ ./miniperl -e 'sub foo{} BEGIN { warn $::{foo} } foo(); BEGIN { warn 
$::{foo} }'
    CODE(0x7f8ef082ad98) at -e line 1.
    *main::foo at -e line 1.
    
    This optimisation is skipped if the subroutine declaration contains a
    package separator.
    
    Concerning the changes in caller.t, this code:
    
        sub foo { print +(caller(0))[3],"\n" }
        my $fooref = delete $::{foo};
        $fooref -> ();
    
    used to crash in 5.7.3 or thereabouts.  It was fixed by 16658 (aka
    07b8c804e8) to produce ‘(unknown)’ instead.  Then in 5.13.3 it was
    changed (by 803f274) to produce ‘main::__ANON__’ instead.  So the
    tests are really checking that we don’t get a crash.  I think it is
    acceptable that it has now changed to ‘main::foo’.

M       embed.fnc
M       gv.c
M       op.c
M       pp.c
M       proto.h
M       t/op/caller.t
M       t/op/gv.t
M       t/uni/gv.t
M       t/uni/parser.t
M       toke.c

commit 63bfeea2a456342187061e7a5117d1dcefcb436f
Author: Father Chrysostomos <[email protected]>
Date:   Sat Sep 6 22:51:15 2014 -0700

    Fix UTF8 bug in toke.c gv-handling code
    
    This code was added by 211a4342c, which was actually restoring some
    code that f74617600 removed.
    
    Its purpose is to expand a proxy to a real GV after we found out that
    we really are going to compile a sub call op.
    
    This code is actually unreachable at present (sub call lookup via
    rv2cv ops expands stub declarations, but not references to constants;
    references to constants are not compiled to sub calls), but will
    become reachable in the next commit, because sub references stored in
    the stash won’t expand via rv2cv lookup.

M       toke.c

commit 5b7104e2a5892732c4cd6778d273b1bf87879bed
Author: Father Chrysostomos <[email protected]>
Date:   Sat Aug 30 10:26:58 2014 -0700

    op.c: Calculate hash for CvNAME_HEK
    
    I assumed when I wrote that code that share_hek would calculate the
    hash, like most hash functions; but this internal function assumes
    the caller does it.
    
    Hence, CVs were not sharing their heks with other types of thingies
    that have heks.  A CV named foo and a GV named foo would cause two
    heks of the same name to be present in the shared string table.

M       op.c
M       pad.c

commit 8cee67dfbff4fb645012a0f1d59eb968bc6ea77a
Author: Father Chrysostomos <[email protected]>
Date:   Thu Aug 28 18:26:36 2014 -0700

    For lexical subs, reify CvGV from CvSTASH and CvNAME_HEK
    
    From now on, the presence of a name hek implies a GV.  Any access to
    CvGV will cause that implicit GV to be reified.

M       cv.h
M       embed.fnc
M       ext/B/t/b.t
M       gv.c
M       inline.h
M       op.c
M       pp_hot.c
M       proto.h

commit 89b34b210872251131c338e8c47e6ffb85e43e2a
Author: Father Chrysostomos <[email protected]>
Date:   Thu Aug 28 17:40:23 2014 -0700

    Increase $XS::APItest::VERSION to 0.64

M       ext/XS-APItest/APItest.pm

commit 73119bd68ec0d85092c2dadc70bc324015f01da1
Author: Father Chrysostomos <[email protected]>
Date:   Thu Aug 28 17:39:48 2014 -0700

    Test cv_name

M       MANIFEST
M       ext/XS-APItest/APItest.xs
A       ext/XS-APItest/t/cv_name.t

commit 5c7f103142504401fda21301c0838818018a4eb9
Author: Father Chrysostomos <[email protected]>
Date:   Thu Aug 28 16:03:22 2014 -0700

    pad.c: Document cv_name

M       pad.c

commit 7360e32be65974421ebe5e55160074fc2453fbb9
Author: Father Chrysostomos <[email protected]>
Date:   Thu Aug 28 15:59:05 2014 -0700

    sv_cathek
    
    This macro, intended for internal use, simplifies the code in
    a couple of places.

M       pad.c
M       sv.h
M       util.c

commit bf1bccf332e0b77ac214ad9d7b918c0adcd0dfc5
Author: Father Chrysostomos <[email protected]>
Date:   Thu Aug 28 15:56:30 2014 -0700

    cv_name
    
    An API function for getting the name of a CV.  Docs to follow.

M       embed.fnc
M       embed.h
M       pad.c
M       proto.h

commit 8805c9694f104e9c988ddc62cba0f2e7b7c18f68
Author: Father Chrysostomos <[email protected]>
Date:   Thu Aug 28 17:37:55 2014 -0700

    Turn on CVf_LEXICAL for lexical subs
    
    This flag will signify that lexical subs should not have package names
    associated with them in error messages, etc.

M       gv.c
M       op.c
M       pad.c
M       scope.c

commit d2315fc74da531f27cfa5735ed12f4fbc744ae28
Author: Father Chrysostomos <[email protected]>
Date:   Thu Aug 28 12:55:56 2014 -0700

    Add CVf_LEXICAL flag
    
    Lexical subs will use this instead of CvNAMED to indicate that the
    name should not include the package.

M       cv.h
-----------------------------------------------------------------------

--
Perl5 Master Repository

Reply via email to