This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Father Chrysostomos [Mon, 29 Dec 2014 07:13:26 +0000 (23:13 -0800)]
Call FETCH once for values in {...}
I broke this inadvertently in v5.17.5-55-g3ed356d while fixing a
memory leak.
Ævar Arnfjörð Bjarmason [Mon, 29 Dec 2014 12:44:52 +0000 (13:44 +0100)]
t/op/caller.t: Remove hardcoded $warnings::BYTES in favor of using $warnings::BYTES
This was originally hardcoded here in perl-5.8.0-909-g75b6c4c but since
then in numerous subsequent commits starting with v5.13.9-546-g3a32947
we've been bumping this number as we increase the number of warning
bits.
Just use the variable from warnings.pm instead, we're already using
other variables from there.
Father Chrysostomos [Mon, 29 Dec 2014 06:39:45 +0000 (22:39 -0800)]
pp.c:pp_quotemeta: No need for PUTBACK
We don’t manipulate the stack pointer at all here.
Father Chrysostomos [Mon, 29 Dec 2014 06:38:00 +0000 (22:38 -0800)]
Remove PUTBACK/SPAGAIN from hash iter ops
These were added by perl-5a2-2-g463ee0b and perl-5.003-2-gc750a3e. At
the time, hv_iternext and hv_iterval could reallocate the stack, but
hv_iterkey was safe. perl-5.6.0-8537-g574c802 divorced the comments
about hv_iterkey from the lines containing hv_iterkey, making things a
bit confusing. Somewhere along the road, all tied hash functionality
started being guarded with PUSHSTACK, so these hash functions won’t
reallocate the stack any more.
Father Chrysostomos [Mon, 29 Dec 2014 03:11:34 +0000 (19:11 -0800)]
pp.c:pp_[ul]c(first): No need for PUTBACK
We don’t manipulate the stack pointer at all here.
Father Chrysostomos [Mon, 29 Dec 2014 03:03:43 +0000 (19:03 -0800)]
pp.c:pp_chr: Less stack fiddling
No need for pop and push, since we accept and return one item. No
need to extend the stack. No need for PUTBACK.
Father Chrysostomos [Mon, 29 Dec 2014 03:03:02 +0000 (19:03 -0800)]
pp.c:pp_ord: Less stack fiddling
No need for pop and push, since we accept and return one item. No
need to extend the stack. No need for PUTBACK.
Father Chrysostomos [Mon, 29 Dec 2014 02:54:58 +0000 (18:54 -0800)]
pp.c:pp_substr: Redundant PUTBACK/SPAGAIN
These were added in perl-5.004_03-1149-g849ca7e. Perhaps at the time
SvPV or sv_magic could reallocate the stack. Neither is true now.
Father Chrysostomos [Mon, 29 Dec 2014 02:48:57 +0000 (18:48 -0800)]
pp.c:pp_oct: Less stack fiddling
No need for pop and push, since we accept and return one item. No
need to extend the stack. No need for PUTBACK.
Father Chrysostomos [Mon, 29 Dec 2014 02:47:09 +0000 (18:47 -0800)]
pp.c:pp_abs: No need for PUTBACK
We don’t manipulate the stack pointer at all here.
Father Chrysostomos [Mon, 29 Dec 2014 01:32:37 +0000 (17:32 -0800)]
pp.c:pp_negate: No PUTBACK necessary
We don’t manipulate the stack pointer here.
Father Chrysostomos [Mon, 29 Dec 2014 01:42:23 +0000 (17:42 -0800)]
pp.c:pp_int: No need for PUTBACK
We don’t manipulate the stack pointer at all here.
Father Chrysostomos [Mon, 29 Dec 2014 01:39:08 +0000 (17:39 -0800)]
pp.c:pp_sin: Less stack fiddling
No need to pop and push. No need to extend the stack. No need for
PUTBACK with those changes, as we no longer maniputale the stack
pointer (and even when we did it always ended up with the same value).
Father Chrysostomos [Mon, 29 Dec 2014 01:36:51 +0000 (17:36 -0800)]
pp.c:pp_i_negate: No PUTBACK necessary
We don’t manipulate the stack pointer here.
Father Chrysostomos [Mon, 29 Dec 2014 01:33:45 +0000 (17:33 -0800)]
pp.c:pp_complement: No PUTBACK necessary
We don’t manipulate the stack pointer here.
Father Chrysostomos [Mon, 29 Dec 2014 01:19:07 +0000 (17:19 -0800)]
pp.c:pp_undef: Less stack fiddling
Only when called with no arguments does it need to manipulate the
stack pointer.
Father Chrysostomos [Mon, 29 Dec 2014 01:15:26 +0000 (17:15 -0800)]
pp.c: pp_schop does not need PUTBACK
as it does no stack manipulation.
Father Chrysostomos [Mon, 29 Dec 2014 01:12:26 +0000 (17:12 -0800)]
pp.c:pp_trans: Remove targ variable
One spot was doing sv = GETTARG, which is equivalent to
sv = targ = .... The value of targ was unused. Elsewhere, a new mor-
tal was assigned to targ and then immediately pushed on to the stack.
Avoiding the redundant variable altogether results in smaller
machine code.
Father Chrysostomos [Mon, 29 Dec 2014 01:07:47 +0000 (17:07 -0800)]
Fix bad write in pp_trans
y/// has not been extending the stack for lexical $_, even since lex-
ical $_ was added. $lexical =~ y/// has not been extending the stack
since v5.21.5-339-g05a502d.
Father Chrysostomos [Mon, 29 Dec 2014 00:55:33 +0000 (16:55 -0800)]
pp.c:pp_study: Less stack fiddling
We always pop and push exactly one item. We can skip the sp++ and
sp--, and also the PUTBACK.
Father Chrysostomos [Mon, 29 Dec 2014 00:53:42 +0000 (16:53 -0800)]
pp.c:pp_gelem: Less stack fiddling
Instead of pop, pop, push, just do one pop and then replace the
remaining item. Also, there is no need to extend the stack here, as
pp_gelem returns fewer items than it consumes.
Father Chrysostomos [Mon, 29 Dec 2014 00:44:56 +0000 (16:44 -0800)]
Remove ‘require Config’ from ref.t
82b84d04879 removed the code that needed it.
Father Chrysostomos [Mon, 29 Dec 2014 00:09:12 +0000 (16:09 -0800)]
perlfunc: prototype implies $_
Father Chrysostomos [Mon, 29 Dec 2014 00:08:19 +0000 (16:08 -0800)]
[perl #123514] Make prototype() imply $_
Previously it would read and replace the previous item on the stack:
$ ./perl -le 'print "CORE::undef", prototype'
;\[$@%&*]
Father Chrysostomos [Sun, 28 Dec 2014 23:56:23 +0000 (15:56 -0800)]
Don’t write beyond the stack with scalar \()
Father Chrysostomos [Sun, 28 Dec 2014 22:30:31 +0000 (14:30 -0800)]
pp.c:pp_srefgen: Remove PUTBACK
We don’t manipulate the stack pointer at all here.
Father Chrysostomos [Sun, 28 Dec 2014 21:57:57 +0000 (13:57 -0800)]
pp.c:pp_rv2cv: Remove PUTBACK
pp_rv2cv doesn’t adjust the stack pointer at all, so there is no need
to synchronise with the global pointer before returning.
Father Chrysostomos [Sun, 28 Dec 2014 21:54:41 +0000 (13:54 -0800)]
pp.c:pp_pos: Less stack fiddling
We always pop exactly one item off the stack and then push exactly one
item. Instead of doing sp-- and sp++, just leave it alone (TOP/SET,
rather than POP/PUSH). Also skip PUTBACK, which is unnecessary.
Father Chrysostomos [Sun, 28 Dec 2014 21:46:26 +0000 (13:46 -0800)]
pp.c:pp_rv2sv: Use >= instead of switch
This results in smaller machine code.
If a freed SV is exposed to perl space then ${\$freed} will now die,
which is arguably more correct.
Father Chrysostomos [Sun, 28 Dec 2014 21:03:56 +0000 (13:03 -0800)]
pp.c:pp_rand: Only EXTEND when not popping
James E Keenan [Sun, 28 Dec 2014 14:42:00 +0000 (09:42 -0500)]
Remove inactive CUSTOMIZED entry.
Matthew Horsfall [Wed, 17 Dec 2014 21:28:34 +0000 (16:28 -0500)]
Add tests for stringification of regexps containing /n
Matthew Horsfall [Wed, 17 Dec 2014 21:20:46 +0000 (16:20 -0500)]
Bump re.pm version for changes
Matthew Horsfall (alh) [Thu, 23 Oct 2014 00:56:47 +0000 (20:56 -0400)]
Support for nocapture regexp flag /n
This flag will prevent () from capturing and filling in $1, $2, etc...
Named captures will still work though, and if used will cause $1, $2, etc...
to be filled in *only* within named groups.
The motivation behind this is to allow the common construct of:
/(?:b|c)a(?:t|n)/
To be rewritten more cleanly as:
/(b|c)a(t|n)/n
When you want grouping but no memory penalty on captures.
You can also use ?n inside of a () directly to avoid capturing, and
?-n inside of a () to negate its effects if you want to capture.
Matthew Horsfall (alh) [Thu, 23 Oct 2014 00:50:13 +0000 (20:50 -0400)]
Fixes to make test pass for regexp nocapture bit addition.
* Make Devel-Peek/t/Peek.t less sensitive to regexp flag changes.
Devel-Peek had flag names and binary representation hardcoded. Flag
names *should* be enough. Otherwise we have to update bits of this
test every time we muck with flags that don't affect the flags being
tested.
* Let B::Deparse know about the new RXf_PMf_CHARSET shift value.
Karl Williamson [Wed, 22 Oct 2014 18:38:20 +0000 (12:38 -0600)]
Create bit for /n.
Steve Hay [Sun, 28 Dec 2014 14:26:04 +0000 (14:26 +0000)]
Fix various "CPAN only" warnings for cpan/ modules in Porting/Maintainers.pl
Steve Hay [Sun, 28 Dec 2014 13:29:06 +0000 (13:29 +0000)]
Note that threads is currently customized in blead
Father Chrysostomos [Sun, 28 Dec 2014 07:24:44 +0000 (23:24 -0800)]
pp_hot.c:pp_concat: Remove SvGETMAGIC
If the operand is magical, try_amagic_bin will already have copied
the operand if both left and right were the same, so left == right
will no longer be true by the time this path is reached. This has
been the case since v5.13.11-400-g75ea7a1.
Father Chrysostomos [Sun, 28 Dec 2014 07:10:39 +0000 (23:10 -0800)]
pp_hot.c:pp_concat: Remove PUTBACK/SPAGAIN
sv_utf8_upgrade_nomg does not reallocate the stack, as of
v5.19.6-25-g7a3f960.
Father Chrysostomos [Sun, 28 Dec 2014 06:53:55 +0000 (22:53 -0800)]
Use gmtime’s target
gmtime has a target allocated for it, but it hasn’t used that target
since
46fc3d4c6 (inseparable changes from match from perl-5.003_97g to
perl-5.003_97h, probably the ‘Mondo Cool patch’ mentioned in the com-
mit message).
There is no reason not to use it and avoid allocating a fresh SV with
each scalar-context call.
Father Chrysostomos [Sun, 28 Dec 2014 06:35:20 +0000 (22:35 -0800)]
pp_sys.c:pp_gmtime: Remove redundant EXTEND_MORTAL
The purpose of EXTEND_MORTAL is to extend the mortals stack only
once before pushing multiple items. Here we are just going to push
one item, so extending it gains us nothing, as sv_2mortal is going
to do that anyway.
Moreover, we will not even be using the mortals stack if there has
been an error.
Father Chrysostomos [Sun, 28 Dec 2014 01:20:48 +0000 (17:20 -0800)]
op.c: Remove assert exception for OP_REPEAT
I changed the op tree in v5.21.5-101-g5e46266.
Father Chrysostomos [Sun, 28 Dec 2014 01:18:52 +0000 (17:18 -0800)]
op.h: Parenthesize macro args for cUNOPx etc.
Without this, we cannot do cUNOPx(complex expression) without worrying
about precedence issues.
Father Chrysostomos [Sat, 27 Dec 2014 20:40:55 +0000 (12:40 -0800)]
perlop: Mention ~ among ops that vary by type
Daniel Dragan [Thu, 25 Dec 2014 22:50:23 +0000 (17:50 -0500)]
const the PerlIO vtables
Previously the PerlIO vtables were const only on PERL_GLOBAL_STRUCT_PRIVATE
builds, which was created for former Symbian port and today is rarely used.
Since writing/hooking the PerlIO vtables from XS has never been public API
and is very unlikely to be occuring on CPAN, make then const so they will
be shared between perl processes.
b4 VC2008 x64 perl521.dll .rdata section 0x7293C bytes, .data 0x34B0 bytes
after .rdata 0x7321C .data 0x2BD0
Chris 'BinGOs' Williams [Sat, 27 Dec 2014 16:19:50 +0000 (16:19 +0000)]
Update autodie to CPAN version 2.26
[DELTA]
2.26 2014-12-26 16:27:23+00:00 UTC
* BUGFIX / INCOMPAT: Remove "fileno" and "umask" from the list of
CORE subs protected by autodie and Fatal.
When they return undef, it is not a failure.
* BUGFIX: Fixed an error that could occur during global destruction of
the form "(in cleanup) Can't use an undefined value as an ARRAY
reference at .../autodie/Scope/GuardStack.pm line 48 during global
destruction" (Thanks to Dave Rolsky).
* BUGFIX: The open-pragma is now properly ignored when open is
given an explicit layer. This brings autodie protected
open in sync with open. Thanks to Gregory Oschwald and
Graham Knop for the report + test case and the patch.
(GH#52 + GH#53)
* BUGFIX: Hide the "SCALAR" (buffer) argument in the string
representation of autodie::exception for the read,
sysread and syswrite CORE subs. This is to avoid
a dump of binary data to the screen/log when a
(sys)read or syswrite fails.
* FEATURE: Let autodie::exception work in equality tests and
string comparison via "overload fallback".
(Thanks to Michael G. Schwern)
* DOC: Mention that "kill" is in the ":ipc" category. It has
been there since autodie v2.14.
(Thanks to Felipe Gasper for reporting it, RT#97320).
* INTERNAL: Use "parent" instead of "base" for inheritance. Also
avoid some @ISA relationships that were redundant.
Either truly redundant ones or by importing "import"
from Exporter v5.57.
- This change implies that perl 5.8 users must now
also fetch "parent" from cpan.
(Thanks to Olivier Mengué, GH#59)
* DEVEL / TEST: The autodie module now accepts an undefined Fatal
version, assuming it to be development version.
Test cases that require versions are now either
skipped or considered "release" test.
* TEST / INTERNAL: Enabled travis-ci for Perl 5.20
* TEST: Close temp file before re-opening in t/truncate.t.
(Thanks to Craig A. Berry, RT#96609)
* TEST: Pass O_TRUNC with O_CREAT to sysopen in t/utf8_open.t.
(Thanks to Craig A. Berry, RT#87237)
* TEST: Clean up temp file in t/truncate.t.
(Thanks to Dave Mitchell, RT#100688)
Chris 'BinGOs' Williams [Sat, 27 Dec 2014 15:23:08 +0000 (15:23 +0000)]
Update ExtUtils-Command to CPAN version 1.19
Slaven Rezic [Fri, 26 Dec 2014 20:21:03 +0000 (21:21 +0100)]
perlfunc: another alternative for enabling the "state" feature
Daniel Dragan [Fri, 26 Dec 2014 14:15:23 +0000 (09:15 -0500)]
optimize CLEAR_ERRSV
-gv_add_by_type is special only for non-GVs, and add AV to GV, otherwise
it is just assigning to GP slot (in this case through GvSV), which
CLEAR_ERRSV already did in another branch, so inline the gv_add_by_type
-dont compute GvSV multiple times, GvSV contains 2 derefs, after this patch
it will contains just 1 deref ("*svp") without an offset (deref without
offset is smaller in x86 machine code than deref with offset)
-SvREFCNT_dec_NN for efficiency
-move SvPOK_only closer to SvMAGICAL, this ensures SvFLAGS is read and
written only once, not 2 reads and 1 write, this is specifically for
RISC-ish cpus
-the goto clresv_newemptypv is because VC optimizer in -O1 didn't combine
the branches
perl521.dll VC 2003 before .text section size in machine code bytes
0xc8a63, after 0xc88e3
Daniel Dragan [Fri, 26 Dec 2014 03:07:07 +0000 (22:07 -0500)]
win32/win32.c Perl_croak->croak_xs_usage
When this XSUB was written croak_xs_usage didn't exist. Now it does. Use it
so the error string is shorter in the perl binary.
Daniel Dragan [Thu, 25 Dec 2014 19:43:14 +0000 (14:43 -0500)]
const the core magic vtables
A remark in
http://www.nntp.perl.org/group/perl.perl5.porters/2006/07/msg115113.html
caused commit
bc028b6b7f /
http://www.nntp.perl.org/group/perl.perl5.porters/2006/07/msg115116.html .
That remark is not true according to
http://www.nntp.perl.org/group/perl.perl5.porters/2006/07/msg115115.html
and
http://www.nntp.perl.org/group/perl.perl5.porters/2013/01/msg197318.html .
To save memory between perl processes, const the tables so the memory is
shared by the OS between perl processes.
b4 .rdata section of x64 VC 2008 miniperl 0x667EE bytes .data 0x3440 bytes
after .rdata 0x66FAE .data 0x2C80, 0x3440-0x2C80=0x7C0 saved,
based on the .data section size crossing a page boundary this saved 4K
of per process memory on Win64 miniperl.
Yves Orton [Fri, 26 Dec 2014 15:26:46 +0000 (16:26 +0100)]
document Perl_sv_getbackrefs() in perldelta
Daniel Dragan [Fri, 26 Dec 2014 05:34:03 +0000 (00:34 -0500)]
[perl #123502] isnan identifier can't be used as a var
cl -c -nologo -GF -W3 -I..\lib\CORE -I.\include -I. -I.. -DWIN32 -D_CONS
OLE -DNO_STRICT -DPERLDLL -DPERL_CORE -O1 -MD -Zi -DNDEBUG -G7 -GL -DPERL_EXTE
RNAL_GLOB -DPERL_IS_MINIPERL -Fo.\mini\pp_sys.obj ..\pp_sys.c
pp_sys.c
..\pp_sys.c(4610) : error C2063: '_isnan' : not a function
NMAKE : fatal error U1077: 'cl' : return code '0x2'
See RT ticket for details.
Father Chrysostomos [Thu, 25 Dec 2014 20:46:01 +0000 (12:46 -0800)]
perl5220delta: B::Generate is fixed
Father Chrysostomos [Thu, 25 Dec 2014 17:57:07 +0000 (09:57 -0800)]
[perl #123495] Stop gmtime(nan) from crashing
We were getting a time struct like this:
$12 = {
tm_sec = -
2147483588,
tm_min =
2147483647,
tm_hour = -
2147483624,
tm_mday = -
2147483647,
tm_mon = 11,
tm_year = 69,
tm_wday = -
2147483641,
tm_yday = -
2147483314,
tm_isdst = 0,
tm_gmtoff = 0,
tm_zone = 0x1004f6bb6 "UTC"
}
which resulted in dayname[tmbuf.tm_wday] reading past the beginning
of the array. We should check for nan explicitly instead of falling
through to the time calculations.
Yves Orton [Thu, 25 Dec 2014 14:44:14 +0000 (15:44 +0100)]
automatically sort the MANIFEST if necessary
Instead of harrasing people to sort the manifest in our
tests, we can just automatically sort the manifest when it
changes.
That way the tests are actually testing that the auto-sort
worked, and not that our devs put the new file in the right
place.
Yves Orton [Thu, 25 Dec 2014 02:53:31 +0000 (03:53 +0100)]
add cast to make c++ happy
Yves Orton [Thu, 25 Dec 2014 02:29:57 +0000 (03:29 +0100)]
Revert "dont compile unused static hash functions"
This reverts commit
09c759bcfa4c2880c571df4da20458b2f781debf.
The reverted patch causes us to not compile functions that we might
not use. In theory this is a good thing. But any competent compiler
is going to exclude them anyway if they aren't used, and we might
miss useful warning messages, or whatnot. See
b404539126a for an
example of a patch that would not have happened, or would only
have been partially done had this patch been applied.
Also the reverted patch claimed that "It is not safe to have multiple
hash funcs in 1 build due to conflicts on the size of
PERL_HASH_SEED_BYTES." which is incorrect. The functions do not
reference PERL_HASH_SEED_BYTES directly, and are usable by anyone
who knows what size of seed they need.
Additionally I have on my long-term todo list the following:
* Allow Perl to randomly select the hash function at startup
* Allow Perl to use the hash function determined by the ENV at startup.
This patch would have to be reverted to complete either of those tasks.
To recap, I am reverting this patch because it adds no real value,
makes our hash functions susceptible to bit-rot, and because it blocks
interesting future changes that I plan to work on in the future.
Yves Orton [Thu, 25 Dec 2014 02:24:23 +0000 (03:24 +0100)]
Rework sv_get_backrefs() so it is simpler, and C++ compliant
We unroll hv_backreferences_p() in sv_get_backrefs() so the logic is simpler,
(we dont need a **SV for this function), and (hopefully) make it C++ compliant
at the same time.
Yves Orton [Thu, 25 Dec 2014 02:21:47 +0000 (03:21 +0100)]
Restructure hv_backreferences_p() so assert makes sense
Prior to this patch the assert was meaningless as we would
use the argument before we asserted things about it.
This patch restructures the logic so we do the asserts first
and *then* use the argument.
Yves Orton [Thu, 25 Dec 2014 02:19:42 +0000 (03:19 +0100)]
Revert "sv.c: Add cast to make C++ happy"
This reverts commit
d49cfb746d789072c374f2403d477feb8017ce89.
Better patch coming.
Father Chrysostomos [Thu, 25 Dec 2014 02:06:03 +0000 (18:06 -0800)]
sv.c: Add cast to make C++ happy
Father Chrysostomos [Wed, 24 Dec 2014 04:19:45 +0000 (20:19 -0800)]
t/bigmem/subst.t: Delete bogus comment
Accidentally copied from regexp.t
Yves Orton [Thu, 25 Dec 2014 01:49:17 +0000 (02:49 +0100)]
fixups to make the porting tests happy
Yves Orton [Thu, 25 Dec 2014 01:26:51 +0000 (02:26 +0100)]
sort manifest
Why do we test for something that can be trivially accomplished by a
make manisort?
This is just makework with no value.
Yves Orton [Thu, 25 Dec 2014 00:33:42 +0000 (01:33 +0100)]
add new API function sv_get_backrefs()
This encapsulates the logic to extract the backrefs from a weak-referent.
Since sv_get_backrefs() can be used for a similar purposes as hv_backreferences_p()
we no longer need to export the later, and therefore this patch also reverts
ad2f46a793b4ade67d45ac0086ae62f6756c2752.
See perl #123473 for related discussion, and https://github.com/Sereal/Sereal/issues/73
for a practical example of why this API is required.
H.Merijn Brand [Wed, 24 Dec 2014 20:09:02 +0000 (21:09 +0100)]
Perl 5 on Haiku - libperl.so not found installing out of standard location
Patch by Leon, checked by Dan Collins
Steve Hay [Wed, 24 Dec 2014 14:49:59 +0000 (14:49 +0000)]
RMG: Note that Porting/release_schedule.pod should be updated
Steve Hay [Wed, 24 Dec 2014 14:49:31 +0000 (14:49 +0000)]
Note that 5.21.6 and 5.21.7 are released
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'
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.
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'
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'
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.
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
Aaron Crane [Wed, 24 Dec 2014 11:54:37 +0000 (11:54 +0000)]
Fix typos in two unrelated test descriptions
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
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
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
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
Father Chrysostomos [Wed, 24 Dec 2014 06:08:48 +0000 (22:08 -0800)]
deparse-skips.txt: comp/require.t passes
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.
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.
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).
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.
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] .
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.
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.
Father Chrysostomos [Tue, 23 Dec 2014 16:47:25 +0000 (08:47 -0800)]
Increase $B::VERSION to 1.55
Father Chrysostomos [Tue, 23 Dec 2014 16:46:32 +0000 (08:46 -0800)]
Some B pad tests
Father Chrysostomos [Tue, 23 Dec 2014 06:32:35 +0000 (22:32 -0800)]
Add id and outid methods to B::PADLIST
We wants them.
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.
Father Chrysostomos [Tue, 23 Dec 2014 01:47:47 +0000 (17:47 -0800)]
perl5220delta: Eval::WithLexicals is fixed
That was quick.
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.
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
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.
Father Chrysostomos [Tue, 23 Dec 2014 00:15:57 +0000 (16:15 -0800)]
deparse-skips.txt: Note a couple skip reasons
Father Chrysostomos [Tue, 23 Dec 2014 00:10:56 +0000 (16:10 -0800)]
deparse-skips.txt: More passing tests
Father Chrysostomos [Mon, 22 Dec 2014 16:24:27 +0000 (08:24 -0800)]
Increase $B::Deparse::VERSION to 1.32