Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Branch: typed/av
Commits on Jun 6, 2014
  1. WIP parse sized arrays. use feature "sized_arrays"; my @a[20];

    authored
    there is no number-only token yet, needed for the const part.
    WIP
  2. run-time part of sized arrays. my @a[20];

    authored
    sized arrays cannot grow beyond the declared size and cannot be magic.
    The declared size is always equal to the actual size, the array is pre-filled
    with undef.
    thus sized arrays are faster to access at run-time than aelemfast (constant indices),
    but this name is already taken.
    
    add 2 new ops: aelemsize_const for constant indices, similar to aelemfast_lex
    and aelemsize for variable indices.
    constant indices are already compile-time checked, there is no need to
    bounds-check and check magic at run-time.
    
    access to non-existing indices result in a die with PL_no_aelem.
    these can be yet unassigned indices or indices beyond the declared size.
    
    negative indices for constants are resolved at compile-time, as the
    actual size is already known then, so we can omit the check for negative indices
    at run-time.
    Instead of being pre-filled with &PL_sv_undef we could imagine dying on access
    on an unassigned index.
    
    Without AELEMSIZE_RT_NEGATIVE the declared size is always equal to the actual size.
    To allow the actual size (AvFILL) deviate from the declared size (AvMAX)
    but this causes a slower run-time access for constant indices. (percent?)
    
    Bump Opcodes to 1.28 for the 2 new ops in tag :base_core
