This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perl5.git
9 years agoUpdate Digest-SHA to CPAN version 5.93
Chris 'BinGOs' Williams [Mon, 27 Oct 2014 10:05:32 +0000 (10:05 +0000)]
Update Digest-SHA to CPAN version 5.93

  [DELTA]

5.93  Sun Oct 26 06:00:48 MST 2014
  - corrected alignment problem in SHA struct (src/sha.h)
    -- thanks to H. Merijn Brand and J. Hietaniemi for
      analysis and suggested patch
  - provided workaround in t/methods.t for unreliable -T test
    -- Some Perl 5.8's mistake text for binary

9 years agoUpdate experimental to CPAN version 0.013
Chris 'BinGOs' Williams [Mon, 27 Oct 2014 09:59:24 +0000 (09:59 +0000)]
Update experimental to CPAN version 0.013

  [DELTA]

0.013     2014-10-25 21:54:47+02:00 Europe/Amsterdam
          Rename lvalue_refs to refaliasing

9 years agoPerlIO_list_push() accepts a non-const PerlIO_funcs pointer
Tony Cook [Mon, 27 Oct 2014 03:35:53 +0000 (14:35 +1100)]
PerlIO_list_push() accepts a non-const PerlIO_funcs pointer

but under -DPERL_GLOBAL_STRUCT_PRIVATE, most PerlIO_funcs objects
and pointers are const, so cast to match the function parameter.

This was broken by f814d560e84f which changed from looking up the
layer by the name in tab (or osLayer) to adding those directly.

