David Mitchell [Tue, 4 Mar 2014 19:03:02 +0000 (19:03 +0000)]
[perl #121362] overload optimisation added a SEGV
My recent commit
3d147ac29d12abdb to "speed up (non)overloaded derefs"
introduced a potential SEGV. In Perl_Gv_AMupdate(), the 'aux' variable is
set to HvAUX(hv). My patch used the value of the variable later on in the
function, but it turns out that by then, S_hsplit() may have been called,
and thus HvARRAY (and HvAUX()) may have been reallocated.
Issue first spotted by Andreas' awesome BBC service, and diagnosed by
Nicholas Clark.
Chris 'BinGOs' Williams [Mon, 3 Mar 2014 22:51:18 +0000 (22:51 +0000)]
Bump Carp to version 1.33
Triggered by commit
b82e68e8acf012df784511a23ba8b2dfbc3853b8
Chris 'BinGOs' Williams [Mon, 3 Mar 2014 22:45:52 +0000 (22:45 +0000)]
Craig A. Berry [Sun, 2 Mar 2014 23:58:31 +0000 (17:58 -0600)]
Refactor and reduce VMS-specific workarounds in POSIX.xs.
Most of this code presupposes pre-7.0 VMS systems, but v7.0 was
released in 1995 and pre-7.0 was desupported in Perl in 5.16. So
slim down to what's needed for the most recent couple of decades.
Craig A. Berry [Sun, 2 Mar 2014 14:33:28 +0000 (08:33 -0600)]
tbuffer_t no longer exists on VMS.
It was replaced by the standard tms struct in v7.0, released in
1995. Explicit support for pre-7.0 was removed in
32995a382d65b
for Perl 5.16, but I missed the tbuffer_t bit, which tripped up
Nicholas in
25983af42cdcf2dc, because he asked for:
struct tbuffer_t
which via macro expansion became:
struct struct tms
which failed to compile. So remove code that's unnecessarily
different on VMS, leaving only a tbuffer_t compatibility macro
with a more appropriate comment so it will hopefully be less
likely to get used in new code.
Nicholas Clark [Sun, 2 Mar 2014 06:17:28 +0000 (07:17 +0100)]
Merge changes to make_ext.pl that build simple extensions directly.
This adds complexity and duplicate logic to make_ext.pl, but reduces build
times. The build time reduction can be significant on platforms which can't
run parallel builds - VMS build time decreased by 39%.
Nicholas Clark [Sat, 1 Mar 2014 10:39:27 +0000 (11:39 +0100)]
On VMS, lib is lib.DIR, etc. make_ext.pl needs to account for this.
Likewise regular files without periods in the names get one appended.
Also, the file generated is pm_to_blib.ts, not pm_to_blib.
Nicholas Clark [Thu, 27 Feb 2014 15:40:54 +0000 (16:40 +0100)]
Describe the improvements to make_ext.pl in perldelta.
Nicholas Clark [Thu, 27 Feb 2014 12:34:46 +0000 (13:34 +0100)]
Generate fallback shell cleanup code for the extensions make_ext.pl handles.
These try to ensure that `make clean` followed by `make distclean` is the
same as running just `make distclean`.
Nicholas Clark [Thu, 27 Feb 2014 11:52:32 +0000 (12:52 +0100)]
make_ext.pl can handle 4 extensions in dist/ which need a Makefile.PL for CPAN.
Nicholas Clark [Thu, 27 Feb 2014 11:21:54 +0000 (12:21 +0100)]
make_ext.pl can also handle extensions with a module tree at the top level.
This gets us Digest and Memoize.
Nicholas Clark [Thu, 27 Feb 2014 10:50:56 +0000 (11:50 +0100)]
make_ext.pl can also handle extensions with a module file at the top level.
Processing this old-style layout gains us another 6 extensions.
Nicholas Clark [Thu, 27 Feb 2014 10:04:19 +0000 (11:04 +0100)]
For simple extensions make_ext.pl can emulate the entire MakeMaker/make dance.
For simple extensions consisting only of Perl modules and Pod, EU::MM
generates a Makefile where the only target that does any work as part of
'all' is 'pm_to_blib', and *that* is just running perl to call
ExtUtils::Installed::pm_to_blib() with those files as arguments, and then
touching pm_to_blib.
Because the top level Makefile's dependency rule for "is an extension built"
is looking for that file pm_to_blib, and all builds (and cleans) of
extension directories are performed by running make_ext.pl, not a direct
recursive make, it means that make_ext.pl can actually directly emulate the
entire work done by EU::MM and make in this particular case. This means that
we save (at least) three subprocesses:
* miniperl to run Makefile.PL
* make
* miniperl to run ExtUtils::Installed::pm_to_blib()
This change obviously adds some logic duplication, but it roughly halves the
time taken for `make test_prep` to figure out that nothing needs doing.
And obviously also saves at least that much time on the actual build, which
may well be 60 seconds / number of cores.
Nicholas Clark [Thu, 27 Feb 2014 09:56:11 +0000 (10:56 +0100)]
Change the test to use itself as test file, instead of the generated Makefile.
The generated Makefile is about to go away :-)
Nicholas Clark [Thu, 27 Feb 2014 09:21:52 +0000 (10:21 +0100)]
Extract fallback_cleanup() to hold the code that writes cleanup shell scripts.
Nicholas Clark [Thu, 27 Feb 2014 09:20:38 +0000 (10:20 +0100)]
make_ext.pl should validate exactly which clean targets it can be used for.
Previously it would accept anything matching /clean$/. Now we check for the 4
names that we know the top level Makefile defines.
Karl Williamson [Sun, 2 Mar 2014 02:35:00 +0000 (19:35 -0700)]
regen/regcharclass.pl: Forbid non-safe macros for multi-char matches
For matches that can match more than a single code point, one should
always use a macro that makes sure that one doesn't read off the end of
the buffer. This is because the buffer might end with the first N
characters of a sequence with at least N+1 in it, and we don't want to
read that N+1 position in the buffer.
If this had been in place, buggy commit
3a8bbffbce would not have
happened.
Karl Williamson [Sun, 2 Mar 2014 02:27:43 +0000 (19:27 -0700)]
regen/regcharclass.pl: Don't generate unused macros
The macros generated by these options are not needed in the core;
generating them just clutters up the header file, and some will actually
be forbidden by the next commit.
Karl Williamson [Sun, 2 Mar 2014 01:47:10 +0000 (18:47 -0700)]
Revert most of
3a8bbffbce: Avoid unnecessary malformed checking
My thinking was muddled when I made that commit, and this reverts the
essence of it. The theory was that since we have already processed the
regex pattern, we don't need to check it for malformedness, hence we
don't need the "safe" form of certain macros that check for and avoid
running off the end of the buffer. It is true that we don't have to
worry about malformedness indicating that the buffer is bigger than it
really is, but these macros can match up to three well-formed
characters, so we do have to make sure that all three are in the buffer,
and that the input isn't just the first two at the buffer's end.
This was caught by running valgrind.
Karl Williamson [Sun, 2 Mar 2014 01:28:30 +0000 (18:28 -0700)]
perluniprops: Show property name without braces
Properties wth single letter names may be expressed with and without the
brakces; \p{L} and \pL are synonymous. This commit makes both forms
be in perluniprops, so someone who doesn't know the detailed rules can
search for either to see what it is.
This was suggested by Zsbán Ambrus.
Karl Williamson [Fri, 28 Feb 2014 18:46:10 +0000 (11:46 -0700)]
regen/regcharclass.pl: White-space; comment nits only
Indent to account for new block added in the previous commit
Karl Williamson [Fri, 28 Feb 2014 18:24:01 +0000 (11:24 -0700)]
regen/regcharclass.pl: Simplify generated safe macros
This simplifies the macros generated which make sure there are no read
errors. Prior to this commit, the code generated looked like
(e - s) > 3
? see if things of at most length 4 match
: (e - s) > 2
? see if things of at most length 3 match
: (e - s) > 1
? see if things of at most length 2 match
: (e - s) > 0
? see if things of at most length 1 match
For things that are a single character, the ones greater than length 2
must be in UTF8, and their needed length can be determined by UTF8SKIP,
so we can get rid of most of the (e-s) tests.
This doesn't change the macros which can match multiple characters; that
is a harder to do.
Karl Williamson [Fri, 28 Feb 2014 17:27:49 +0000 (10:27 -0700)]
Unicode/UCD.t: Fix broken test
The test file special cases certain properties by name. However, it
turns out that a Unihan property that isn't normally compiled by Perl
also should be included. And all these properties share the same format
given in their files. So, instead of using the property names, use that
format; this leads to code which is general, and simpler at the same time.
Karl Williamson [Fri, 28 Feb 2014 16:58:33 +0000 (09:58 -0700)]
mktables: Allow Unicode Unihan files to compile
Perl normally doesn't include the Unicode Unihan files, but someone is
free to recompile Perl with these. However, starting with commit
9e65c3f47e483ee7e33b5d748a06f4addd830d60, mktables checks for the
version number on the input files and refuses to compile if incorrect.
(This is to catch Perl trying to compile from a DB with inconsistent
files; I believe Perl used to be shipped with these synchronization
errors.) However, the Unihan files in Unicode 6.3 do not have the same
syntax as the rest of the files, so since that commit Perl refuses to
compile Unihan.
The files are being updated in 7.0 to use the same syntax as the rest,
so rather than hard-code the current syntax as an exception into
mktables, this just skips checking these files until 7.0.
Karl Williamson [Thu, 27 Feb 2014 17:25:24 +0000 (10:25 -0700)]
regen/regcharclass.pl: Warn that macros are internal only
This adds a comment to the generated file that the macros are not to be
generally used.
Nicholas Clark [Sat, 1 Mar 2014 16:58:05 +0000 (17:58 +0100)]
No need for code conditional on S_IFMT being defined, as perl.h has a fallback.
Commit
c623bd54707a8bf9 (Jan 1991) added code conditionally compiled if
S_IFMT was defined. However, the checks were immediately redundant, because
the same commit also added code to perl.h to define a fallback value for
S_IFMT if the OS headers did not define it, which is unchanged to this day.
Hence the code added in an #else as part of commit
99b89507a1fb507c (Nov
1991) has never ever been needed.
Nicholas Clark [Sat, 1 Mar 2014 16:40:05 +0000 (17:40 +0100)]
pp_tms should use a local struct tms, instead of PL_timesbuf.
PL_timesbuf is effectively a vestige of Perl 1, and doesn't actually need to
be an interpreter variable. It will be removed early in v5.21.x, but it's a
good idea to refactor the code not to use it before then. A local struct tms
will be on the C stack, which will be in the CPU's L1 cache, whereas the
relevant part of the interpreter struct may well not be in the CPU cache at
all. Therefore this change might reduce cache pressure fractionally. A local
variable access should also be simpler machine code on most CPU architectures.
Nicholas Clark [Sat, 1 Mar 2014 12:35:16 +0000 (13:35 +0100)]
Commit
5c85b638cb45ea2b inadvertently broke the -DDEBUGGING build.
The macros assert_not_ROK(sv) and assert_not_glob(sv) are intended to be used
in expressions, and finish with a trailing comma, so they shouldn't have a ;
after them.
David Mitchell [Fri, 28 Feb 2014 19:46:15 +0000 (19:46 +0000)]
[MERGE] tweak in-place branch of SAVEt_CLEARSV
clean up the code that clears lexical vars on scope exit; chiefly, wrap
all the individual 'unusual case' flag tests in a single big test of the
union of all such flags, so that simple lexical vars skip all the tests.
David Mitchell [Fri, 28 Feb 2014 19:25:51 +0000 (19:25 +0000)]
SAVEt_CLEARSV: only clear-in-place if RC==1
Currently it takes the 'clear-in-place' branch on lexical vars if
the ref count is <= 1. However, RC < 1 is a "should never happen"
condition, so rather than keeping that damaged var, take the other branch,
which will call SvREFCNT_dec() on it, which will Do the Right Thing
(like emitting a warning).
David Mitchell [Fri, 28 Feb 2014 18:40:10 +0000 (18:40 +0000)]
SAVEt_CLEARSV: handle SvOOK() specially
Add SVf_OOK to the list of flags that are handled in the 'slow' branch.
This allows us to avoid checking for hv_kill_backrefs() or sv_backoff()
for the majority of lexicals which won't require it.
David Mitchell [Fri, 28 Feb 2014 18:35:02 +0000 (18:35 +0000)]
SAVEt_CLEARSV: expand SvOK_off() macro
the next commit will change thinks that affect only part of the macro
David Mitchell [Fri, 28 Feb 2014 17:51:47 +0000 (17:51 +0000)]
SAVEt_CLEARSV: simplify SvREADONLY_off() condition
SAVEt_CLEARSV should always be called with SvPADMY() true, so don't test
for it, but assert it instead. Then change this:
if (SvPADMY(sv) && !SvFAKE(sv))
SvREADONLY_off(sv);
The SvPADMY() isn't needed, but we should test for RO-ness instead, to
avoid an unnecessary SvREADONLY_off().
David Mitchell [Fri, 28 Feb 2014 17:45:37 +0000 (17:45 +0000)]
SAVEt_CLEARSV: reindent after previous commit
whitespace-only changes
David Mitchell [Fri, 28 Feb 2014 17:32:57 +0000 (17:32 +0000)]
SAVEt_CLEARSV: check common flags
In the 'clear' branch of SAVEt_CLEARSV, there are several individual
if (SvSOMEFLAG(sv)) {...} tests. Wrap all these tests in a single
if (SvFLAGS(sv) & (union|of|all|flags)), so that for the common case
of boring lexicals that don't need special clear up, we can skip all the
individual tests
David Mitchell [Fri, 28 Feb 2014 14:48:16 +0000 (14:48 +0000)]
S_regmatch(): merge BOL and SBOL branches
The code body is the same for both of them.
David Mitchell [Fri, 28 Feb 2014 14:37:13 +0000 (14:37 +0000)]
copy xhv_rand and xhv_last_rand in threads clone
valgrind complains about these fields being uninitialised when cloned into a
new thread, because they aren't copied. It's fairly harmless, since these
fields are just used to perturb hash key iteration; but for completeness,
clone these fields too.
David Mitchell [Sun, 23 Feb 2014 13:25:05 +0000 (13:25 +0000)]
[perl #121230] fix kill -SIG on win32
v5.17.1-137-gc2fd40c tidied up perl's kill() implementation, making
-SIGNAME be handled correctly, It also eliminated the use of the killpg()
system/library call, which these days is usually just a thin wrapper over
kill(). By doing this, it assumed that the following are functionally
equivalent:
killpg(pgrp, sig)
kill(-pgrp, sig).
Unfortunately this broke Window's use of the (perl-level)
kill negative_value, pid, ...
since under Windows, the killpg()/kill() identity doesn't hold
(win32_kill() uses negative ids for fake-PIds, not process groups).
Fix this by restoring the use of killpg() where available.
David Mitchell [Sat, 15 Feb 2014 22:47:16 +0000 (22:47 +0000)]
speed up (non)overloaded derefs
Consider a class that has some minimal overloading added - e.g. to give
pretty stringification of objects - but which *doesn't* overload
dereference methods such as '@[]'. '%[]' etc.
In this case, simple dereferencing, such as $obj->[0] or $obj->{foo}
becomes much slower than if the object was blessed into a non-overloaded
class.
This is because every time a dereferencing is performed in pp_rv2av for
example, the "normal" code path has to go through the full checking of:
* is the stash into which the referent is blessed overloaded? If so,
* retrieve the overload magic from the stash;
* check whether the overload method cache has been invalidated and if so
rebuild it;
* check whether we are in the scope of 'no overloading', and if so
is the current method disabled in this scope?
* Is there a '@{}' or whatever (or 'nomethod') method in the cache?
If not, then process the ref as normal.
That's a lot of extra overhead to decide that an overloaded method doesn't
in fact need to be called.
This commit adds a new flag to the newish xhv_aux_flags field,
HvAUXf_NO_DEREF, which signals that the overloading of this stash
contains no deref (nor 'nomethod') overloaded methods. Thus a quick check
for this flag in the common case allows us to short-circuit all the above
checks except the first one.
Before this commit, a simple $obj->[0] was about 40-50% slower if the
class it was blessed into was overloaded (but didn't have deref methods);
after the commit, the slowdown is 0-10%. (These timings are very
approximate, given the vagaries of nano benchmarks.)
David Mitchell [Sat, 15 Feb 2014 16:46:40 +0000 (16:46 +0000)]
Document what the gv_check() function does
David Mitchell [Sat, 15 Feb 2014 16:38:31 +0000 (16:38 +0000)]
gv_check(): use aux flag rather than IsCOW
Currently the SVf_IsCOW flag doesn't have any meaning for HVs,
except that it is used in the specific case of gv_check() to temporarily
mark a stash as being scanned. Since stashes will have the HV_AUX fields,
we can use a flags bit in the new xhv_aux_flags field instead.
This then potentially frees up the SVf_IsCOW for use as a new general flag
bit for *all* HVs (including non-stash ones).
David Mitchell [Sat, 15 Feb 2014 16:15:11 +0000 (16:15 +0000)]
add aux_flags field to HVs with aux struct
Add an extra U32 general flags field to the xpvhv_aux struct (which is
used on HVs such as stashes, that need extra fields).
On 64-bit systems, this doesn't consume any extra space since there's
already an odd number of I32/U32 fields. On 32-bit systems it will consume
an extra 4 bytes. But of course only on those hashes that have the aux
struct.
As well as providing extra flags in the AUX case, it will also allow
us to free up at least one general flag bit for HVs - see next commit.
David Mitchell [Sun, 23 Feb 2014 00:53:17 +0000 (00:53 +0000)]
make OP_AELEMFAST work with negative indices
Use aelemfast for literal index array access where the index is in the
range -128..127, rather than 0..255.
You'd expect something like $a[-1] or $a[-2] to be a lot more common than
$a[100] say. In fact a quick CPAN grep shows 66 distributions
matching /\$\w+\[\d{3,}\]/, but "at least" 1000 matching /\$\w+\[\-\d\]/.
And most of the former appear to be table initialisations.
David Mitchell [Thu, 27 Feb 2014 16:32:34 +0000 (16:32 +0000)]
[MERGE] optmise pp_entersub code
Do various bits of minor fiddling with the code of Perl_pp_entersub
to make the binary smaller and hopefully faster. All the usual stuff:
sprinkling LIKELY(), altering scope of vars etc.
All of this should make no functional difference, expect conceivably the
"SvPADTMP() not on IS_PADGV()" change (which also affects code outside
pp_entersub()).
This series of commits reduces the size of the pp_entersub object on gcc
x86_64 by about 11%, and shows no measurable change in performance (i.e.
noise dominates).
David Mitchell [Thu, 27 Feb 2014 15:30:26 +0000 (15:30 +0000)]
don't set SvPADTMP() on PADGV's
Under threaded builds, GVs for OPs are stored in the pad rather than
being directly attached to the op. For some reason, all such GV's were
getting the SvPADTMP flag set. There seems to be be no good reason for
this, and after skipping setting the flag, all tests still pass.
The advantage of not setting this flag is that there are quite a few
hot places in the code that do
if (SvPADTMP(sv) && !IS_PADGV(sv)) {
...
I've replaced them all with
if (SvPADTMP(sv)) {
assert(!IS_PADGV(sv));
...
Since the IS_PADGV() macro expands to something quite heavyweight, this is
quite a saving: for example this commit reduces the size of pp_entersub by
111 bytes.
David Mitchell [Wed, 26 Feb 2014 22:39:52 +0000 (22:39 +0000)]
pp_entersub(): simplify XSUB arg cleanup code
The code that reduces the returned XS args to 1 arg in scalar context
was a bit messy. This makes it smaller, more comprehensible, with slighylu
smaller object size.
David Mitchell [Wed, 26 Feb 2014 20:54:05 +0000 (20:54 +0000)]
move PL_defgv nearer the top of intrvar.h
on the grounds that its a reasonably hot variable.
David Mitchell [Wed, 26 Feb 2014 20:47:32 +0000 (20:47 +0000)]
pp_entersub(): tweak some vars
make the scope of item be smaller;
don't assign +1 to MARK when we will shortly overwrite it;
use a local var to to store &GvAV(PL_defgv) to avoid recalculating it
use a _NN variant of SvREFCNT_inc
Shaves 2% off the object size of pp_entersub.
David Mitchell [Wed, 26 Feb 2014 18:03:56 +0000 (18:03 +0000)]
pp_entersub(): assign CvDEPTH to a local var
stop repeatedly retrieving it
David Mitchell [Wed, 26 Feb 2014 17:47:47 +0000 (17:47 +0000)]
pp_entersub(): re-indent block
the previous commit wrapped a switch statement in an if(), so re-indent
accordingly. Whitespace-only change.
David Mitchell [Wed, 26 Feb 2014 17:38:33 +0000 (17:38 +0000)]
tweak pp_entersub
liberally sprinkle some LIKELY()s, initialise gimme closer to where
it's first needed, and shortcut the common case of a GV with valid CV,
skipping the switch statement.
With gcc and x86_64, this reduces the code size of the function by
about 5%.
Steffen Mueller [Thu, 27 Feb 2014 07:22:17 +0000 (08:22 +0100)]
Remove spurious assert
kid is always dereferenced before the assert.
Steve Hay [Wed, 26 Feb 2014 22:26:45 +0000 (22:26 +0000)]
Remove leftover Windows 95 / Windows NT4 support code
We only support building or running on Windows 2000 or higher, as of the
Windows 95 Chainsaw Massacre commit (
8cbe99e5b6). These three chunks of
code escaped the massacre, but the chainsaw has finally caught up with them
now.
Steffen Mueller [Wed, 26 Feb 2014 20:51:56 +0000 (21:51 +0100)]
List-OP removal: Fix compile fail on C90
Apologies. I'd applied Reini's patch to my optimization branch. I think
it got lost when I switched to Dave's variant my original code (which
didn't have Reini's C90 fix). Sorry!
Steffen Mueller [Sat, 22 Feb 2014 09:08:25 +0000 (10:08 +0100)]
Optimization: Remove needless list/pushmark pairs from the OP execution
This is an optimization for OP trees that involve list OPs in list
context. In list context, the list OP's first child, a pushmark, will do
what its name claims and push a mark to the mark stack, indicating the
start of a list of parameters to another OP. Then the list's other
child OPs will do their stack pushing. Finally, the list OP will be
executed and do nothing but undo what the pushmark has done. This is
because the main effect of the list OP only really kicks in if it's
not in array context (actually, it should probably only kick in if
it's in scalar context, but I don't know of any valid examples of
list OPs in void contexts).
This optimization is quite a measurable speed-up for array or hash
slicing and some other situations. Another (contrived) example is
that (1,2,(3,4)) now actually is the same, performance-wise as
(1,2,3,4), albeit that's rarely relevant.
The price to pay for this is a slightly convoluted (by standards other
than the perl core) bit of optimization logic that has to do minor
look-ahead on certain OPs in the peephole optimizer.
A number of tests failed after the first attack on this problem. The
failures were in two categories:
a) Tests that are sensitive to details of the OP tree structure and did
verbatim text comparisons of B::Concise output (ouch). These are just
patched according to the new red in this commit.
b) Test that validly failed because certain conditions in op.c were
expecting OP_LISTs where there are now OP_NULLs (with op_targ=OP_LIST).
For these, the respective conditions in op.c were adjusted.
The change includes modifying B::Deparse to handle the new OP tree
structure in the face of nulled OP_LISTs.
Steffen Mueller [Fri, 21 Feb 2014 17:58:04 +0000 (18:58 +0100)]
Macro for common OP checks: "is this X or was it before NULLing?"
For example,
if (OP_TYPE_IS_OR_WAS(o, OP_LIST))
...
is now available instead of either of the following:
if ( o
&& ( o->op_type == OP_LIST
|| (o->op_type == OP_NULL
&& o->op_targ == OP_LIST) ) )
...
if ( o &&
(o->op_type == OP_NULL ? o->op_targ ? o->op_type) == OP_LIST )
...
In case the above logic is a bit unclear: It checks whether that OP is
an OP_LIST or used to be one before being NULLed using op_null.
(FTR, the resulting OP_NULLs have their op_targ set to the old OP type).
This sort of check (and it's reverse "isn't and didn't use to be") are a
relatively common pattern in the part of op.c that tries to intuit
structures from optimization-mangled OP trees. Hopefully, using these
macros will make some code a fair amount clearer.
Steve Hay [Wed, 26 Feb 2014 08:19:11 +0000 (08:19 +0000)]
Remove IO::Socket::IP examples as per Porting/Maintainers.pl
Chris 'BinGOs' Williams [Tue, 25 Feb 2014 11:16:00 +0000 (11:16 +0000)]
Update Pod-Perldoc to CPAN version 3.23
[DELTA]
3.23 - Sun Feb 23 18:54:43 UTC 2014
* Release 3.23
Yes, this is a packaging error. Mea culpa. In the future
test releases will be 3.23_01, etc.
See https://twitter.com/frioux/status/
429245594180128769
for context.
3.22_02 - Wed Feb 5 05:08:34 UTC 2014
* Add a pager that doesn't redirect stdin RT#85173
Added a special pager environment variable for use
when perldoc is in the -m mode that doesn't
redirect STDIN. Set PERLDOC_SRC_PAGER to use.
As in:
PERLDOC_SRC_PAGER=/usr/bin/vim perldoc -m File::Temp
* Teach ToTerm.pm to get terminal width RT#85467
Get a terminal width and pass it to Pod::Text::Termcap
from one of these sources (in order):
1. An explicit width set from command line with -w
2. MANWIDTH environment variable
3. stty output
4. The default width of 76 (same as Pod::Text)
3.22_01 - Sat Feb 1 05:00:13 UTC 2014
* Match =item more carefully when scanning perlfunc.
Fixes RT #86795. Previously matches could be generated
on words like 'size' and 'precision' which are not
Perl functions.
* Cleanup code related to mandoc RT #85844
Patch by Ingo Schwarze
* Re-add '-U' flag to skip attempting to drop
privileges. RT #87837
* Do not install to INSTALLDIRS after Perl 5.11 RT #89756
* Refactor search_perlop (finds operators like 'q'
'qq' 'tr' and others) RT #86506. Previously most of
the text generated was incorrect.
* Fix wrong version in DEBUG output from ToTerm.pm RT #85468
* Fix POD errors when scanning parts of perlfunc RT #86472
Patch by Shlomi Fish.
Chris 'BinGOs' Williams [Tue, 25 Feb 2014 11:10:09 +0000 (11:10 +0000)]
Update CPAN-Meta-YAML to CPAN version 0.012
Includes
cc53c151 fix for VMS
[DELTA]
0.012 2014-02-24 13:07:18-05:00 America/New_York
- Generated from ETHER/YAML-Tiny-1.61.tar.gz
Chris 'BinGOs' Williams [Tue, 25 Feb 2014 11:04:29 +0000 (11:04 +0000)]
Update IO-Socket-IP to CPAN version 0.29
[DELTA]
0.29 2014/02/24 16:06:29
[BUGFIXES]
* Workaround for OSes that disobey AI_ADDRCONFIG and yield AIs on
families the kernel will not support anyway (e.g. HPUX)
* Workaround for OSes that lack getprotobyname() (e.g. Android)
Yves Orton [Tue, 25 Feb 2014 11:07:18 +0000 (12:07 +0100)]
Fix RT #121321 - Fencepost error causes infinite loop in regex compilation
Due to a fencepost error if a pattern had more than 9 capture buffers
and after the last capture buffer there was an octal style escape which
when interpreted as decimal evaluated to one more than the number of
defined buffers then the regex compiler would go into an infinite loop.
This fixes the fencepost error, adds tests, and adds some comments to
explain what is going on.
Nicholas Clark [Tue, 25 Feb 2014 10:36:26 +0000 (11:36 +0100)]
Use a temporary file instead of $^X when testing stat.
Otherwise there's a subtle race condition on the last access time, which can
cause the test to spuriously fail. I'm surprised that we've not seen this
failure until today.
Steve Hay [Tue, 25 Feb 2014 08:59:07 +0000 (08:59 +0000)]
Silence some VC++ compiler warnings
gv.c(1455) : warning C4146: unary minus operator applied to unsigned type, result still unsigned
gv.c(1586) : warning C4146: unary minus operator applied to unsigned type, result still unsigned
gv.c(2122) : warning C4146: unary minus operator applied to unsigned type, result still unsigned
toke.c(12423) : warning C4244: '=' : conversion from 'I32' to 'char', possible loss of data
win32.c(3017) : warning C4022: 'SetHandleInformation' : pointer mismatch for actual parameter 1
win32.c(2971) : warning C4101: 'old_h' : unreferenced local variable
win32.c(2967) : warning C4101: 'oldfd' : unreferenced local variable
Karl Williamson [Mon, 24 Feb 2014 19:00:03 +0000 (12:00 -0700)]
lib/locale.t: Make more tests not fail unless is bad for enough locales
locale.t has some tests that fail even one locale fails; and it has some
tests where failure doesn't happen unless a sufficient percentage of
locales have the same problem.
The first set should be for tests whose failure indicates a basic
problem in locale handling; and the second set should be for tests where
it could be that just a locale definition is bad.
Prior to this patch, tests dealing with radix problems were considered
in the first category, but in fact it's possible that just the locale
definition for the radix is wrong. This is what happened for some older
Darwin versions for their Basque locales, which caused locale.t to show
failures, whereas it was just these locales that were bad, and the
generic handling was ok, or good enough. (The actual failures had the
radix be the two character string: apostrophe followed by a blank. It
would be a lot of work to make Perl deal with having a quote character
also mean a decimal point, and that work isn't worth it, especially as
this was a locale definition error, and we don't know of any locale in
the world where an apostrophe is legitimately a radix character.)
For this commit, I looked through the tests, and I added the tests where
it seemed that the problem could just be a bad locale definition to the
list of such tests. Note that failures here could mean an internal Perl
error, but in that case, it should affect many more locales, so will
show up anyway as the failure rate should exceed the acceptable one.
Karl Williamson [Mon, 24 Feb 2014 18:56:47 +0000 (11:56 -0700)]
lib/locale.t: Change an array to a hash
This is more naturally a hash in that it is a list of numbers, not
necessarily consecutive, and each time through the loop the same number
was getting pushed, so had multiple entries for each by the time it was
finished.
Steffen Mueller [Mon, 24 Feb 2014 17:07:16 +0000 (18:07 +0100)]
Missing version bump for Deparse
Not a good run, I am having. But also not anything tangible
that our silly tests caught me on. :(
Steffen Mueller [Mon, 24 Feb 2014 17:00:08 +0000 (18:00 +0100)]
Test fix: Update list of B::Concise functions
Imagine there was a test that actually broken open a core module's
package and looked at all of its subs and compared it to a hardcoded
list of "constant" and "xs" functions. That would be madness, wouldn't
it? Breaking encapsulation, no less? Require tedious synchronization?
m(
Steffen Mueller [Mon, 24 Feb 2014 13:39:08 +0000 (14:39 +0100)]
B::Deparse: Padrange deparse fix
The PADRANGE support fakes up a PUSHMARK OP but until this commit, it
did so incompletely since it never overrode the OP type (that was still
an OP_PADRANGE). This addresses that.
On top of it, there's two minor changes that switch from "eq" to "=="
for comparing numeric OP types.
Yves Orton [Sun, 23 Feb 2014 19:53:51 +0000 (20:53 +0100)]
fix RT #121299 - Inconsistent behavior with backreferences nested inside subpattern references
Match variables should be dynamically scoped during GOSUB and GOSTART.
The callers state should be inherited by the callee, but once the callee
returns, the callers state should be restored.
This is different from EVAL, where the callers and callees state are
expected to not be the same (although might be the same), and where
the "reasonable" match semantics differ. Currently the following two
one liners will produce different results:
$ ./perl -Ilib -le'"<ab><>>" =~/ < (?: \1 | [ab]+ ) (>) (?0)? /x and print $&;'
<ab><>>
$ ./perl -Ilib -le'$qr= qr/ < (?: \1 | [ab]+ ) (>) (??{ $qr })? /x; "<ab><>>" =~ m/$qr/ and print $&;'
<ab>
While I think reasonable people could argue that we should special case
things when we know that the return from (??{ ... }) is the same as the
currently executing pattern I think explaining the difference would be
harder than necessary.
On the contrary making GOSUB/GOSTART exactly the same as EVAL, so that
the match vars were totally independent seems to throw away an
opportunity for much more powerful semantics than can be offered by
EVAL.
Yves Orton [Sun, 23 Feb 2014 17:59:48 +0000 (18:59 +0100)]
Improve how regprop dumps REF-like nodes during execution
We pass in the regmatch_info struct, which allows us to dump
what a given REF is going to match.
Yves Orton [Fri, 21 Feb 2014 11:54:02 +0000 (12:54 +0100)]
comments and whitespace fixups to inprove clarity of the code
Craig A. Berry [Mon, 24 Feb 2014 02:47:07 +0000 (20:47 -0600)]
test nit in CPAN-Meta-YAML/t/31_local_tml.t
Directories on VMS have a .DIR extension. This test appears to be
constructing method names from directory names, so we need to trim off
the extension to get it to pass.
Awaiting upstream application at:
https://rt.cpan.org/Public/Bug/Display.html?id=93297
David Mitchell [Sun, 23 Feb 2014 16:04:38 +0000 (16:04 +0000)]
fix win32 build
dca36a0cc embedded #ifdefs within a macro call, which is naughty (I
think). So have the ifdef outside the macro instead
Father Chrysostomos [Mon, 17 Feb 2014 06:25:27 +0000 (22:25 -0800)]
[perl #121259] Always allow COW after $input=<>
sv_grow provides an extra byte for the sake of copy-on-write’s buffer
reference count, but skips this for multiples of 256 (though the com-
ments there say powers of two).
When we do
$input=<>
The assignment is optimised away and the allocation takes place in
sv_gets. In that code path, we know we don’t need a nice power of
two and allocating an extra byte won’t hurt, so go ahead and add an
extra byte.
This speeds up code doing m//g on $input, because it avoids the pre-
match copy.
Chris 'BinGOs' Williams [Fri, 21 Feb 2014 16:08:01 +0000 (16:08 +0000)]
Module-CoreList 3.07 released to CPAN, bump core version to 3.08
Steve Hay [Fri, 21 Feb 2014 08:37:37 +0000 (08:37 +0000)]
Fix syncing of Config-Perl-V with CPAN version 0.20
Commit
d0fa2fb96e removed some erroneous changes made by commit
0b39d4dc4a
but didn't quite restore 21_plv518.t to match the CPAN version.
Steve Hay [Fri, 21 Feb 2014 08:12:35 +0000 (08:12 +0000)]
Upgrade HTTP-Tiny from version 0.042 to 0.043
Tony Cook [Fri, 21 Feb 2014 04:15:26 +0000 (15:15 +1100)]
Tony Cook [Mon, 17 Feb 2014 04:21:34 +0000 (15:21 +1100)]
bump $base::VERSION to 2.22
Tony Cook [Mon, 17 Feb 2014 04:19:34 +0000 (15:19 +1100)]
[perl #121196] only examine the name being included
Checking the location called from broke require overrides.
Tony Cook [Fri, 21 Feb 2014 03:47:05 +0000 (14:47 +1100)]
Chris 'BinGOs' Williams [Thu, 20 Feb 2014 23:31:43 +0000 (23:31 +0000)]
Update Module-Load to CPAN version 0.32
[DELTA]
0.32 Thu Feb 20 22:53:19 GMT 2014
* Fix tests to support statically built perls
Craig A. Berry [Thu, 20 Feb 2014 22:25:28 +0000 (16:25 -0600)]
Only define Perl__get_regclass_nonbitmap_data once.
It was added in
77d654fbc7477bd but since it is exported, it
should not be defined in both the core and the extension versions
of regex code. Doing so causes a multiply defined symbol warning
in the VMS linker and results in a build failure. It might cause
trouble in any other environment with a strict linker.
Tony Cook [Thu, 20 Feb 2014 22:12:58 +0000 (09:12 +1100)]
[perl #120939] at least fix the leak in const_av_xsub
Chris 'BinGOs' Williams [Thu, 20 Feb 2014 20:56:46 +0000 (20:56 +0000)]
Update ExtUtils-MakeMaker to CPAN version 6.90
[DELTA]
6.90 Thu Feb 20 20:46:04 GMT 2014
No changes from 6.89_01
6.89_01 Mon Feb 17 15:56:39 GMT 2014
Bug fixes:
* Libraries are not transitive on Android
Karl Williamson [Thu, 20 Feb 2014 18:29:15 +0000 (11:29 -0700)]
Restore proper functioning of -Mdiagnostics
Commit
1c604e7c7f fixed some pod errors, but broke
./perl -Ilib -Mdiagnostics -e '$/=[]'
This fixes that.
Karl Williamson [Thu, 20 Feb 2014 18:10:39 +0000 (11:10 -0700)]
Change 'semantics' to 'rules'
The term 'semantics' in documentation when applied to character sets is
changed to 'rules' as being a shorter less-jargony synonym in this case.
This was discussed several releases ago, but I didn't get around to it.
Karl Williamson [Thu, 20 Feb 2014 17:28:58 +0000 (10:28 -0700)]
Change av_len calls to av_tindex for clarity
av_tindex is a more clearly named synonym for av_len, available starting
in v5.18. This changes the core uses to it, including modules in /ext,
which are not dual-lifed.
Karl Williamson [Thu, 20 Feb 2014 17:23:23 +0000 (10:23 -0700)]
Bump version numbers
These four core-only modules are about to be changed so that they call
av_tindex instead of av_len. There's no chance that any of the version
numbers will need to be reverted, as we think that bumping a single-life
module's version is harmless.
Nicholas Clark [Thu, 20 Feb 2014 15:54:09 +0000 (16:54 +0100)]
Update ribasushi's e-mail address.
Peter Rabbitson [Thu, 20 Feb 2014 15:14:42 +0000 (16:14 +0100)]
Fix pod typo (kentnl++)
H.Merijn Brand [Thu, 20 Feb 2014 11:00:15 +0000 (12:00 +0100)]
One typo fix was missed in upgrading Config::Perl::V to 0.20
The modified for blead change has been reverted
The -V output as checked for 5.10.x and 5.18.x will not change
with changes in blead.
I will add new test files for all most recent maint releases
and will add one for 5.10.0 when it is out
Chris 'BinGOs' Williams [Thu, 20 Feb 2014 10:54:58 +0000 (10:54 +0000)]
Module-CoreList 3.06 released to CPAN
H.Merijn Brand [Thu, 20 Feb 2014 10:37:47 +0000 (11:37 +0100)]
Amend Porting/core-cpan-diff
Allow -v with -x
Show diff for customized scripts when -d and -v
Allow -v #
Set -d if -v 3 and up
Tony Cook [Thu, 20 Feb 2014 07:10:51 +0000 (18:10 +1100)]
prepare Module::CoreList for next release
Tony Cook [Thu, 20 Feb 2014 05:32:01 +0000 (16:32 +1100)]
bump to version 5.19.10 and fix the version number reference in op.c
Tony Cook [Thu, 20 Feb 2014 05:06:18 +0000 (16:06 +1100)]
new perldelta for 5.19.10
Tony Cook [Thu, 20 Feb 2014 05:02:57 +0000 (16:02 +1100)]
avoid leaving the old perldelta as a symlink
In a built tree, the name we copy perldelta.pod to is a symlink to
perldelta.pod, and if you blindly follow the git adds, you end up
adding a symlink to the commit.
unlink() the name we're about to overwrite before we overwrite it to
prevent that.
Tony Cook [Thu, 20 Feb 2014 04:56:00 +0000 (15:56 +1100)]
record the 5.19.9 epigraph
Tony Cook [Thu, 20 Feb 2014 04:40:24 +0000 (15:40 +1100)]
merge 5.19.9 release branch