Commits on Jun 5, 2014
  1. support faster make -s

    authored
    Skip chdir messages by passing make -s through
    Also silence make_ext.pl to speed up the build process. use -v or --verbose
  2. @rjbs

    update release schedule

    rjbs authored
  3. @khwilliamson

    t/run/locale.t: Remove unnecessary setlocales()

    khwilliamson authored
    The locale is supposed to be passed in via the environment.  There is no
    need to also set it explicitly.
  4. @khwilliamson

    Fix Windows ctype functions

    khwilliamson authored
    Windows doesn't follow the Posix standard for their functions like
    isalnum(), isdigit(), etc.  This forces compliance by changing the
    macros that are the interfaces to those functions to be smarter than
    just calling the raw functions.
  5. @khwilliamson

    Revert "PATCH: [perl #119499] "$!" with UTF-8 flag"

    khwilliamson authored
    This reverts commit b17e32e.
    
    With this commit, the stringification of $! will have the UTF-8 flag set
    when the text is actually non-ASCII UTF-8.  The reverted commit itself
    reverted code that was to fix bugs with this discrepancy of the UTF-8
    flag, but which caused backward-compatibility problems with existing
    code.
    
    Several things have happened in the interim which allows us to
    experimentally resotre the previously reverted changes.  One is that
    this is early in the 5.21 cycle, and we have plenty of time to see what
    negative consequences this may cause.  Two is that the returned text
    will only be in UTF-8 if the stringification happens within the scope of
    'use locale'.  This means that the negative effects won't happen for
    code, like ack, that is otherwise locale unaware.  Third, the 'locale'
    pragma has been enhanced to allow the program to only have locale
    awareness of LC_MESSAGES.
    
    Code that needs to continue the 5.20 and earlier behavior can do the
    stringification within the scopes of both 'use bytes' and 'use locale
    ":messages".  No other Perl operations will be affected by locale; only
    $! and $^E stringification.  The 'bytes' pragma causes the UTF-8 flag to
    not be set, just as in previous Perl releases.
  6. @khwilliamson

    Use C locale for "$!" ouside 'use locale' scope

    khwilliamson authored
    The stringification of $! has long been an outlier in Perl locale
    handling.  The theory has been that these operating system messages are
    likely to be of use to the final user, and should be in their language.
    Things like
        No space left on device
        Can't fork
    are not something the program is likely to handle, but could be
    meaningfully helpful to the end-user.
    
    There are problems with this though.  One is that many perl messages are
    in English, with the $! appended to them, so that the resultant message
    is of mixed language, and may need to be translated anyway.  Things like
        No space left on device
    probably won't need the remaining portion of the message to give someone
    a clear indication as to what's wrong.  But there are many other
    messages where both the OS error and the Perl error would be needed
    togther to understand the problem.  An on-line translation tool can be
    used to do this.
    
    Another problem is that it can lead to garbage coming out on the user's
    terminal when the program is not expecting UTF-8, but the underlying
    locale is UTF-8.  This is what happens in Bug #112208, and another that
    was merged with it.  It's a lot harder to translate mojibake via an
    online tool than English.
    
    This commit solves that by using the C locale for messages, except
    within the scope of 'use locale'.  It is extremely likely that the
    messages in the C locale will be English, but if not they will be ASCII,
    and there will be no garbage printed.  A program that says "use locale"
    is indicating that it has the intelligence necessary to deal with
    locales.
  7. @khwilliamson

    Data::Dumper: Fix wrong #if

    khwilliamson authored
    The code being conditionally compiled is for LC_COLLATE, not LC_NUMERIC
  8. @khwilliamson

    Add parameters to "use locale"

    khwilliamson authored
    This commit allows one to specify to enable locale-awareness for only a
    specified subset of the locale categories.  Thus you could make a
    section of code LC_MESSAGES aware, with no locale-awareness for the
    other categories.
  9. @khwilliamson

    numeric.c: Remove unnecessary test

    khwilliamson authored
    The second test won't be true unless the first one is (but not vice
    versa), so no need to test the first.
  10. @khwilliamson

    op.c: Use macro instead of its expansion

    khwilliamson authored
    It's better to use a pre-defined macro when available.  This isn't quite
    the same, as the macro is valid for both run-time and compile-time and
    the code is only compile-time.  In the unlikely event that  this were
    ever to be found to be other than negligible, a compile-time-only
    version of the macro could be created.
  11. @khwilliamson

    Allow dynamic lock of LC_NUMERIC

    khwilliamson authored
    When processing version strings, the radix character must be a dot even
    if we otherwise would be using some other character.  vutil.c
    upg_version() changes to the dot, but calls sv_catpvf() which may try to
    change the character to something else.  This commit introduces a way to
    lock the character to a dot around the call to sv_catpvf()
    
    vutil.c is cpan-upstream, but already blead and cpan have diverged, so
    this just updates the SHA of the new version
  12. @khwilliamson

    Fix up LC_NUMERIC wrap macros

    khwilliamson authored
    perl.h has some macros used to manipulate the locale exposed for the
    category LC_NUMERIC.  These are currently undocumented, but will need to
    be documented as the development of 5.21 progresses.  This fixes these
    up in several ways:
    
    The tests for if we are in the correct state are made into macros.  This
    is in preparation for the next commit, which will make one of them more
    complicated, and so that complication will only have to be in one place.
    
    The variable declared by them is renamed to be preceded by an
    underscore.  It is dangerous practice to have a name used in a macro, as
    it could conflict with a name used by outside code.  This alleviates it
    somewhat by making it even less likely to conflict.  This will have to
    be revisited when some of these macros are made part of the public API.
    
    The tests to see if things need to change are reversed.  Previously we
    said we need to change to standard, for example, if the variable for
    'local' is set.  But both can be true at the same time if the underlying
    locale is C.  In this case, we only need to change if we aren't in
    standard.  Whether that is also local is irrelevant.
  13. @khwilliamson

    Keep LC_NUMERIC in C locale, except for brief periods

    khwilliamson authored
    This is for XS modules, so they don't have to worry about the radix
    being a non-dot.  When the locale needs to be in the underlying one, the
    operation should be wrapped using macros for the purpose.  That API may
    change as we gain experience in 5.21, so I'm not including it now.
  14. @khwilliamson

    numeric.c: White-space only

    khwilliamson authored
    The previous commit added a block around this code, so indent
    correspondingly.
  15. @khwilliamson

    Make sure locale set right for radix parsing

    khwilliamson authored
    I haven't found a test case this fails for in v5.20, but I'm sure there
    is one.  But two commits from now would fail if this wasn't done.
  16. @khwilliamson
  17. @khwilliamson

    Avoid locale function overhead

    khwilliamson authored
    For the LC_NUMERIC locale category, one can swap between setlocale being
    to "C" or to the underlying locale.  Perl keeps track of the state
    using two boolean variables.  By testing these before calling the swap
    functions, we can skip calling them if the current state is the one we
    want to be in, and avoid the function call overhead, as the function
    becomes a no-op if the current state is the desired one.
  18. @khwilliamson

    'use locale' no longer ever fails.to compile

    khwilliamson authored
    Thus we can skip the machinations we used to do to make sure things
    compiled.
  19. @khwilliamson

    Set utf8 flag properly in localeconv

    khwilliamson authored
     Rare, but not unheard of, is for the strings returned by localeconv to
     be in UTF-8.  This commit looks for and sets the UTF-8 flag if they are.
     so encoded.
    
     A private function had to changed from static for this.  It is renamed
     to begin with an underscore to emphasize its private nature.
  20. @khwilliamson

    Exclude undefined hash elements from localeconv()

    khwilliamson authored
    A given platform may not have all the localeconv elements available, or
    Perl may be compiled to not use them.  Don't define hash elements for
    the missing ones.
  21. @khwilliamson

    Swap #if sense for localeconv()

    khwilliamson authored
    When the else clause is trivial, and the if clause is long, It's far easier to understand if they're swapped
    so the short clause and the else are right after the if.
  22. @khwilliamson

    Localeconv() should be independent of 'use locale'

    khwilliamson authored
    localeconv() should return the values for the underlying locale of
    the program regardless of whether the calling place is within the
    scope of "use locale" or not.  Otherwise, it makes no sense to call it
    from outside such scope, and a pure perl module that calls it on behalf
    of a caller would likely get it wrong.
    
    In earlier versions of Perl the LC_NUMERIC category was initialized to
    C, but was changed by the first setlocale() anywhere in the process.  It
    is rare to call localeconv() without first having done a setlocale().
    But to solve other bugs, future commits will keep LC_NUMERIC in the C
    locale except during such operations where it should be the underlying
    locale.  localeconv() is such a place, so this commit is being done
    before the later ones so it doesn't break.
  23. @khwilliamson

    perl.h: Move #if

    khwilliamson authored
    Some of the things in its scope should be defined even if we don't want
    to use LC_NUMERIC.  That there have been no reports of compilation
    failures from the field indicates that the Configure to exclude it
    hasn't been used.
  24. @bingos

    Update Scalar-List-Utils to CPAN version 1.39

    bingos authored
      [DELTA]
    
    1.39 -- 2014/06/05 15:54:59
      [CHANGES]
       * Have pairs() return blessed objects that recognise ->key and
         ->value as well as being two-element ARRAYs
       * Booleanise the result of looks_like_number() so as not to
         accidentally leak abstraction (RT94806)
       * Document the version each function was added in (RT96220)
    
      [BUGFIXES]
       * Try to preserve UV precision in sum() where possible (RT95902)
       * Document known lexical capture in pairmap bug RT95409
       * SvGETMAGIC() in set_prototype() (RT72080)
  25. @iabyn

    when unCOWing a string, set SvCUR to 0

    iabyn authored
    When a COW string is unCOWed, as well as setting SvPVX to NULL and SvLEN
    to 0, set SvCUR to 0 too.
    
    This is to avoid a later SvGROW on the same using the old SvCUR() value
    to calculate a roundup to the buffer size.
    
    Consider the following code:
    
        use Devel::Peek;
        for (1..3) {
            my $t;
            my $s = 'x' x 100;
            $t = $s;
            Dump $s;
        }
    
    Looking at the LEN line of the Dump output, we got on 5.20.0:
    
      LEN = 102
      LEN = 135
      LEN = 135
    
    and after this commit,
    
      LEN = 102
      LEN = 102
      LEN = 102
    
    As well as wasting space, this extra LEN was then triggering the 'skip COW
    if LEN >> CUR' mechanism, causing extra copies. See:
    
        [perl #121977] COWification seems expensive in PADMY variables
  26. @Tux
  27. @Tux
  28. @Tux

    undoubled bad quoting

    Tux authored
  29. @Tux @demerphq

    Probe for working wcscmp and wcsxfrm

    Tux authored demerphq committed
  30. @jhi
Commits on Jun 4, 2014
  1. @jkeenan
  2. @Tux
  3. @ilmari @tonycoz

    Disallow omitting % and @ on hash and array names

    ilmari authored tonycoz committed
    Really old Perl let you omit the @ on array names and the % on hash
    names in some spots.  This has issued a deprecation warning since Perl
    5.0, and is no longer permitted.
Something went wrong with that request. Please try again.