Skip to content
Commits on Jan 12, 2013
Commits on Jan 11, 2013
Commits on Jan 4, 2013
  1. @castaway

    Hints file for android cross-compiling.

    castaway committed
    The hints file names for cross-compiling (currently) need to match the prefix of the cross-compiler used.
  2. @castaway
Commits on Jan 2, 2013
  1. @castaway
Commits on Dec 29, 2012
  1. @castaway

    Setup $^O to be the target os when building Core.

    castaway committed
    This allows the correct hints files to be loaded when building modules
  2. @castaway
  3. @castaway

    Stop using $run for anything other than testing compiled tests in Con…

    castaway committed
    …figure.
    
    (When cross-compiling we want to run miniperl etc on the compile host, not the test target)
  4. @castaway
  5. @castaway
  6. @castaway

    Revamp usecrosscompile section.

    castaway committed
    Use sysroot for libpath/incpath if set.
    Set to/from/run scripts if targethost is passed, regardless of whether we are cross compiling
  7. @castaway

    Rollback sysrootflag idea, add --sysroot to ccflags etc so that make …

    castaway committed
    …in ExtUtils::MakeMaker etc will use it
Commits on Nov 30, 2012
  1. @castaway

    Use the pure "sysroot" value from $Config to lookup sysroot path.

    castaway committed
    Useful in cross-compiling.
  2. @castaway

    Pass the --sysroot flag to the compiler, if -Dsysroot= is used.

    castaway committed
    This is a preparation step for better Cross-Compiling support.
  3. @castaway

    Introduce sysroot variable to Configure

    castaway committed
    This is borrowed from gcc and allows us to indicate the logical root
    directory for headers and libraries, under which all -I and -L are
    searched for. This patch adjusts Configure to search under $sysroot
    (if supplied) for headers and libraries, instead of /.
    
    $libsearchpth is also introduced to track the absolute paths of
    found libraries. $libpath continues to list the relative paths to
    pass to -L.
Commits on Nov 29, 2012
  1. Clear method caches when unwinding local *foo=sub{}

    Father Chrysostomos committed
    local *foo=sub{} is done in two stages:
    
    • First the local *foo localises the GP (the glob pointer, or list of
      slots), setting a flag on the GV.
    • Then scalar assignment sees the flag on the GV on the LHS and loca-
      lises a single slot.
    
    The slot localisation only stores on the savestack a pointer into the
    GP struct and the old value.  There is no reference to the GV.
    
    To restore a method properly, we have to have a reference to the GV
    when the slot localisation is undone.
    
    So in this commit I have added a new save type, SAVEt_GVSLOT.  It is
    like SAVEt_GENERIC_SV, except it pushes the GV as well.  Currently
    it is used only for CVs, but I will need it for HVs and maybe
    AVs as well.
    
    It is possible for the unwinding of the slot localisation to affect
    only a GV other than the one that is pushed, if glob assignments have
    taken place since the local *foo.  So we have to check whether the
    pointer is inside the GP and use PL_sub_generation++ if it is not.
  2. method_caching.t: Load test.pl at BEGIN time

    Father Chrysostomos committed
    This stops $::TODO from producing a used-only-once warning.
  3. Clear method caches when unwinding local *foo=*method

    Father Chrysostomos committed
    It was already working for those cases where *foo contained a sub
    before and after localisation.  For those cases where *foo had no sub
    but localised assignment gave it one, method caches were not being
    reset on scope exit.
    
    case SAVEt_GP in scope.c:leave_scope needs to look at both GPs (glob
    pointer, or list of glob slots), both from before and after the unlo-
    calisation.  If either has a sub, method caches need to be cleared.
    
    This does not yet fix local *foo = sub {}, but I added a to-do
    test for it.  (This is more complicated, as localisation happens in
    two seperate steps, the glob slot localisation storing no pointers to
    the glob itself on the savestack.)
  4. Fix two local *ISA bugs

    Father Chrysostomos committed
    These are regressions from 5.8.
    
    local *ISA was not updating isa caches. local *ISA = [] was updating
    caches, but scope unwinding was not.
    
    Both save_gp and leave_scope/SAVEt_GP need to check whether the glob
    is named ISA and call mro_isa_changed_in if appropriate.
  5. Don’t croak for local *DetachedStash::method

    Father Chrysostomos committed
    save_gp was trying to call mro_method_changed_in even if the stash had
    been detached.
    
    This is a regression from 5.12.
  6. Reset method caches when GPs are shared

    Father Chrysostomos committed
    The new MRO stuff in 5.10 made PL_sub_generation++ mostly unnecessary,
    and almost all uses of it were replaced with mro_method_changed_in.
    
    There is only one problem: That doesn’t actually work properly.  After
    glob-to-glob assignment (*foo = *bar), both globs share the same GP
    (glob pointer, or list of glob slots).  But there is no list of GVs
    associated with any GP.  So there is no way, given a GV whose GP
    is shared, to find out what other classes might need their method
    caches reset.
    
    sub B::b { "b" }
    *A::b = *B::b;
    @C::ISA = "A";
    print C->b, "\n";  # should print "b"
    eval 'sub B::b { "c" }';
    print C->b, "\n";  # should print "c"
    __END__
    
    $ perl5.8.9 foo
    b
    c
    $ perl5.10.0 foo
    b
    b
    
    And it continues up to 5.16.x.
    
    If a GP is shared, then those places where mro_method_changed_in is
    called after the GP has been modified must do PL_sub_generation++
    instead if the GP is shared, which can be detected through its refer-
    ence count.
  7. Fix two minor bugs with local glob assignment

    Father Chrysostomos committed
    These are combined into one patch because it is hard to fix one with-
    out fixing the other.
    
    local *glob = $ref was ignoring the clobbered reference and not
    accounting for when updating ISA caches, resulting in two bugs:
    
    *Foo::ISA = *Bar::ISA;
    @Foo::ISA = "Baz";
    sub Baz::ook { "Baz" }
    sub L::ook { "See" }
    warn Bar->ook;         # Baz
    local *Foo::ISA = ["L"];
    warn Bar->ook;         # Baz
    @Baz::ISA = @Baz::ISA; # should have no effect
    warn Bar->ook;         # See
    
    @Baz::ISA = "Foo::bar";
    sub Foo::bar::ber { 'baz' }
    sub UNIVERSAL::ber { "black sheep" }
    warn Baz->ber;         # baz
    local *Foo:: = \%Bar::;
    warn Baz->ber;         # baz
    @Baz::ISA = @Baz::ISA; # should have no effect
    warn Baz->ber;         # black sheep
    
    The dref variable in sv.c:S_glob_assign_ref holds the SV that needs to
    be freed.  So during localisation it is NULL.
    
    When I was fixing up isa and mro bugs in perl 5.14, I misunderstood
    its purpose and thought it always contained the reference on the left.
    
    Since we need to have access to what was assigned over after the
    assignment, this commit changes dref always to hold the clobbered SV,
    and makes the SvREFCNT_dec conditional.
  8. scope.c:save_gp: Remove redundant code

    Father Chrysostomos committed
    This has been redundant since ERRSV was changed to use GvSVn in com-
    mit f5fa903.
  9. Make isIDFIRST_uni() return identically as isIDFIRST_utf8()

    Karl Williamson committed
    These two macros should have the same results for the same input code
    points.  Prior to this patch, the _uni() macro returned the official
    Unicode ID_Start property, and the _utf8() macro returned Perl's
    slightly restricted definition.  Now both return Perl's.
  10. Remove double underscore in internal function name

    Karl Williamson committed
    This function was added in 5.16, and has no callers in CPAN.  It is
    undocumented and marked as changeable.  Its name has two underscores in
    a row by mistake.  This removes one of them.
  11. XS-APItest/t/handy.t: Turn off non_unicode warnings

    Karl Williamson committed
    Tests here use above-Unicode code points, so the warnings these might
    otherwise generate should be forced off.
  12. charnames: Check for enabled warnings before warning

    Karl Williamson committed
    This message should be suppressed if non_unicode warnings are turned
    off.