9 years ago[perl #123057] Allow split-to-array in lvalue context
Father Chrysostomos [Mon, 27 Oct 2014 00:01:07 +0000 (17:01 -0700)]
[perl #123057] Allow split-to-array in lvalue context

In some cases @a=split gets optimised to something akin to split(\@a,
...) or split(..., \@a), so lvalue context applied to it sees a split
op instead of a list assignment.  And split can’t be assigned to.  So (@a=split//,"foo")=bar() fails.  This bug probably goes back to perl
3, when this optimisation was added.

(Actually, the array is usually stowed away in the pushre op that
holds the regular expression, though sometimes it becomes the last
argument.)

Recent commits such as ef7999f have extended this optimisation, so
it happens in more places, and ended up breaking chomp(my @array =
split...).

This commits checks specifically for split-to-array when lvalue con-
text is applied.

9 years agoTest file fails to compile.
James E Keenan [Sun, 26 Oct 2014 14:14:40 +0000 (10:14 -0400)]
Test file fails to compile.

For: RT #123057

9 years agofix type incompatibilities between format strings/args
Lukas Mai [Sun, 26 Oct 2014 11:11:36 +0000 (12:11 +0100)]
fix type incompatibilities between format strings/args

Building a debugging perl triggered warnings such as

warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘U32’
warning: field width specifier ‘*’ expects argument of type ‘int’, but argument 5 has type ‘long unsigned int’
warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 3 has type ‘wchar_t’

9 years agorename convert to op_convert_list and APIfy
Lukas Mai [Sun, 26 Oct 2014 10:17:47 +0000 (11:17 +0100)]
rename convert to op_convert_list and APIfy

9 years ago[MERGE] add t/perf/ hierarchy
David Mitchell [Sun, 26 Oct 2014 16:54:08 +0000 (16:54 +0000)]
[MERGE] add t/perf/ hierarchy

Add some new files that help with testing and measuring
performance-related issues.

9 years agofix 't/TEST -benchmark'
David Mitchell [Tue, 21 Oct 2014 14:44:44 +0000 (15:44 +0100)]
fix 't/TEST -benchmark'

This has never worked, as it would look for t/benchmark/*.t files in
the wrong place.

9 years agoadd note about t/perf/ to t/README
David Mitchell [Tue, 21 Oct 2014 14:43:01 +0000 (15:43 +0100)]
add note about t/perf/ to t/README

9 years agoadd t/perf/benchmarks, t/perf/benchmarks.t
David Mitchell [Tue, 21 Oct 2014 14:26:08 +0000 (15:26 +0100)]
add t/perf/benchmarks, t/perf/benchmarks.t

t/perf/benchmarks is a file intended to contain snippets of code
that can be usefully benchmarked or otherwise profiled.

The basic idea is that any time you add an optimisation that is intended
to make a particular construct faster, then you should add that construct
to this file.

Under the normal test suite, the test file benchmarks.t does a basic
compile and run of each of these snippets; not to test performance,
but just to ensure that the code doesn't have errors.

Over time, it is intended that various measurement and profiling tools
will be written that can run selected (or all) snippets in various
environments. These will not be run as part of a normal test suite run.

9 years agoadd t/perf/speed.t
David Mitchell [Tue, 21 Oct 2014 13:03:21 +0000 (14:03 +0100)]
add t/perf/speed.t

This test file is similar to /re/speed.t, but to test general-purpose
optimisations.

The idea is to run snippets of code that are 100s or 1000s times slower
if a particular optimisation is broken. We are not so much interested
in the individual tests passing, as in the whole file failing with a
watchdog timeout (or just observing that it running more slowly)

9 years agot/perf/optree.t: expand blurb
David Mitchell [Tue, 21 Oct 2014 12:49:10 +0000 (13:49 +0100)]
t/perf/optree.t: expand blurb

explain (kind of) why this file is called optree.t

9 years agorename t/op/opt.t -> t/perf/optree.t
David Mitchell [Tue, 21 Oct 2014 12:41:16 +0000 (13:41 +0100)]
rename t/op/opt.t -> t/perf/optree.t

Now that we have a directory, t/perf/, for perfomance /optimsation
tests, move this test file there, and rename to something slightly
clearer.

9 years agoadd t/perf/, t/perf/opcount.t
David Mitchell [Tue, 21 Oct 2014 12:25:25 +0000 (13:25 +0100)]
add t/perf/, t/perf/opcount.t

Add a new directory designed to hold performance / optimising tests
and infrastructure, and add the first test file, opcount.t, that
checks that a sub has the right numbers of particular op types

9 years agoImport Test-More 1.301001 alpha 63
Chad Granum [Thu, 23 Oct 2014 19:03:23 +0000 (12:03 -0700)]
Import Test-More 1.301001 alpha 63

9 years agotoke.c: Report the proper type for assign ops
Father Chrysostomos [Sat, 25 Oct 2014 23:38:31 +0000 (16:38 -0700)]
toke.c: Report the proper type for assign ops

For combined assignment operators like *= and +=, the lexer passes an
ASSIGNOP token to the parser, but the -DT output said MULOP or ADDOP;
i.e., it was reporting the type *before* the check for a following
‘=’, instead of after it.

9 years agoOptimise ($foo)x1 and ($foo)x0 in list cx
Father Chrysostomos [Tue, 21 Oct 2014 06:29:01 +0000 (23:29 -0700)]
Optimise ($foo)x1 and ($foo)x0 in list cx

If the repeat count is 1, then we simply remove the repetition operator
and have the ops of the lhs evaluated, regardless of what they are.

If the repeat count is 0, then we only optimise if the lhs is a simple
scalar or constant.  We optimise the whole thing down to the empty
list.

This only happens currently for integer constants on the right-
hand side.

In the 0 case it could be extended to multiple scalars/constants, but
that would be more work.

9 years agoDeparse list repetition assignment properly
Father Chrysostomos [Sat, 25 Oct 2014 21:41:52 +0000 (14:41 -0700)]
Deparse list repetition assignment properly

This only applies to the almost useless case of nothing but a repetition
on the lhs of list assignment:  ((undef)x3) = foo();

Other cases where the repetition is part of a larger list already
deparsed correctly.

Checking whether the lhs begins with a parenthesis is not sufficient
to determine whether the lhs is parenthesized.  I believe repetition
is the only binary op other than the comma that is allowed on the
lhs, so we can just check for that in the op tree.

9 years agoMake repeat op tree more consistent
Father Chrysostomos [Sat, 25 Oct 2014 20:58:56 +0000 (13:58 -0700)]
Make repeat op tree more consistent

Formerly, ck_repeat would sometimes make the right-hand argument of
list repetition accessible via cBINOPo->op_last and sometimes via
cLISTOPx(cBINOP->op_first)->op_last.

In the case of ($x)x1,

  repeat
    rv2sv
      gv
    const

would become

  repeat
    ex-list
      pushmark
      rv2sv
        gv
      const

while in the case of ($x,$y)x1,

  repeat
    list
      pushmark
      rv2sv
        gv
      rv2sv
        gv
    const

would just have the list changed to an ex-list.

Having the right-hand argument accessible from two different places
makes things more complicated elsewhere in op.c, so keep the second
kid where it was.

The old approach was to detach all kids, and then wrap them in a list
op if the first kid was not a list already.  Instead, just detach the
first kid.

9 years agofix change description has incorrect proto
Doug Bell [Sat, 25 Oct 2014 22:32:59 +0000 (17:32 -0500)]
fix change description has incorrect proto

The incompatible change deals with the (*) proto

9 years agoMove newDEFSVOP into the right perlapi.pod section
Lukas Mai [Sat, 25 Oct 2014 10:25:14 +0000 (12:25 +0200)]
Move newDEFSVOP into the right perlapi.pod section

9 years agoop.c: Fix C++-incompatible typo
Father Chrysostomos [Sat, 25 Oct 2014 20:09:24 +0000 (13:09 -0700)]
op.c: Fix C++-incompatible typo

from 82209a5d9db5.

9 years agounbreak threaded builds
Lukas Mai [Sat, 25 Oct 2014 19:51:11 +0000 (21:51 +0200)]
unbreak threaded builds

9 years agoperldata: Document list repetition assignment
Father Chrysostomos [Sat, 25 Oct 2014 18:56:12 +0000 (11:56 -0700)]
perldata: Document list repetition assignment

9 years agoAllow list assignment to list repetition
Father Chrysostomos [Sat, 25 Oct 2014 18:49:57 +0000 (11:49 -0700)]
Allow list assignment to list repetition

(undef,undef,undef,$foo,$bar)=that_function();

can now be written as

((undef)x3, $foo, $bar) = that_function();

Furthermore, (($a)x$assign_to_a,$b) = @c will include $a in the list
of variables ta assign to if $assign_to_a is 1, assign $c[0] to $b
if $assign_to_a is 0.  In other words, assuming $assign_to_a is 1 or
0, it is equivalent to:

($assign_to_a ? ($a, $b) : $b) = @c

9 years agoAPIfy block_start/block_end/intro_my
Lukas Mai [Sat, 25 Oct 2014 10:25:14 +0000 (12:25 +0200)]
APIfy block_start/block_end/intro_my

9 years agoRemove redundant op_lvalue calls in perly.y
Father Chrysostomos [Sat, 25 Oct 2014 04:38:01 +0000 (21:38 -0700)]
Remove redundant op_lvalue calls in perly.y

When (\$x)=\$y is compiled, the \ on the lhs gives lvalue context to
its argument by calling op_lvalue.  Then later the = gives lvalue con-
text to the \, calling op_lvalue again, which transforms the $x into
an lvref op (via op.c:S_lvref).

I just copied that logic when I extended aliasing via reference to
foreach \$x.  But here, we don’t need to call op_lvalue on the $x,
because we know it is going to go through op.c:S_lvref, which doesn’t
care whether it has been through op_lvalue already or not.  The end
result is the same.

9 years agodo not lock files when doing open() on :win32 layer
Daniel Dragan [Fri, 12 Sep 2014 19:36:34 +0000 (15:36 -0400)]
do not lock files when doing open() on :win32 layer

MS CRT uses _SH_DENYNO flag internally for all open() calls. Not passing
FILE_SHARE_READ and FILE_SHARE_WRITE to CreateFile means we want exclusive
access to the file, otherwise CreateFile fails. Always locking the files
causes :win32 is base layer perl to not be able to have 2
handles/FDs/PIOs open simultaneously to the same disk file. This causes a
behavior different from :unix is base layer win32 perl, and also causes a
number of test fails to fail. See #122224 for details of test fails.
Getting read/write lock on open behavior comes from initial
commit a8c08ecdc5 of win32 layer.

9 years agoadd /dev/null support to :win32 io layer
Daniel Dragan [Tue, 9 Sep 2014 14:03:32 +0000 (10:03 -0400)]
add /dev/null support to :win32 io layer

:unix layer on Win32 OS supports this, so :win32 also has to. Without this
base/term.t dies with

ok 5
Can't open /dev/null. at base/term.t line 41.

C:\perl521\src\t>

After this, all tests in base/term.t pass when :win32 is the default OS
layer.

9 years agormv redundant PerlIO_find_layer from PerlIO_default_layers
Daniel Dragan [Fri, 12 Sep 2014 17:49:45 +0000 (13:49 -0400)]
rmv redundant PerlIO_find_layer from PerlIO_default_layers

Obsolete as of commit fcf2db383b , prior to that commit, PerlIO_find_layer
was needed to convert a PerlIO_funcs * (var osLayer) to a SV * since
PL_def_layerlist wasn't a PerlIO_list_t * but a AV *. After that commit
PerlIO_find_layer returns a PerlIO_funcs *, and we start with a
PerlIO_funcs * (var osLayer), so PerlIO_find_layer is redundant.

Also _NN a stack arg for smaller code.

9 years agocleanup perlio.c and doio.c
Daniel Dragan [Sun, 31 Aug 2014 05:40:27 +0000 (01:40 -0400)]
cleanup perlio.c and doio.c

IoIFP will be assigned to again in say_false block. This redundant code is
from commit 6e21c824d9 perl 4.0 patch 6.

in PerlIO_allocate replace a duplicate block with a goto

in PerlIO_resolve_layers replace a func call with a macro, this couldn't
have been using magic due to the previous SvROK

9 years agoAPIfy newDEFSVOP
Lukas Mai [Fri, 24 Oct 2014 22:39:03 +0000 (00:39 +0200)]
APIfy newDEFSVOP

9 years agoMake Deparse.t test just added less sensitive
Father Chrysostomos [Sat, 25 Oct 2014 03:36:22 +0000 (20:36 -0700)]
Make Deparse.t test just added less sensitive

I don’t know why, but the ‘-e syntax OK’ comes out last on my machine
but first on dromedary.

9 years agoDeparse stash subs stores as RVs
Father Chrysostomos [Sat, 25 Oct 2014 01:20:01 +0000 (18:20 -0700)]
Deparse stash subs stores as RVs

Commit 2eaf799e74b stop most declarations like ‘sub foo{}’ from creat-
ing GVs.  Instead, simple sub refs are stored in the stash.

That broke deparsing of package subs:

$ perl5.21.4 -MO=Deparse -e 'sub foo{die}'
-e syntax OK

Deparse needs to know about these references, so that we get this:

$ ./perl -Ilib -MO=Deparse -e 'sub foo{die}'
sub foo {
    die;
}
-e syntax OK

9 years agoExtend void list optimisation to two lexicals
Father Chrysostomos [Fri, 24 Oct 2014 21:33:26 +0000 (14:33 -0700)]
Extend void list optimisation to two lexicals

The list+pushmark optimisation and the padrange optimisation conflict.
In void context, the former is avoided if it looks as though padrange
is possible (pushmark followed by lexical var), but now that padrange
happens only for two or more lexicals, we can check for that.  This
makes ‘my $a, our $b’ marginally faster.  (There are still cases where
this optimisation doesn’t happen though it could, but things would
get even more compilcated and we would only be optimising for rare
edge cases.)

9 years agoRevert "Update ExtUtils-MakeMaker to CPAN version 7.00"
Father Chrysostomos [Fri, 24 Oct 2014 21:03:55 +0000 (14:03 -0700)]
Revert "Update ExtUtils-MakeMaker to CPAN version 7.00"

This reverts commit 7b01e4b183c6629065260ae2befad5e5d4ab6b94.

The newest ExtUtils::MakeMaker uses the :utf8 layers, which is not
available under miniperl on Windows.  So the build fails.

Revert this for now until a fixed version is released.

9 years agorecharclass: Corrections and nits
Karl Williamson [Fri, 24 Oct 2014 16:30:59 +0000 (10:30 -0600)]
recharclass: Corrections and nits

9 years agoperldelta for Unicode erratum fix
Karl Williamson [Wed, 22 Oct 2014 18:45:59 +0000 (12:45 -0600)]
perldelta for Unicode erratum fix

cb4ea3e667c17d04aceb8aa99c7314653561f238

9 years agoFix a bug with customized.t when CUSTOMIZED is empty arrayref
Chris 'BinGOs' Williams [Fri, 24 Oct 2014 12:15:19 +0000 (13:15 +0100)]
Fix a bug with customized.t when CUSTOMIZED is empty arrayref

9 years agoUpdate ExtUtils-MakeMaker to CPAN version 7.00
Chris 'BinGOs' Williams [Fri, 24 Oct 2014 11:23:00 +0000 (12:23 +0100)]
Update ExtUtils-MakeMaker to CPAN version 7.00

  [DELTA]

7.00 Wed Oct 22 20:13:38 BST 2014

    No changes from 6.99_18

6.99_18 Mon Oct 20 10:02:58 BST 2014
    Bug fixes:
    - Resolve regression with taint and get_version() [RT#99580]

    VMS fixes:
    - Avoid .NOTPARALLEL on VMS as it is a syntax error for MMS and MMK
    - Quotes are not stripped from argv[0] on VMS so need stripping
    - Move MCR from PERL to PERLRUN on VMS and other *RUN variables

6.99_17 Sun Oct 12 19:37:04 BST 2014
    Bug fixes:
    - Fix test that got broke under core since 6.99_15

6.99_16 Thu Oct  2 19:29:49 BST 2014
    Dist fixes:
    - Move File::Copy::Recursive from bundled to where it is
      used, so that it will not get installed as a runtime
      prereq

6.99_15 Sun Sep 21 13:21:46 BST 2014
    Enhancements:
    - If core, add ccwarnflags and ccstdflags, if available

    Doc fixes:
    - Fix internal links

6.99_14 Fri Sep 19 14:59:08 BST 2014
    Bug fixes:
    - Fixes to fallback version module for core integration problems

6.99_13 Mon Sep 15 20:02:47 BST 2014
    Enhancements:
    - Bundle Encode::Locale as ExtUtils::MakeMaker::Locale

    Bug fixes:
    - Make included version module have standardised dist versioning

6.99_12 Thu Sep 11 15:27:31 BST 2014
    Enhancements:
    - Now include a fallback version module for bootstrapping

    Bug fixes:
    - Support libfoo.0.dylib style libraries on Darwin

6.99_11 Mon Sep  8 14:20:26 BST 2014
    Bug fixes:
    - Handle chcp failure better on MSWin32
    - Tests should be parallelisable once again

    Doc fixes:
    - Document that GNU make is usable on MSWin32 now

6.99_10 Thu Sep  4 14:28:01 BST 2014
    Bug fixes:
    - Fixes for being integrated with core
    - Fixed the code page reset on MSWin32
    - Fixed test failures on BSD with UTF8 filenames
    - Fixed regression with quoting of $(PERL) when
      command line flags are used

6.99_09 Thu Aug 28 11:01:37 BST 2014
    Enhancements:
    - Support GNU Make on Windows
    - Support paths and filenames that are UTF8 encoded
    - MM->can_run() added for finding programs (ported from
      IPC::Cmd)

    Bug fixes:
    - Handle UTF8 when generating manpages correctly
    - Generated Makefile contents are now consistently sorted

6.99_08 Mon Aug 18 14:17:04 BST 2014
    Bug fixes:
    - Liblist::Kid: can now handle -l:foo.so invocations properly
    - Scripts will no longer have the 'not running under some shell' code
      applied when rewriting shebang lines.
    - version is now used to parse prereqs versions internally
    - Support UTF8 encoded command-line args and Makefile.PL args
    - Generated META.files will now always have linefeed EOLs, even on
      Windows
    - Rewrite the version line eval handling to have less insane edge cases

    Doc fixes:
    - Documentation now includes links to Dist::Zilla, File::ShareDir and
      File::ShareDir::Install
    - Clarified support policy for < v5.8.1 in README

    Misc:
    - Updated bundled CPAN::Meta::Requirements to version 2.126
    - Updated bundled ExtUtils::Manifest to version 1.65

6.99_07 Wed Jul 30 17:36:14 BST 2014
    Bug fixes:
    - Resolve 'wide character in print' warnings

6.99_06 Mon Jul 28 15:02:25 BST 2014
    Enhancements:
    - Improvements and tests for the spaces-in-stuff handling

6.99_05 Tue Jul 22 12:32:03 BST 2014
    Enhancements:
    - Enable working with (including installing to) directories with spaces in names

6.99_04 Sat Jul 12 12:43:08 BST 2014
    Enhancements:
    - No longer report each file being manified. Only summarise.

6.99_03 Fri Jul  4 11:02:21 BST 2014
    Doc Fixes:
    - PATCHING document has been rewritten as CONTRIBUTING and TODO
      document has been removed

    Bug Fixes:
    - Rearranged bundled prereqs so CPAN::Meta::Requirements won't
      get stomped on if it is installed already, but CPAN::Meta isn't

6.99_02 Thu Jun  5 12:15:28 BST 2014
    Bug fixes:
    * MM->parse_version will no longer warn if it could
      not determine the $VERSION due to syntax errors etc.

6.99_01 Tue Jun  3 22:17:30 BST 2014
    Bug fixes:
    * Disregard some warnings during tests when cross-compiling

    Doc fixes:
    * Clarified the use and limitations of META_ADD, META_MERGE

    Test fixes:
    * Sanitise env vars in tests

9 years agoUpdate Encode to CPAN version 2.63
Chris 'BinGOs' Williams [Fri, 24 Oct 2014 11:16:34 +0000 (12:16 +0100)]
Update Encode to CPAN version 2.63

  [DELTA]

$Revision: 2.63 $ $Date: 2014/10/19 07:01:15 $
! Encode.xs
  Applied: RT #99264: call_pv() can reallocate the stack
  https://rt.cpan.org/Ticket/Display.html?id=99264
! Byte/Makefile.PL CN/Makefile.PL EBCDIC/Makefile.PL Encode.xs
  JP/Makefile.PL KR/Makefile.PL Symbol/Makefile.PL TW/Makefile.PL
  bin/enc2xs encengine.c
  Pulled: add PERL_NO_GET_CONTEXT to all dynamic libs
  https://github.com/dankogai/p5-encode/pull/24

9 years agoSynchronise versions in Maintainers.pl for recent updates
Chris 'BinGOs' Williams [Fri, 24 Oct 2014 11:14:59 +0000 (12:14 +0100)]
Synchronise versions in Maintainers.pl for recent updates

9 years ago[perl #122695] Fix line number for else{foo}
Father Chrysostomos [Thu, 23 Oct 2014 02:32:04 +0000 (19:32 -0700)]
[perl #122695] Fix line number for else{foo}

where there is no space after the opening brace.

The code that was responsible for the wrong line number:

if (isSPACE(*s) || *s == '#')
    PL_copline = NOLINE;   /* invalidate current command line number */

was added in perl *2.0* (378cc40b3)!  It looked a little different
back then:

if (isspace(*s) || *s == '#')
    cmdline = NOLINE;   /* invalidate current command line number */

I don’t know what the condition was for.  I can only imagine that it
seemed logical to skip the setting of cmdline if it appeared to be
something on the same line (e.g., if($foo){bar()} as opposed to
if($foo){<newline>...}).  Clearly that doesn’t work for ‘else{foo()}’
because we end up giving that statement the line number where the
‘if’ occurs.  (cmdline/PL_copline is for remembering the first line of
a multi-line construct.)

9 years agopp.c:pp_repeat: Remove #if 0 code
Father Chrysostomos [Tue, 21 Oct 2014 02:32:44 +0000 (19:32 -0700)]
pp.c:pp_repeat: Remove #if 0 code

This was intended to fix 20010809.028, but treating
20010809.028 as not-a-bug is the only way to preserve
backward-compatibility.  See the previous commit’s
explanation.

9 years agorepeat.t: Remove to-do test for 20010809.028
Father Chrysostomos [Tue, 21 Oct 2014 02:29:43 +0000 (19:29 -0700)]
repeat.t: Remove to-do test for 20010809.028

Aka #7505, the bug was that list repeat didn’t copy its
elements.  But list repeat hasn’t copied its elements for
years now, and code could be relying on the current
behaviour of foreach(($var)x2) { ... } which aliases $_
to $var twice.  We also have tests for the current
behaviour.

9 years ago[perl #121159] use the updated win32_popenlist() even with USE_IMP_SYS
Tony Cook [Wed, 22 Oct 2014 23:59:11 +0000 (10:59 +1100)]
[perl #121159] use the updated win32_popenlist() even with USE_IMP_SYS

9 years ago5.21.5 has been ticked off
Abigail [Wed, 22 Oct 2014 22:04:28 +0000 (00:04 +0200)]
5.21.5 has been ticked off

9 years ago[perl #122680] Omit <-- HERE marker from (?=){3} warning
Father Chrysostomos [Wed, 22 Oct 2014 19:57:11 +0000 (12:57 -0700)]
[perl #122680] Omit <-- HERE marker from (?=){3} warning

‘Quantifier unexpected on zero-length expression’ was always putting
the marker at the end of the regular expression, instead of where
it actually goes.

9 years agoFix Unicode errata
Karl Williamson [Wed, 22 Oct 2014 17:20:31 +0000 (11:20 -0600)]
Fix Unicode errata

This is an error correction from http://www.unicode.org/errata/

9 years agoperldelta for 8334cae656b5
Tony Cook [Wed, 22 Oct 2014 05:38:54 +0000 (16:38 +1100)]
perldelta for 8334cae656b5

9 years ago[perl #122703] ensure $! is set when chmod() and utime() fail
Tony Cook [Wed, 22 Oct 2014 05:20:08 +0000 (16:20 +1100)]
[perl #122703] ensure $! is set when chmod() and utime() fail

When called with a closed file handle, neither chmod nor utime set
errno when they failed,

chown() did set errno, but this wasn't tested.

9 years agogit format-patch -M option takes branch
Doug Bell [Sun, 31 Aug 2014 08:15:35 +0000 (03:15 -0500)]
git format-patch -M option takes branch

9 years agomake it clear not to use git-send-email at all
Doug Bell [Sun, 31 Aug 2014 08:17:42 +0000 (03:17 -0500)]
make it clear not to use git-send-email at all

9 years agoperldelta for aac983ac3f3f, c24a535b4f4f
Tony Cook [Wed, 22 Oct 2014 04:08:18 +0000 (15:08 +1100)]
perldelta for aac983ac3f3fc24a535b4f4f

9 years agodocument the limitations of list pipe open on Win32
Tony Cook [Wed, 22 Oct 2014 03:48:32 +0000 (14:48 +1100)]
document the limitations of list pipe open on Win32

9 years agoimplement list form of pipe open for Win32
Tony Cook [Wed, 1 Oct 2014 06:19:52 +0000 (16:19 +1000)]
implement list form of pipe open for Win32

9 years agosv.c: Always #define COW threshold constants
Father Chrysostomos [Wed, 22 Oct 2014 01:07:22 +0000 (18:07 -0700)]
sv.c: Always #define COW threshold constants

They are also used in determining whether an operator target (PADTMP)
should be swiped.

If COW is not enabled, then the #if SV_COW_THRESHOLD ends up treating
the threshold as 0, which means swiping almost always happens for tar-
gets, resulting in an increase in malloc calls.  So non-COW builds end
up slower than they need to be.  This also caused bug #123029 to occur
more often under non-COW builds.

9 years agostate.t: Improve test for #123029
Father Chrysostomos [Wed, 22 Oct 2014 00:52:30 +0000 (17:52 -0700)]
state.t: Improve test for #123029

This version fails in 5.20.1 whether COW is enabled or not.

9 years agomake -DNO_MATHOMS work on Win32
Daniel Dragan [Tue, 21 Oct 2014 18:44:37 +0000 (14:44 -0400)]
make -DNO_MATHOMS work on Win32

If you try to export symbols which dont exist, VC linker fails. NO_MATHOMS
now works on Win32. The list of symbols is from VC's error log.

9 years agosisyphus thinks the test value is simply wrong here.
Jarkko Hietaniemi [Tue, 21 Oct 2014 22:53:06 +0000 (18:53 -0400)]
sisyphus thinks the test value is simply wrong here.

9 years ago[perl #123029]: add regression test
Aaron Crane [Tue, 21 Oct 2014 17:38:27 +0000 (18:38 +0100)]
[perl #123029]: add regression test

This bug was fixed in c0683843e9299db25f354e2c8c90faa7614950d1.

9 years agoporting/checkcase.t: suppress warnings
David Mitchell [Tue, 21 Oct 2014 16:37:15 +0000 (17:37 +0100)]
porting/checkcase.t: suppress warnings

Due to parallel testing, the find() in this test file can
generate spurious warnings such as

    Can't opendir(./t/tmp7281B): No such file or directory
     at porting/checkcase.t line 37.

Just turn off find's warnings for this test file.

9 years agoDocument length-1 variable name rules
Karl Williamson [Sun, 19 Oct 2014 00:56:13 +0000 (18:56 -0600)]
Document length-1 variable name rules

This cleans up the existing documentation with added details, and
documents the effect of recent changes.

9 years agoDon't allow literal control chars in var names in EBCDIC
Karl Williamson [Mon, 20 Oct 2014 05:03:44 +0000 (23:03 -0600)]
Don't allow literal control chars in var names in EBCDIC

Currently, a variable name of length-1 may have as its name some of the
possible control characters, though this usage is deprecated.  It is a
pain to fix this to work properly on EBCDIC, and since the use of these
is deprecated, the pumpking agreed with me to not to bother with doing
so.

9 years agoDeprecate all length-1 non-graphic variable names
Karl Williamson [Sun, 19 Oct 2014 16:35:04 +0000 (10:35 -0600)]
Deprecate all length-1 non-graphic variable names

v5.20 deprecated all otherwise-legal control characters as length-1
variable names.  This extends this to include all non-graphic
characters.  The practical effect of this occurs only when not under
"use utf8", and affects just the C1 controls (code points 0x80
through 0xFF), NO-BREAK SPACE, and SOFT HYPHEN.

9 years agotoke.c: Simplify macro for length-1 variable names
Karl Williamson [Sun, 19 Oct 2014 15:42:25 +0000 (09:42 -0600)]
toke.c: Simplify macro for length-1 variable names

It turns out that any non-NUL, non-space ASCII character that gets this
far in the program is a valid length-1 variable.  So, can simplify the
expression in the macro that tests for legal ones.

9 years agot/uni/variables.t: Add tests for the generated warnings
Karl Williamson [Sun, 19 Oct 2014 15:20:44 +0000 (09:20 -0600)]
t/uni/variables.t: Add tests for the generated warnings

9 years agot/uni/variables.t: White-space only
Karl Williamson [Sun, 19 Oct 2014 01:00:01 +0000 (19:00 -0600)]
t/uni/variables.t: White-space only

Indent to newly-formed (by the previous commit) blocks

9 years agot/uni/variables.t: Add tests
Karl Williamson [Sat, 18 Oct 2014 14:56:00 +0000 (08:56 -0600)]
t/uni/variables.t: Add tests

The length-1 variables in the ASCII range had not been systematically
tested until this commit

9 years agot/uni/variables.t: Add test skips
Karl Williamson [Mon, 20 Oct 2014 15:30:01 +0000 (09:30 -0600)]
t/uni/variables.t: Add test skips

A future commit will change the behavior of this test depending on
whether it is run on an EBCDIC vs ASCII platform.  In the loop, add
skips so the total number run per iteration is the same no matter what
branches (and tests) get run in the iteration.  This will allow the
ASCII and EBCDIC test plan to have the same number.  This in turn will
prevent platform-specific failures when adding/subtracting tests in this
file.

9 years agot/uni/variables.t: Rename variable
Karl Williamson [Sat, 18 Oct 2014 05:27:24 +0000 (23:27 -0600)]
t/uni/variables.t: Rename variable

A future commit will be using the current variable name for a different
purpose.

9 years agot/uni/variables.t: Clarify some test names
Karl Williamson [Fri, 17 Oct 2014 17:43:06 +0000 (11:43 -0600)]
t/uni/variables.t: Clarify some test names

I found it hard to read use utf8 instead of 'use utf8', etc, but more
importantly, this changes a bunch of tests so the character in related
tests is only named in the first such, and more description is used.
This is in preparation for a future commit.

9 years agot/uni/variables.t: Fix to run under EBCDIC
Karl Williamson [Tue, 2 Apr 2013 04:28:08 +0000 (22:28 -0600)]
t/uni/variables.t: Fix to run under EBCDIC

9 years agot/uni/variables.t: Remove duplicate test
Karl Williamson [Sat, 18 Oct 2014 04:54:21 +0000 (22:54 -0600)]
t/uni/variables.t: Remove duplicate test

The same exact test was repeated.

9 years agot/uni/variables.t: Remove unused param to sprintf
Karl Williamson [Fri, 17 Oct 2014 17:50:13 +0000 (11:50 -0600)]
t/uni/variables.t: Remove unused param to sprintf

9 years agotoke.c: Fix potential buffer overflow
Karl Williamson [Fri, 17 Oct 2014 04:24:13 +0000 (22:24 -0600)]
toke.c: Fix potential buffer overflow

Malformed UTF-8 input could have potentially caused a read off the end
of the buffer here until this commit.

9 years agoperlebcdic: Add clarification
Karl Williamson [Fri, 17 Oct 2014 04:03:30 +0000 (22:03 -0600)]
perlebcdic: Add clarification

9 years agouvoffuni_to_utf8_flags() die if platform can't handle
Karl Williamson [Wed, 26 Jun 2013 21:40:53 +0000 (15:40 -0600)]
uvoffuni_to_utf8_flags() die if platform can't handle

On non EBCDIC platforms currently any UV is encodable as UTF-8.  (This
would change if there were 128-bit words).  Thus, much code assumes that
nothing can go wrong when converting to UTF-8, and hence does no error
checking.

However, UTF-EBCDIC is only capable of representing code points below
2**32, so if there are 64-bit words, this function can fail.

Prior to this patch, there was no real overflow check, and garbage was
returned by this function if called with too large a number.

While not ideal, the easiest thing to do is to just die for such a
number, like we do for division by 0.  This involves changing only code
within this function, and not its many callers.

9 years agodquote_static.c: Forbid \c{ on EBCDIC
Karl Williamson [Fri, 17 Oct 2014 01:24:53 +0000 (19:24 -0600)]
dquote_static.c: Forbid \c{ on EBCDIC

Unlike ASCII platforms where \c{ evaluates to a semi-colon, and raises a
fatal error because that result is not a control character, on EBCDIC
platforms it does evaluate to a control, but we have to forbid it anyway
because unescaped "{" now is special as a part of larger sequences, and
we don't want to get the parser confused.

9 years agoutf8.h: EBCDIC fix
Karl Williamson [Fri, 17 Oct 2014 01:44:07 +0000 (19:44 -0600)]
utf8.h: EBCDIC fix

These macros are supposed to accommodate larger than a byte inputs.
Therefore, under EBCDIC, we have to use a different macro which handles
the larger values.  On ASCII platforms, these called macros are no-ops
so it doesn't matter there.

9 years agohandy.h: Two EBCDIC fixes
Karl Williamson [Fri, 17 Oct 2014 01:55:42 +0000 (19:55 -0600)]
handy.h: Two EBCDIC fixes

In EBCDIC only macros, an argument previously was failed to be
dereferenced, and there was an extra ==.  A few comment changes as well

9 years agolib/locale.t: Add some \Q
Karl Williamson [Fri, 17 Oct 2014 02:45:17 +0000 (20:45 -0600)]
lib/locale.t: Add some \Q

More places in this file need to have \Q to quote things.  This was
noticed in EBCDIC testing.

9 years agot/re/regexp.t: Add ability to skip depending on platform
Karl Williamson [Thu, 18 Apr 2013 03:47:41 +0000 (21:47 -0600)]
t/re/regexp.t: Add ability to skip depending on platform

This adds the capability to specify that a test is to be done only on an
ASCII platform, or only on an EBCDIC.

9 years agot/re/regexp.t: Generalize for non-ASCII platforms
Karl Williamson [Tue, 16 Apr 2013 21:49:06 +0000 (15:49 -0600)]
t/re/regexp.t: Generalize for non-ASCII platforms

This adds code to the processing of the tests in t/re/re_tests to
automatically convert most character constants from unicode to native
character sets.  This allows most tests in t/re/re_tests to be run on
both platforms without change.  A later commit will add the capability
to skip individual tests if on the wrong platform, so those few tests
that this commit doesn't work for can be accommodated

9 years agocharset_tools.pl: Fix changed function name
Karl Williamson [Mon, 7 Jul 2014 22:59:19 +0000 (16:59 -0600)]
charset_tools.pl: Fix changed function name

The function has changed names, but this file did not get updated to
reflect that.

9 years agoEBCDIC doesn't have real UTF-8 locales.
Karl Williamson [Wed, 8 Oct 2014 17:43:26 +0000 (11:43 -0600)]
EBCDIC doesn't have real UTF-8 locales.

At least on the system that we have tested on.  There are locales that
say they are UTF-8, but they're not; they're EBCDIC 1047.

9 years agoFix ebcdic error of nostdio.h
Yaroslav Kuzmin [Thu, 3 Jul 2014 04:22:23 +0000 (22:22 -0600)]
Fix ebcdic error of nostdio.h

9 years agoregcomp.c: isASCII should be isASCII_uni
Karl Williamson [Wed, 8 Oct 2014 17:41:22 +0000 (11:41 -0600)]
regcomp.c: isASCII should be isASCII_uni

It doesn't effectively matter, but isACII_uni is the one that is
supposed to be used for UVs.

9 years agoFix isASCII for EBCDIC
Karl Williamson [Wed, 8 Oct 2014 17:24:50 +0000 (11:24 -0600)]
Fix isASCII for EBCDIC

Prior to this commit isASCII on EBCDIC platforms was defined as the
isascii() libc function.  It turns out that this doesn't work properly.
It needed to be this way back when EBCDIC was bootstrapped onto the
target machine, but now, various header files are furnished with the
requisite definitions, so this is no longer necessary.

The problem with isascii() is that it is locale-dependent, unlike on
ASCII platforms.  This means that instead of getting a standard ASCII
definition, it returns whatever the underlying locale says, even if
there is no 'use locale' anywhere in the program.  Starting with this
commit, the isASCII definition now comes from the l1_char_class_tab.h
file which we know is accurate and not locale-dependent.

This header can be used in compilations of utility programs where perl.h
is not available.  For these, there are alternate, more complicated
definitions, should they be needed in those utility programs.  Several
of those definitions prior to this commit also used locale-sensitive
isfoo() functions.  The bulk of this commit refactors those definitions
to not use these functions as much as possible.  As noted in the
added comments in the code, the one remaining use of such a function is
only for the lesser-used control characters.  Likely these aren't used
in the utility programs.

9 years agohandy.h: Add missing macro
Karl Williamson [Wed, 8 Oct 2014 17:21:16 +0000 (11:21 -0600)]
handy.h: Add missing macro

This section of code is normally not compiled, but when circumstances
call for it to be compiled, it may be missing the macro defined in this
commit, which is trivial on ASCII platforms, so just define it if
missing

9 years agohandy.h: Need macro definition for normally non-compiled code
Karl Williamson [Wed, 8 Oct 2014 17:16:59 +0000 (11:16 -0600)]
handy.h: Need macro definition for normally non-compiled code

This section of code is compiled only when perl.h is not available, i.e.
for utility programs.  I periodically test that it still works, and this
time a macro was added to the other branch of the #if, but not this one.
This commit adds a trivial one to the missing area.

9 years agohandy.h: Comments only
Karl Williamson [Wed, 8 Oct 2014 17:12:12 +0000 (11:12 -0600)]
handy.h: Comments only

Removes obsolete comment, and adds text to make it easier to find
matching #else and #endif of a #if

9 years agoperlio: Fix to work with MVS Dataset
Yaroslav Kuzmin [Sun, 28 Sep 2014 16:02:17 +0000 (10:02 -0600)]
perlio: Fix to work with MVS Dataset

9 years agomktables: Use chr() instead of pack()
Karl Williamson [Sun, 24 Aug 2014 16:12:49 +0000 (10:12 -0600)]
mktables: Use chr() instead of pack()

The input is the native code point, not the Unicode one, and so it is a
bug that pack(U) works.  The W format is what should be used, but I
think chr() is easier to read.

9 years agoutf8.c: Improve debug message
Karl Williamson [Mon, 23 Jun 2014 03:29:28 +0000 (21:29 -0600)]
utf8.c: Improve debug message

This function was called with an empty string "" because that string was
not actually needed in the function, except to better identify the
source when there is an error.  So change to specify the actual source.

9 years agoregcomp.c: EBCDIC fix
Karl Williamson [Mon, 9 Jun 2014 18:28:10 +0000 (12:28 -0600)]
regcomp.c: EBCDIC fix

9 years agomakedepend.SH: Split too long lines; properly join
Karl Williamson [Thu, 28 Feb 2013 04:59:11 +0000 (21:59 -0700)]
makedepend.SH: Split too long lines; properly join

I had thought that a continuation introduced a space.  But no,
a continuation can happen in the middle of a token.

And this splits lines that are getting very long to avoid preprocessor
limitations.

9 years agomakedepend.SH: White-space only
Karl Williamson [Wed, 27 Feb 2013 22:51:28 +0000 (15:51 -0700)]
makedepend.SH: White-space only

Align continuation backslashes

9 years agomakedepend.SH: Remove some unnecessary white space
Karl Williamson [Wed, 27 Feb 2013 21:39:28 +0000 (14:39 -0700)]
makedepend.SH: Remove some unnecessary white space

Multi-line preprocessor directives are now joined into single lines.
This can create lines too long for the preprocessor to handle.  This
commit removes blanks adjoining comments that get deleted.  This makes
things somewhat less likely to exceed the limit.

This commit also fixes several [] which were meant to each match a tab
or a blank, but editors converted the tabs to blanks