This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perl5.git
6 years agoRMG: Note that Porting/release_schedule.pod should be updated
Steve Hay [Wed, 24 Dec 2014 14:49:59 +0000 (14:49 +0000)]
RMG: Note that Porting/release_schedule.pod should be updated

6 years agoNote that 5.21.6 and 5.21.7 are released
Steve Hay [Wed, 24 Dec 2014 14:49:31 +0000 (14:49 +0000)]
Note that 5.21.6 and 5.21.7 are released

6 years agoFix link error in perl521.dll with MinGW/gcc -xc++
Steve Hay [Wed, 24 Dec 2014 13:50:55 +0000 (13:50 +0000)]
Fix link error in perl521.dll with MinGW/gcc -xc++

perl.exp:fake:(.edata+0x1214): undefined reference to `win32_async_check'

6 years agoFix compilation errors in globals.c with MinGW/gcc -xc++
Steve Hay [Wed, 24 Dec 2014 13:11:45 +0000 (13:11 +0000)]
Fix compilation errors in globals.c with MinGW/gcc -xc++

error: external linkage required for symbol 'PL_charclass' because of
'dllexport' attribute

and likewise for many other symbols declared EXTCONST.

6 years agoFix compilation errors in DynaLoader.c with MinGW/gcc -xc++
Steve Hay [Sat, 20 Dec 2014 13:08:37 +0000 (13:08 +0000)]
Fix compilation errors in DynaLoader.c with MinGW/gcc -xc++

error: invalid conversion from 'void*' to 'HMODULE'

6 years agoFix compilation errors in win32sck.c with MinGW/gcc -xc++
Steve Hay [Sat, 20 Dec 2014 13:06:41 +0000 (13:06 +0000)]
Fix compilation errors in win32sck.c with MinGW/gcc -xc++

error: invalid conversion from 'const timeval*' to 'PTIMEVAL'

6 years agoFix compilation errors in win32.c with MinGW/gcc -xc++
Steve Hay [Sat, 20 Dec 2014 13:05:30 +0000 (13:05 +0000)]
Fix compilation errors in win32.c with MinGW/gcc -xc++

In MinGW-w64 builds, there are warnings/errors like this (depending on the
compiler version used):

gcc-4.5.3:
warning: passing argument 2 of 'execv' from incompatible pointer type

gcc-4.8.0:
error: invalid conversion from 'const char* const*' to 'char* const*'

This happens because MinGW-w64's process.h declares execv/execvp's second
argument as 'char * const*' instead of 'const char * const*'.
The _execv/_execvp versions don't have this problem so use them instead.
MSDN says execv/execvp are deprecated POSIX functions; use the ISO C++
conformant _execv/_execvp instead anyway so it is not even worth sticking
with execv/execvp for those compilers (namely, MinGW and VC++) that have
the correct declarations.

Likewise with spawnv/spawnvp vs. _spawnv/_spawnvp.

6 years agoFix compilation errors in mg.c with MinGW/gcc -xc++
Steve Hay [Sat, 20 Dec 2014 13:02:23 +0000 (13:02 +0000)]
Fix compilation errors in mg.c with MinGW/gcc -xc++

error: 'sip' was not declared in this scope
error: 'uap' was not declared in this scope

6 years agoFix typos in two unrelated test descriptions
Aaron Crane [Wed, 24 Dec 2014 11:54:37 +0000 (11:54 +0000)]
Fix typos in two unrelated test descriptions

6 years agoUpdate IO-Compress to CPAN version 2.068
Chris 'BinGOs' Williams [Wed, 24 Dec 2014 10:04:10 +0000 (10:04 +0000)]
Update IO-Compress to CPAN version 2.068

  [DELTA]

  2.068 23 Dec 2014

      * Disable running of some of the slower test harnesses by default.
        COMPRESS_ZLIB_RUN_MOST needs set to run them. Make life more
        bearable on legacy platforms

6 years agoUpdate Compress-Raw-Zlib to CPAN version 2.068
Chris 'BinGOs' Williams [Wed, 24 Dec 2014 10:02:39 +0000 (10:02 +0000)]
Update Compress-Raw-Zlib to CPAN version 2.068

  [DELTA]

  2.068 10 Dec 2014

      * Silence more compiler warnings

      * Disable running of 07bufsize.y by default.
        COMPRESS_ZLIB_RUN_MOST needs set to run them. Makes life more
        bearable on legacy platforms

6 years agoUpdate Compress-Raw-Bzip2 to CPAN version 2.068
Chris 'BinGOs' Williams [Wed, 24 Dec 2014 10:01:53 +0000 (10:01 +0000)]
Update Compress-Raw-Bzip2 to CPAN version 2.068

  [DELTA]

  2.068 23 Dec 2014

      * No Changes

6 years agoUpdate CPAN-Meta-Requirements to CPAN version 2.131
Chris 'BinGOs' Williams [Wed, 24 Dec 2014 10:00:02 +0000 (10:00 +0000)]
Update CPAN-Meta-Requirements to CPAN version 2.131

  [DELTA]

2.131     2014-12-23 15:04:19-05:00 America/New_York

    [ENHANCEMENTS]

    - Merging Module => 0 into requirements is now optimized

    [PREREQS]

    - Scalar::Utils removed as a prerequisite

6 years agodeparse-skips.txt: comp/require.t passes
Father Chrysostomos [Wed, 24 Dec 2014 06:08:48 +0000 (22:08 -0800)]
deparse-skips.txt: comp/require.t passes

6 years agoFix deparsing of some unary-prototyped calls
Father Chrysostomos [Wed, 24 Dec 2014 06:07:16 +0000 (22:07 -0800)]
Fix deparsing of some unary-prototyped calls

This resulted in an infinite loop:

    sub optplus(;+) {}
    optplus($a < $b);

The prototypes ;$ _ ;_ had the wrong predecence, causing foo($a<$b) to
be deparsed wrongly, without the parentheses.

6 years agoFix deparsing of ‘my sub x; sub { sub x {...} }’
Father Chrysostomos [Wed, 24 Dec 2014 04:34:09 +0000 (20:34 -0800)]
Fix deparsing of ‘my sub x; sub { sub x {...} }’

The ‘x’ sub has a pad entry in the sub containing its initial decla-
ration and in the sub containing its body.  pad_subs simplistically
added subs found in pads to the list of subs to be deparsed.  So the
body of x was being deparsed twice.

So we need to check the OUTSIDE pointer in pad_subs in deciding
whether to add it to the list, so only the sub containing the body
definition pushes it on to the list.

Without using the pad ID, this test in Deparse.t ends up failing:

state sub sb2;
sub sb2 {
    sb2 ;
}

because the state sub’s OUTSIDE pointer points to the protosub of the
anonymous sub that Deparse.t wraps around the test, whereas it is a
clone of that anonymous sub that gets deparsed.  Pad IDs exist to
identify clones of the same original pad.

6 years ago[perl #103260] Fix s/// with long strings
Father Chrysostomos [Wed, 24 Dec 2014 04:12:06 +0000 (20:12 -0800)]
[perl #103260] Fix s/// with long strings

This is also the subject of perl #123071.

The iteration count was stored in an I32 and was overflowing.  If the
maximum number of iterations possible overflowed, then it would become
negative, and the substitution would fail immediately with ‘Substitu-
tion loop’.

I tried fixing this without increasing the size of the context
stack entries on 64-bit builds (by skipping the loop check for long
strings), but was unable to, because we have to return the number of
iterations, which was also stored as I32.  If we change just that one
to SSize_t, we get an I32-sized alignment hole, so we might as well
make maxiters a SSize_t as well, fixing the bug that way (the more
straightforward way).

6 years agoTest-Simple Version Bump, 1.301001_093 (RC13)
Chad Granum [Mon, 22 Dec 2014 15:39:38 +0000 (07:39 -0800)]
Test-Simple Version Bump, 1.301001_093 (RC13)

Add alternate email address for Chad Granum to Porting/checkAUTHORS.pl.

6 years agodont compile unused static hash functions
Daniel Dragan [Tue, 23 Dec 2014 09:18:19 +0000 (04:18 -0500)]
dont compile unused static hash functions

Perl uses only 1 hash func perl build. It is not safe to have multiple
hash funcs in 1 build due to conflicts on the size of PERL_HASH_SEED_BYTES.
No point in wasting CC's time to compile a static func which will always be
tossed by the CC at the end due to no references to the static has func,
or by the linker due to no references to the funcs. Related to
[perl #123483] .

6 years agosilence VC Win64 perl warnings in hv_func.h
Daniel Dragan [Tue, 23 Dec 2014 05:35:24 +0000 (00:35 -0500)]
silence VC Win64 perl warnings in hv_func.h

These warnings are in a public header, hv_func.h, so CPAN
XS builders will see 8 warnings with every .c file from
a CPAN XS module that they will compile. Silence the
warnings since headers should never warn unconditionally.

See [perl #123483] for details.

6 years agoremove obsolete B::CC code from t/harness
Daniel Dragan [Tue, 23 Dec 2014 08:09:53 +0000 (03:09 -0500)]
remove obsolete B::CC code from t/harness

from commit 56eca212f2 .  Seems to have been used for
B::CC testing, but the blacklist logic and $dhwrapper logic
were removed in commit de1254415f but this piece was
missed. Half the files in the list don't exist anymore.

6 years agoIncrease $B::VERSION to 1.55
Father Chrysostomos [Tue, 23 Dec 2014 16:47:25 +0000 (08:47 -0800)]
Increase $B::VERSION to 1.55

6 years agoSome B pad tests
Father Chrysostomos [Tue, 23 Dec 2014 16:46:32 +0000 (08:46 -0800)]
Some B pad tests

6 years agoAdd id and outid methods to B::PADLIST
Father Chrysostomos [Tue, 23 Dec 2014 06:32:35 +0000 (22:32 -0800)]
Add id and outid methods to B::PADLIST

We wants them.

6 years agoop.c: Another instance of STATIC_ASSERT_STMT
Father Chrysostomos [Tue, 23 Dec 2014 06:22:19 +0000 (22:22 -0800)]
op.c: Another instance of STATIC_ASSERT_STMT

No need to check this at run time on debugging builds.

6 years agoperl5220delta: Eval::WithLexicals is fixed
Father Chrysostomos [Tue, 23 Dec 2014 01:47:47 +0000 (17:47 -0800)]
perl5220delta: Eval::WithLexicals is fixed

That was quick.

6 years agoUpdate Filter::Util::Call to CPAN version 1.53
Chris 'BinGOs' Williams [Tue, 23 Dec 2014 14:45:04 +0000 (14:45 +0000)]
Update Filter::Util::Call to CPAN version 1.53

  [DELTA]

1.53 2014-12-20 rurban
----

  * Re-release caused by broken SIGNATURE, caused by broken ExtUtils::Makemaker distsignature rules.
    See https://github.com/Perl-Toolchain-Gang/ExtUtils-MakeMaker/issues/177

1.52 2014-12-19 rurban
----

  * Fix Filter::Util::Call regression from 1.50, for filter_add({}) or filter_add([]).
    This broke Switch, see RT #101004.

6 years agoUpdate DB_File to CPAN version 1.835
Chris 'BinGOs' Williams [Tue, 23 Dec 2014 14:03:54 +0000 (14:03 +0000)]
Update DB_File to CPAN version 1.835

  [DELTA]

1.835 23 Dec 2014

   * Silence more compiler warnings

6 years agoSome lexical sub deparsing fixes
Father Chrysostomos [Tue, 23 Dec 2014 03:02:18 +0000 (19:02 -0800)]
Some lexical sub deparsing fixes

Prototypes were being ignored.

$ ./perl -Ilib -mO=Deparse -XMfeature=lexical_subs -e 'my sub f(\$); f($f)'
use feature 'lexical_subs';
no warnings;
my sub f (\$);
f(\$f);          # <---- wrong; this is a compilation error
-e syntax OK

Self-referential subs (state sub b; state sub b { b }) were causing
infinite recursion.

6 years agodeparse-skips.txt: Note a couple skip reasons
Father Chrysostomos [Tue, 23 Dec 2014 00:15:57 +0000 (16:15 -0800)]
deparse-skips.txt: Note a couple skip reasons

6 years agodeparse-skips.txt: More passing tests
Father Chrysostomos [Tue, 23 Dec 2014 00:10:56 +0000 (16:10 -0800)]
deparse-skips.txt: More passing tests

6 years agoIncrease $B::Deparse::VERSION to 1.32
Father Chrysostomos [Mon, 22 Dec 2014 16:24:27 +0000 (08:24 -0800)]
Increase $B::Deparse::VERSION to 1.32

6 years agoDeparse: Avoid uninit warning from undef &sub
Father Chrysostomos [Mon, 22 Dec 2014 07:16:16 +0000 (23:16 -0800)]
Deparse: Avoid uninit warning from undef &sub

6 years agoFix long verbatim line in perlunicook
Father Chrysostomos [Mon, 22 Dec 2014 22:57:21 +0000 (14:57 -0800)]
Fix long verbatim line in perlunicook

6 years agoAdd Eval::WithLexicals to perl5220delta
Father Chrysostomos [Mon, 22 Dec 2014 22:42:18 +0000 (14:42 -0800)]
Add Eval::WithLexicals to perl5220delta

6 years agoAdd B::Generate to perl5220delta
Father Chrysostomos [Mon, 22 Dec 2014 07:04:19 +0000 (23:04 -0800)]
Add B::Generate to perl5220delta

6 years agoIgnore cx of padsv for padrange optimisation
Father Chrysostomos [Mon, 22 Dec 2014 06:43:56 +0000 (22:43 -0800)]
Ignore cx of padsv for padrange optimisation

Commit v5.21.6-352-gc46871e caused all padsv ops to be marked with
scalar context.  This prevented the padrange optimisation from happen-
ing with a combination of scalars and aggregates in list context.

Adjust the padrange algorithm to ignore the distinction between list
and scalar context.  We only do this optimisation when, even in list
context, each op will push just one thing on to the stack.  (That’s
why we check OPf_REF on padav and padhv.)  So the list/scalar distinc-
tion is irrelevant.

6 years agoMerge branch 'perlunicook' into blead
Ricardo Signes [Sun, 21 Dec 2014 23:52:15 +0000 (18:52 -0500)]
Merge branch 'perlunicook' into blead

6 years agoperlunicook: add trusted-to-exist links for perlunicook
Ricardo Signes [Sun, 21 Dec 2014 23:48:22 +0000 (18:48 -0500)]
perlunicook: add trusted-to-exist links for perlunicook

6 years agoperlunicook: remove empty list item
Ricardo Signes [Sun, 21 Dec 2014 23:41:35 +0000 (18:41 -0500)]
perlunicook: remove empty list item

6 years agoperlunicook: add it to build files and TOC
Ricardo Signes [Sun, 21 Dec 2014 23:37:06 +0000 (18:37 -0500)]
perlunicook: add it to build files and TOC

6 years agoperlunicook: add perlunicook to MANIFEST
Ricardo Signes [Sun, 21 Dec 2014 23:35:10 +0000 (18:35 -0500)]
perlunicook: add perlunicook to MANIFEST

6 years agoFixes for a few trivial typos
Rafael Garcia-Suarez [Thu, 8 Mar 2012 18:31:47 +0000 (19:31 +0100)]
Fixes for a few trivial typos

6 years agoTom Christiansen's Perl Unicode Cookbook 1st draft
Ricardo Signes [Tue, 6 Mar 2012 15:32:36 +0000 (10:32 -0500)]
Tom Christiansen's Perl Unicode Cookbook 1st draft

originally posted to perl5-porters as message-id
18479.1330388058@chthon

6 years agoregen pod issues
Father Chrysostomos [Sun, 21 Dec 2014 20:46:43 +0000 (12:46 -0800)]
regen pod issues

6 years agoAdd Lexical::Var to perl5220delta
Father Chrysostomos [Sun, 21 Dec 2014 20:45:26 +0000 (12:45 -0800)]
Add Lexical::Var to perl5220delta

6 years agofix badly encoded contributor names for perl5217delta
Karen Etheridge [Sun, 21 Dec 2014 19:09:28 +0000 (11:09 -0800)]
fix badly encoded contributor names for perl5217delta

6 years agoadd hv_backreferences_p() to embed.fnc
Yves Orton [Sun, 21 Dec 2014 17:30:09 +0000 (18:30 +0100)]
add hv_backreferences_p() to embed.fnc

Otherwise it cannot be used on Win32. See https://github.com/Sereal/Sereal/issues/73
for an example of where this breaks Win32 perl extensions.

6 years agoperl5220delta: Function::Parameters is fixed
Father Chrysostomos [Sun, 21 Dec 2014 03:01:22 +0000 (19:01 -0800)]
perl5220delta: Function::Parameters is fixed

And it was fixed a month ago.  I missed it.

6 years agoop.c: Use ASSUME in multideref code
Father Chrysostomos [Sun, 21 Dec 2014 02:02:49 +0000 (18:02 -0800)]
op.c: Use ASSUME in multideref code

Under non-debugging builds, this gives the compiler hints about what
optimisations it can take.  With clang, I see a slight reduction in
the size of op.o:

$ ls -l op.o
-rw-r--r--  1 sprout  staff  192480 Dec 20 18:00 op.o
$ ls -l op.o
-rw-r--r--  1 sprout  staff  192432 Dec 20 18:01 op.o

6 years agoop.c: Skip allocating entersub targ for Perl sub
Father Chrysostomos [Sat, 20 Dec 2014 00:57:47 +0000 (16:57 -0800)]
op.c: Skip allocating entersub targ for Perl sub

The target of entersub ops is only used by XSUBs to return things.
Pure-Perl subs don’t use the target.  (And if a pure-Perl sub is
later replaced with an XS one, dXSTARG already has a workaround.)

6 years agoIncrease $Data::Dumper::VERSION to 2.156
Father Chrysostomos [Sun, 21 Dec 2014 15:08:25 +0000 (07:08 -0800)]
Increase $Data::Dumper::VERSION to 2.156

6 years agoIncrease $Opcode::VERSION to 1.31
Father Chrysostomos [Sun, 21 Dec 2014 15:07:51 +0000 (07:07 -0800)]
Increase $Opcode::VERSION to 1.31

6 years agoIncrease $POSIX::VERSION to 1.49
Father Chrysostomos [Sun, 21 Dec 2014 15:07:21 +0000 (07:07 -0800)]
Increase $POSIX::VERSION to 1.49

6 years agoIncrease $arybase::VERSION to 0.10
Father Chrysostomos [Sun, 21 Dec 2014 15:06:58 +0000 (07:06 -0800)]
Increase $arybase::VERSION to 0.10

6 years agodeparse-skips.txt: op/gv.t is failing
Father Chrysostomos [Sun, 21 Dec 2014 03:08:38 +0000 (19:08 -0800)]
deparse-skips.txt: op/gv.t is failing

6 years agoDisallow GIMME in ext/
Father Chrysostomos [Sat, 20 Dec 2014 15:14:01 +0000 (07:14 -0800)]
Disallow GIMME in ext/

It’s an inefficient macro, so we don’t want it inadvertently
used again.

6 years agoIncrease $VMS::DCLsym::VERSION to 1.06
Father Chrysostomos [Sat, 20 Dec 2014 15:10:34 +0000 (07:10 -0800)]
Increase $VMS::DCLsym::VERSION to 1.06

6 years agoIncrease $Safe::VERSION to 2.39
Father Chrysostomos [Sat, 20 Dec 2014 15:10:01 +0000 (07:10 -0800)]
Increase $Safe::VERSION to 2.39

6 years agoRemove bogus ST(0) assignment from DCLsym.xs
Father Chrysostomos [Sat, 20 Dec 2014 15:09:13 +0000 (07:09 -0800)]
Remove bogus ST(0) assignment from DCLsym.xs

If we are using PPCODE, then simply assigning to ST(0) won’t return
the value, unless we also do SP++.  So this function has been return-
ing an empty list on failure and the ST(0) assignment has been
doing nothing.

6 years agoRemove bogus GIMME check from DCLsym.xs
Father Chrysostomos [Sat, 20 Dec 2014 15:05:56 +0000 (07:05 -0800)]
Remove bogus GIMME check from DCLsym.xs

GIMME used to return 0 for scalar context.  As of 5.12, it never
returns 0.  As it happens, this function (_getsym) is only ever called
in one spot (by getsym) and in list context.  So don’t even bother
with the check.

6 years agoUse GIMME_V in POSIX
Father Chrysostomos [Sat, 20 Dec 2014 14:55:36 +0000 (06:55 -0800)]
Use GIMME_V in POSIX

GIMME_V is a simpler macro that results in smaller machine code.

6 years agoUse GIMME_V in Opcode
Father Chrysostomos [Sat, 20 Dec 2014 14:54:52 +0000 (06:54 -0800)]
Use GIMME_V in Opcode

GIMME_V is a simpler macro that results in smaller machine code.

6 years agoSafe Changes update
Father Chrysostomos [Sat, 20 Dec 2014 14:52:29 +0000 (06:52 -0800)]
Safe Changes update

6 years agoPropagate context properly in Safe->reval
Father Chrysostomos [Sat, 20 Dec 2014 14:50:12 +0000 (06:50 -0800)]
Propagate context properly in Safe->reval

(or, rather, in Opcode.xs).

It was providing scalar context when invoked in void context.  Test-
ing Safe->reval itself is complicated, because Opcode.xs, which is an
essential part of the fix, is not dual-life.

6 years agoUse GIMME_V in arybase
Father Chrysostomos [Sat, 20 Dec 2014 14:50:08 +0000 (06:50 -0800)]
Use GIMME_V in arybase

GIMME_V is a simpler macro that results in smaller machine code.

6 years agoUse GIMME_V in Data::Dumper
Father Chrysostomos [Sat, 20 Dec 2014 13:39:51 +0000 (05:39 -0800)]
Use GIMME_V in Data::Dumper

GIMME_V is a simpler macro that results in smaller machine code.

6 years agoMissed the %deprecated entry in Module::CoreList
Max Maischein [Sun, 21 Dec 2014 11:14:24 +0000 (12:14 +0100)]
Missed the %deprecated entry in Module::CoreList

6 years agoBump version number to 5.21.8
Max Maischein [Sun, 21 Dec 2014 10:18:45 +0000 (11:18 +0100)]
Bump version number to 5.21.8

Add 5.21.8 in Module::CoreList
Point Maintainers.pl to new version of Module::CoreList

6 years agoCreate new perldelta
Max Maischein [Sun, 21 Dec 2014 09:36:04 +0000 (10:36 +0100)]
Create new perldelta

6 years agoUpdate epigraphs.pod
Max Maischein [Sun, 21 Dec 2014 09:01:21 +0000 (10:01 +0100)]
Update epigraphs.pod

6 years agoMerge branch 'release-5.21.7' into blead
Max Maischein [Sat, 20 Dec 2014 17:38:50 +0000 (18:38 +0100)]
Merge branch 'release-5.21.7' into blead

6 years agoadd new release to perlhist v5.21.7
Max Maischein [Sat, 20 Dec 2014 14:52:25 +0000 (15:52 +0100)]
add new release to perlhist

6 years agoUpdate perldelta
Max Maischein [Sat, 20 Dec 2014 14:52:16 +0000 (15:52 +0100)]
Update perldelta

6 years agoUpdate Module::CoreList for 5.21.7
Max Maischein [Sat, 20 Dec 2014 14:01:57 +0000 (15:01 +0100)]
Update Module::CoreList for 5.21.7

6 years agoSkip multideref for PL_check[OP_HELEM] tinkering
Father Chrysostomos [Sat, 20 Dec 2014 13:26:02 +0000 (05:26 -0800)]
Skip multideref for PL_check[OP_HELEM] tinkering

We already do it when PL_check[OP_AELEM] is modified.  Do it
also for PL_check[OP_HELEM].  This will make it easier to get
Data::Alias working.

6 years agodump.c: Suppress extra sigils in multideref dump
Father Chrysostomos [Sat, 20 Dec 2014 13:21:41 +0000 (05:21 -0800)]
dump.c: Suppress extra sigils in multideref dump

This:

  my $z; my @y; $y[$z]

included

  <+> multideref($@y[$$z]) sK ->6

in its -MO=Concise output.

6 years agodump.c:unop_aux_stringify: Use newSVpvn_flags
Father Chrysostomos [Sat, 20 Dec 2014 13:06:13 +0000 (05:06 -0800)]
dump.c:unop_aux_stringify: Use newSVpvn_flags

newSVpvn_flags with SVs_TEMP takes less machine code than
sv_2mortal(newSVpv()).

6 years agoAllow multideref for $x[CONST->$*]
Father Chrysostomos [Sat, 20 Dec 2014 12:43:56 +0000 (04:43 -0800)]
Allow multideref for $x[CONST->$*]

6 years agoAllow multideref for $x[($pkg)]
Father Chrysostomos [Sat, 20 Dec 2014 12:38:15 +0000 (04:38 -0800)]
Allow multideref for $x[($pkg)]

The parens don’t need to disable the optimisation.

6 years agoFix assertion failure with $x[CONST->[0]]
Father Chrysostomos [Sat, 20 Dec 2014 12:35:24 +0000 (04:35 -0800)]
Fix assertion failure with $x[CONST->[0]]

6 years agoFix assertion failure with $x[($_)]
Father Chrysostomos [Sat, 20 Dec 2014 12:33:47 +0000 (04:33 -0800)]
Fix assertion failure with $x[($_)]

6 years agoAllow multideref for $x[($lex)]
Father Chrysostomos [Sat, 20 Dec 2014 12:29:08 +0000 (04:29 -0800)]
Allow multideref for $x[($lex)]

The parens don’t need to disable the optimisation.

(The OPpLVAL_INTRO flag [indicating my or state] has no run-time
effect for state vars, so we could ignore it and optimise, but it
would make deparsing inordinately complex, and no-one would write
$x[state $y] anyway.)

6 years agoprotect RExC_naughty changes behind macros
Hugo van der Sanden [Sat, 20 Dec 2014 12:21:27 +0000 (12:21 +0000)]
protect RExC_naughty changes behind macros

Avoid overflow, and add a bit of explanation.

6 years agoPerlIO::scalar: skip the 4GB seek test if off_t is too small
Tony Cook [Sat, 20 Dec 2014 02:52:29 +0000 (13:52 +1100)]
PerlIO::scalar: skip the 4GB seek test if off_t is too small

6 years ago01234567890123456789012345678901234567890123456789
Father Chrysostomos [Sat, 20 Dec 2014 00:42:30 +0000 (16:42 -0800)]
01234567890123456789012345678901234567890123456789
pp.h: Remove stack-popping from void overload code

There is no need to pop the stack in void context, as every void-context
op is followed by something that resets the stack.

6 years ago[perl #123458] list cx re::regexp_pattern($nonre)
Father Chrysostomos [Sat, 20 Dec 2014 00:20:42 +0000 (16:20 -0800)]
[perl #123458] list cx re::regexp_pattern($nonre)

It was returning (undef) in list context, though it was documented to
return the empty list.

6 years agouniversal.c:re_regexp_pattern: Mention GIMME_V once
Father Chrysostomos [Sat, 20 Dec 2014 00:15:05 +0000 (16:15 -0800)]
universal.c:re_regexp_pattern: Mention GIMME_V once

While it was only being called once, it occurred in two code paths.
Pulling it out of the main if-block reduces the size of universal.o.
Before and after:

$ ls -l universal.o
-rw-r--r--  1 sprout  staff  33700 Dec 19 16:05 universal.o
$ ls -l universal.o
-rw-r--r--  1 sprout  staff  33692 Dec 19 16:13 universal.o

6 years agopp_sys.c:pp_readdir: Call GIMME_V just once
Father Chrysostomos [Sat, 20 Dec 2014 00:11:32 +0000 (16:11 -0800)]
pp_sys.c:pp_readdir: Call GIMME_V just once

6 years agopp_ctl.c: Only do GIMME_V once in pp_caller
Father Chrysostomos [Sat, 20 Dec 2014 00:09:53 +0000 (16:09 -0800)]
pp_ctl.c: Only do GIMME_V once in pp_caller

This shrinks the machine code.

Before and after:

$ ls -l pp_ctl.o
-rw-r--r--  1 sprout  staff  96156 Dec 19 16:05 pp_ctl.o
$ ls -l pp_ctl.o
-rw-r--r--  1 sprout  staff  96044 Dec 19 16:09 pp_ctl.o

6 years agoUse GIMME_V in preference to GIMME
Father Chrysostomos [Sat, 20 Dec 2014 00:05:15 +0000 (16:05 -0800)]
Use GIMME_V in preference to GIMME

GIMME_V is a simpler macro that results in smaller machine code.

GIMME does not distinguish between scalar and void context.  The two
instances of GIMME == G_SCALAR that I changed (which used to match
void context too, but no longer do) are in code paths unreachable in
void context, so we don’t need to check for it.

6 years agowantarray.t: $got before $expected
Father Chrysostomos [Fri, 19 Dec 2014 20:41:43 +0000 (12:41 -0800)]
wantarray.t: $got before $expected

When the tests fail, the diagnostic output is very confusing
otherwise.

6 years agowantarray.t: Test logops at sub exit
Father Chrysostomos [Fri, 19 Dec 2014 04:25:06 +0000 (20:25 -0800)]
wantarray.t: Test logops at sub exit

6 years agowantarray.t: Remove unused var
Father Chrysostomos [Fri, 19 Dec 2014 01:57:44 +0000 (17:57 -0800)]
wantarray.t: Remove unused var

It stopped being used in dab34d0f01.

6 years agofix integer overflow in S_regpiece().
David Mitchell [Fri, 19 Dec 2014 22:52:55 +0000 (22:52 +0000)]
fix integer overflow in S_regpiece().

RExC_naughty is incremented when nasty bits of regex are found.
If at the end of compilation, its > 01, then PREGf_NAUGHTY is set on the
pattern.

However, some bits of S_regpiece on detecting naughiness, double or nearly
double RExC_naughty, quickly resulting in overflow of the I32.

I've fixed it by skipping the doubling when RExC_naughty is large,
but I don't know whether the doubling is conceptually wrong in the first
place.

Found by -fsanitize=undefined.

6 years agofix integer overflow in S_study_chunk().
David Mitchell [Fri, 19 Dec 2014 22:35:48 +0000 (22:35 +0000)]
fix integer overflow in S_study_chunk().

It was adding to delta even when delta was already SSize_t_MAX

This triggered it: /.*(ab|abc)/.

Found by -fsanitize=undefined.

6 years agofix integer overflow in S_study_chunk().
David Mitchell [Fri, 19 Dec 2014 22:19:58 +0000 (22:19 +0000)]
fix integer overflow in S_study_chunk().

It was adding SSize_t_MAX to data->last_start_max when
data->last_start_max was already SSize_t_MAX.

This triggered it: /(x+y)+/.

Found by -fsanitize=undefined.

6 years agofix integer overflow in S_scan_commit().
David Mitchell [Fri, 19 Dec 2014 21:41:11 +0000 (21:41 +0000)]
fix integer overflow in S_scan_commit().

offset_float_max could end up as SSize_t_MAX+1.

This triggered it: /^x(ab|c.+)$/.

Found by -fsanitize=undefined.

6 years agoadd asan_ignore - which errors to ignore
David Mitchell [Fri, 19 Dec 2014 20:31:00 +0000 (20:31 +0000)]
add asan_ignore - which errors to ignore

"clang -fsanitize=undefined" produces lots of false positives.
This file allows certain functions to be excluded from checking.
Use it as:

    clang -fsanitize=undefined -fsanitize-blacklist=`pwd`/asan_ignore

6 years agoop.c: better casting fix
David Mitchell [Fri, 19 Dec 2014 17:25:34 +0000 (17:25 +0000)]
op.c: better casting fix

My commit 0cb87cd1a of a few minutes ago broke g++. Hopefully this
commit won't break anything else.