Commits on Nov 28, 2012
  1. mktables: Sort some outputs for repeatability

    Karl Williamson committed
    The recent change to random hash ordering caused some of the files
    output by mktables to vary from run to run.  Everything still worked.
    However, one of the ways I debug mktables is to make a change, and then
    compare the tables it generates with those from before the change.  That
    tells me the precise effect of the change.  That no longer works if the
    tables come out in random order from run to run.
    
    This patch just sorts certain things so that the tables are output in
    the same order each time.
  2. embed.fnc, mathoms.c: Add comments

    Karl Williamson committed
Commits on Nov 27, 2012
  1. perlapi: Don't mention internal function

    Karl Williamson committed
    This function is undocumented, and is for internal core use only.  Cause
    it to not be mentioned in perlapi
  2. [Merge] New COW mechanism

    Father Chrysostomos committed
    This branch makes string copying faster by introducing a new copy-on-
    write mechanism.  A reference count for the string buffer is now
    stored inside the string buffer itself.  This can be disabled with
    -Accflags=-DPERL_NO_COW.
    
    It also disables the PL_sawampersand mechanism, as copy-on-write
    can now be used for the pre-match ‘copy’, resulting in no slow-
    down from using $& and f(r)iends.  This can be reënabled with
    -Accflags=-DPERL_SAWAMPERSAND.
  3. Don’t share TARGs between recursive ops

    Father Chrysostomos committed
    I had to change the definition of IS_PADCONST to account for the
    SVf_IsCOW flag.  Previously, anything marked READONLY would be consid-
    ered a pad constant, to be shared by pads of different recursion lev-
    els.  Some of those READONLY things were not actually read-only, as
    they were copy-on-write scalars, which are never read-only.  So I
    changed the definition of IS_PADCONST in e3918bb to accept COWs
    as well as read-only scalars, since I was removing the READONLY flag
    from COWs.
    
    With the new copy-on-write scheme, it is easy for a TARG to turn into
    a COW.  If that happens and then the same subroutine calls itself
    recursively for the first time after that, pad_push will see that this
    is a pad ‘constant’ and allow the next recursion level to share it.
    
    If pp_concat calls itself recursively, the recursive call can modify
    the scalar the outer call is in the middle of using, causing the
    return value to be doubled up (‘tmptmp’) in the test case added here.
    
    Since pad constants are marked PADTMP (I would like to change that
    eventually), there is no way to distinguish them from TARGs when the
    are COWs, except for the fact that pad constants that are COWs are
    always shared hash keys (SvLEN==0).
  4. subst.t: Test something I nearly broke

    Father Chrysostomos committed
    The saving and restoring of $@ when utf8 tables were looked up was
    causing pp_subst’s string pointers to go stale.  The existing mechanism
    of copying it temporarily to another scalar was already very fragile,
    and the new COW mechanism broke it (but I fixed it in the same commit
    that introduced the new COW mechanism).
Something went wrong with that request. Please try again.