This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Jarkko Hietaniemi [Fri, 5 Dec 2014 03:08:28 +0000 (22:08 -0500)]
gcc thinks it can see how 'entry' can be accessed uninitialized.
Jarkko Hietaniemi [Fri, 5 Dec 2014 02:58:56 +0000 (21:58 -0500)]
POSIX nan: declaring s always potentially unused.
Jarkko Hietaniemi [Fri, 5 Dec 2014 02:41:11 +0000 (21:41 -0500)]
Unused hv_store() result.
Jarkko Hietaniemi [Fri, 5 Dec 2014 02:40:19 +0000 (21:40 -0500)]
Unused var.
Jarkko Hietaniemi [Fri, 5 Dec 2014 02:23:59 +0000 (21:23 -0500)]
printf type-matching continues. again.
Father Chrysostomos [Fri, 5 Dec 2014 22:46:53 +0000 (14:46 -0800)]
Deparse PVMG stubs
Creating a weak reference to a stash entry will cause it to be of type
PVMG, if it was not a GV already. B::Deparse was trying to determine,
based on the internal SV type, whether it had a sub stub. It should
be checking flags instead, otherwise valid stubs get omitted.
Father Chrysostomos [Fri, 5 Dec 2014 14:21:35 +0000 (06:21 -0800)]
Deparse predeclared prototyped subs
A predeclared sub without a prototype works fine:
$ ./perl -Ilib -MO=Deparse -e 'sub f; sub f{}; foo()'
sub f {
}
foo();
-e syntax OK
A prototyped sub with no predeclaration is fine:
$ ./perl -Ilib -MO=Deparse -e ' sub f($){}; foo()'
sub f ($) {
}
foo();
-e syntax OK
A prototyped stub is fine:
$ ./perl -Ilib -MO=Deparse -e 'sub f($); foo()'
sub f ($);
foo();
-e syntax OK
Only a predeclared prototyped sub seems to have trouble appear-
ing properly:
$ ./perl -Ilib -MO=Deparse -e 'sub f($); sub f($){}; foo()'
sub f;
foo();
-e syntax OK
The code that searches the stashes (stash_subs) was assuming that any-
thing of type B::PV was a prototype. In this case, the stash entry
started as a string and then got ‘downgraded’ to a reference, so
internally it is of type PV (which can hold a ref), which B represents
as B::PV, so the assumption that a PV is a prototyped stub is wrong.
Steffen Mueller [Fri, 5 Dec 2014 19:43:08 +0000 (20:43 +0100)]
Revert "Remove branch seemingly untaken"
This reverts commit
9349a6bbb9de151e5385038b962ceff7c7278b53.
It is taken. Sigh. I'm sorry.
Steffen Mueller [Fri, 5 Dec 2014 16:23:55 +0000 (17:23 +0100)]
Remove branch seemingly untaken
An HV* that is not an SVt_PVHV? Maybe I don't have sufficient fantasy.
This branch goes back to 1994, so things have changed ... a bit since
then.
Father Chrysostomos [Fri, 5 Dec 2014 06:41:02 +0000 (22:41 -0800)]
Restore profile dump under PERL_DESTRUCT_LEVEL
$ ./perl -Ilib -DP -e0
filter_add func
1000dfa20 ()
filter_read 0: via function
7f8fd302fe88 ()
filter_read 0: via function
7f8fd302fe88 ()
filter_del func
1000dfa20
EXECUTING...
1 nextstate
1 enter
1 leave
$ PERL_DESTRUCT_LEVEL=2 ./perl -Ilib -DP -e0
filter_add func
107b81a20 ()
filter_read 0: via function
7f81e882fea0 ()
filter_read 0: via function
7f81e882fea0 ()
filter_del func
107b81a20
EXECUTING...
The list of ops executed is omitted if I set PERL_DESTRUCT_LEVEL=2.
This was probably broken by
bf9cdc68d2.
Father Chrysostomos [Fri, 5 Dec 2014 01:28:19 +0000 (17:28 -0800)]
Correct dependencies for charclass_invlists.h
regen.t should fail if Unicode tables are updated and this header is
not regenerated.
See commit
713f4b7fa and the thread beginning at
<
20141204124705.472.qmail@lists-nntp.develooper.com>.
Father Chrysostomos [Fri, 5 Dec 2014 00:13:19 +0000 (16:13 -0800)]
op.c:fold_constants: Remove OP_RV2GV/newGVOP
OP_RV2GV is not foldable, so it never reaches this code, which
goes back to
79072805 (perl 5.0 alpha 2). Even back then it was
unreachable.
Father Chrysostomos [Fri, 5 Dec 2014 00:11:02 +0000 (16:11 -0800)]
op.c:fold_constants: Simplify OP_STRINGIFY logic
Don’t put the same condition in two places. We are already using a bool-
ean. We can put the result of the condition in it.
Father Chrysostomos [Fri, 5 Dec 2014 00:07:45 +0000 (16:07 -0800)]
Return fresh scalar from join(const,const)
$ perl5.20.1 -Ilib -le 'for(1,2) { push @_, \join "x", 1 } print for @_'
SCALAR(0x7fb131005438)
SCALAR(0x7fb131005648)
$ ./perl -Ilib -le 'for(1,2) { push @_, \join "x", 1 } print for @_'
SCALAR(0x7fe612831b30)
SCALAR(0x7fe612831b30)
Notice how we now get two references to the same scalar. I broke this
accidentally in
987c9691. If join has two arguments, it gets con-
verted to a stringify op. The stringify op might get constant-folded,
and folding of stringify is special, because the parser uses it
itself to implement qq(). So I had ck_join set op_folded to flag
the op as being a folded join. Only that came too late, because
op_convert_list(OP_STRINGIFY,...) folds the op before it returns it.
Hence, the folded constant was flagged the wrong way, and stopped
being implicitly copied by refgen (\).
Chris 'BinGOs' Williams [Fri, 5 Dec 2014 00:05:50 +0000 (00:05 +0000)]
Locale-Maketext 1.26 is now on CPAN
Todd Rinaldo [Thu, 4 Dec 2014 23:54:22 +0000 (18:54 -0500)]
Syncing back Changelog to be consistent with CPAN release
Whitespace corrections; update perldelta.
For: RT #121671
Chris 'BinGOs' Williams [Thu, 4 Dec 2014 22:59:24 +0000 (22:59 +0000)]
Update Encode to CPAN version 2.67
[DELTA]
$Revision: 2.67 $ $Date: 2014/12/04 20:13:00 $
! t/taint.t
Now skips nonexistent methods like Encode::Detect->encode() should
that be installed. This resolves RT#100105.
https://rt.cpan.org/Ticket/Display.html?id=100105
Father Chrysostomos [Thu, 4 Dec 2014 20:32:55 +0000 (12:32 -0800)]
Don’t deparse formats with #line directives
$ perl5.20.1 -mO=Deparse,-l -e 'format =' -e\@ -e'$foo' -e.
format STDOUT =
@
$foo
.
-e syntax OK
$ ./perl -Ilib -mO=Deparse,-l -e 'format =' -e\@ -e'$foo' -e.
format STDOUT =
@
#line 3 "-e"
; $foo
.
-e syntax OK
The second is not valid syntax.
I probably broke that when fixing BEGIN blocks.
Father Chrysostomos [Thu, 4 Dec 2014 19:16:27 +0000 (11:16 -0800)]
dump.c: Don’t dump CvOUTSIDE SV when there is none
$ ./perl -Ilib -MDevel::Peek -Mfeature=:all -Xle 'my sub f; Dump \&f'
SV = IV(0x7fd7138312b0) at 0x7fd7138312c0
REFCNT = 1
FLAGS = (TEMP,ROK)
RV = 0x7fd713831b90
SV = PVCV(0x7fd7138303d0) at 0x7fd713831b90
REFCNT = 2
FLAGS = (CLONED,DYNFILE,NAMED,LEXICAL)
COMP_STASH = 0x7fd713807ce8 "main"
ROOT = 0x0
NAME = "f"
FILE = "-e"
DEPTH = 0
FLAGS = 0x19040
OUTSIDE_SEQ = 187
PADLIST = 0x7fd7134067e8
PADNAME = 0x7fd713411f88(0x7fd713406d48) PAD = 0x7fd713807e68(0x7fd71340d2f8)
OUTSIDE = 0x0 (null)
SV = 0
That final ‘SV = 0’ is very confusing!
Father Chrysostomos [Thu, 4 Dec 2014 16:39:28 +0000 (08:39 -0800)]
[perl #123357] Fix deparsing of $; at stmt end
Instead of sometimes appending ; to statements and then removing it
later, to avoid doubling it up, *only* append ; to a statement when
actually joining them together or emitting them. That fixes bugs with
do{$;} becoming do {$} and ‘$_=$;; $;=7;’ becoming ‘$_=$; $;=7;’.
I also removed the boilerplate from pp_stub, since it was redundant
(and slow) and also partially wrong. The $name var was bogus.
Father Chrysostomos [Thu, 4 Dec 2014 13:45:01 +0000 (05:45 -0800)]
Deparse.pm: Remove temp pre-PADNAME code
added in
d4f1bfe749f, which got merged before the PADNAME changes.
Father Chrysostomos [Thu, 4 Dec 2014 13:43:23 +0000 (05:43 -0800)]
Deparse.pm: Remove special \0 marker
In
4b1385ee6 I did not realise we already had \cK, which served almost
the same purpose.
Craig A. Berry [Thu, 4 Dec 2014 14:02:09 +0000 (08:02 -0600)]
Unescape directory portion of path in unixify.
Basically I missed a spot in
812e68ff314e, so the escaped space
in [foo^_bar], for example, was not translated correctly.
Father Chrysostomos [Thu, 4 Dec 2014 06:41:45 +0000 (22:41 -0800)]
Add checksum to regcharclass.h
and check that checksum in t/porting/regen.t. This makes the tests
run faster.
Father Chrysostomos [Thu, 4 Dec 2014 06:37:22 +0000 (22:37 -0800)]
Add checksum to charclass_invlists.h
and check that checksum in t/porting/regen.t. This makes the tests
run faster.
Father Chrysostomos [Thu, 4 Dec 2014 06:07:39 +0000 (22:07 -0800)]
Deparse $x =~ (1?/$a/:0) under taint mode
This code deparses incorrectly under taint mode:
$ ./perl -Ilib -mO=Deparse -e '$x =~ (1?/$a/:0)'
$x =~ ($_ =~ /$a/);
-e syntax OK
$ ./perl -Ilib -mO=Deparse -T -e '$x =~ (1?/$a/:0)'
$x =~ /$a/;
-e syntax OK
The branch folding makes it deparse as ‘$x =~ /$a/’, whereas the /$a/
on the rhs, since it was not the argument to =~, is bound to $_, not
to $x. That’s why B::Deparse adds the $_ =~, but it fails to do so
under taint mode.
It was broken by:
commit
7fb31b92fa6bf56dff7d4240b7051b9158f7df43
Author: David Mitchell <davem@iabyn.com>
Date: Sun Apr 1 10:21:22 2012 +0100
make OP_REGCRESET only for taint handling
The OP_REGCRESET op, which is sometimes prepended to the chain of ops
leading to OP_REGCOMP, currently serves two purposes; first to reset the
taint flag, and second to initialise PL_reginterp_cnt. The second purpose
is no longer needed, and the first has a bug, in that the op isn't
prepended when "use re 'eval'" is in scope.
Fix this by prepending the op solely when PL_tainting is in effect.
This also makes run-time regexes slightly more efficient in the
non-tainting case.
which has a typo in it.
Shlomi Fish [Thu, 16 Oct 2014 09:25:30 +0000 (12:25 +0300)]
perlfork.pod: convert "\t"s to spaces.
For: RT #122987 (second part)
Shlomi Fish [Thu, 16 Oct 2014 09:20:22 +0000 (12:20 +0300)]
Remove trailing whitespace.
For: RT #122987 (first part)
Shlomi Fish [Thu, 16 Oct 2014 08:43:06 +0000 (11:43 +0300)]
Convert "\t"s to spaces in perlref.pod.
For: RT #122986
Aristotle Pagaltzis [Thu, 10 Oct 2013 05:24:10 +0000 (07:24 +0200)]
perldata: document corrected list slicing behaviour
Father Chrysostomos [Wed, 3 Dec 2014 21:55:03 +0000 (13:55 -0800)]
[perl #114498] lslice returning empty vs undef
Formerly, list slice would return an empty list if all the indices
fell outside the actual list, but would return ‘undef’ for every index
specified if but one of them fell within the list.
This was not implemented according to the original design, according
to which list slice would give an empty list (for a non-zero number of
indices) only if the list on the left-hand side were empty.
This commit rectifies that. See ticket #114498 for the discussion.
Father Chrysostomos [Thu, 4 Dec 2014 01:45:31 +0000 (17:45 -0800)]
[Merge] Deparse regexp code blocks
The actual ops that make up the code blocks are now deparsed.
B::Deparse no longer uses the stringified form stored in the regexp.
This fixes a few bugs. See the individual commits for details.
Father Chrysostomos [Wed, 3 Dec 2014 20:52:13 +0000 (12:52 -0800)]
Deparse s/// with code blocks
Before, s/$a(?{die})// would deparse like this:
s/${a}do {
die
}(?{die})//;
Now it deparses correctly.
Father Chrysostomos [Wed, 3 Dec 2014 06:25:59 +0000 (22:25 -0800)]
Deparse.pm: Fold some logic into sub code_list
Both callers were doing $op->first->sibling, so just have code_list
do that itself.
Father Chrysostomos [Wed, 3 Dec 2014 06:22:25 +0000 (22:22 -0800)]
Deparse qr// and m// with code blocks and vars
Before, this:
/$a(?{ die $b; })/;
qr/$a(?{ die $b; })/;
would deparse as this:
/${a}do {
die $b
}(?{ die $b; })/;
qr/sub : lvalue {
$a, do {
die $b
}, '(?{ die $b; })'
}
->()/;
Now it deparses correctly.
Father Chrysostomos [Wed, 3 Dec 2014 02:10:35 +0000 (18:10 -0800)]
Deparse regexp code blocks in m// and split //
The blocks themselves are now deparsed, rather than the original strings
being emitted. This fixes problems with newlines turning into \n and
here-docs missing their bodies. It only applies to compile-time patterns.
Run-time patterns (with variables interpolated outside the code blocks)
are still unfixed and deparse with do{...} embedded in the pattern.
Father Chrysostomos [Tue, 2 Dec 2014 22:53:32 +0000 (14:53 -0800)]
Deparse.t: Put a line break after the test code
The line break gets removed when it is extracted from the __DATA__
section, and then it gets wrapped in sub{$input}. That breaks
here-docs.
Father Chrysostomos [Tue, 2 Dec 2014 17:33:38 +0000 (09:33 -0800)]
Deparse qr/(?{code_blocks})/ with no interpolation
This is a preliminary patch that only applies when there are no varia-
bles interpolated into the pattern outside of the code blocks.
The code blocks are now actually deparsed, instead of the stringified
form just being reproduced. This means the \n bug is gone:
Before:
$ ./perl -Ilib -mO=Deparse -e '{ qr/aaaaa\\\\\\(?{;' -e '$y})' -e '/}'
{
qr/aaaaa\\\\\\(?{;\n\$y})\n/;
}
-e syntax OK
After:
$ ./perl -Ilib -mO=Deparse -e '{ qr/aaaaa\\\\\\(?{;' -e '$y})' -e '/}'
{
qr/aaaaa\\\\\\(?{ $y; })\n/;
}
-e syntax OK
You can see the \n translation now happens only outside of the block.
It also means here-docs work:
Before:
$ ./perl -Ilib -mO=Deparse -e 'qr/(??{<<END})/' -efoo -eEND
qr/(??{<<END})/;
-e syntax OK
(The output is a syntax error.)
After:
$ ./perl -Ilib -mO=Deparse -e 'qr/(??{<<END})/' -efoo -eEND
qr/(??{ "foo\n"; })/;
-e syntax OK
Father Chrysostomos [Tue, 2 Dec 2014 14:06:05 +0000 (06:06 -0800)]
Deparse FOO =~ y///r correctly
Apparently anything =~ y///r with the /r never deparsed properly (just
the lhs deparsed) until
05a502dc, when lexicals on the lhs started
being emitted.
Father Chrysostomos [Tue, 2 Dec 2014 06:32:41 +0000 (22:32 -0800)]
To-do tests for deparsing regexp code blocks
Currently we have various bugs:
• Line breaks often come out as \n, changing the meaning.
• Some blocks are doubled up with do{...} for the first instance.
• qr/sub { .... }/ madness
Father Chrysostomos [Tue, 2 Dec 2014 13:57:40 +0000 (05:57 -0800)]
Fix deparsing of $lexical =~ //
I broke this in
05a502dc.
Father Chrysostomos [Tue, 2 Dec 2014 13:51:36 +0000 (05:51 -0800)]
Deparse: matchop: Remove double method+function call
Father Chrysostomos [Wed, 3 Dec 2014 20:37:24 +0000 (12:37 -0800)]
perldelta for the prev. commit
based on https://rt.perl.org/Ticket/Display.html?id=40565#txn-1321149
Father Chrysostomos [Wed, 3 Dec 2014 18:30:06 +0000 (10:30 -0800)]
[perl #40565] Fix localisation in pseudo-fork
Several SAVEt_* types were giving the SVs the wrong reference counts
in ss_dup, causing child process to lose SVs too soon.
See <https://rt.perl.org/Ticket/Display.html?id=40565#txn-1180404>
and <https://rt.perl.org/Ticket/Display.html?id=40565#txn-1277127>.
Karl Williamson [Wed, 26 Nov 2014 21:01:43 +0000 (14:01 -0700)]
dump.c: Clarify pod
Karl Williamson [Sun, 30 Nov 2014 05:40:34 +0000 (22:40 -0700)]
perly.c: Fix off-by-1 error for EBCDIC platforms
Code point 255 was being omitted in the translation. It's better to use
the macro (that has it correctly) and avoid a redundant copy of the
test.
David Mitchell [Wed, 3 Dec 2014 16:55:46 +0000 (16:55 +0000)]
special-case Pod::Checker ABSTRACT
Currently the auto-generated Makefile.PL for Pod::Checker raises a
warning with MakeMaker, since the abstract in the pod isn't parseable.
Also, the package's own Makefile.PL doesn't work with blead (I didn't
exactly understand what the issue was, but porting/dual_lift.t complained
about missing utilities).
So the most expedient hack is to special-case the ABSTRACT in make_ext.pl.
David Mitchell [Wed, 3 Dec 2014 15:49:15 +0000 (15:49 +0000)]
reinstate cpan/IO-Compress/Makefile.PL
This was removed a year ago, but it causes problems with
ABSTACT and ABSTACT_FROM; since there isn't an IO/Compress.pm
file. make_ext.pl special-cases Makefile.PL to get the abstract
from IO/Compress/Base.pm; but MakeMaker looks for, and fails to
find, 'IO::Compress - ...' in the pod for that file,and prints an error.
Rather than more special-casing, it's easier to just restore the
distribution's Makefile.PL, which already contains the correct
'ABSTRACT => ...' entry.
Chris 'BinGOs' Williams [Wed, 3 Dec 2014 13:46:27 +0000 (13:46 +0000)]
Update IO-Socket-IP to CPAN version 0.34
[DELTA]
0.34 2014/12/03 00:04:56
[BUGFIXES]
* Don't select() for read-readiness when waiting for non-blocking
connect() because it upsets VMS (RT100654)
Chris 'BinGOs' Williams [Wed, 3 Dec 2014 13:44:45 +0000 (13:44 +0000)]
Update Encode to CPAN version 2.66
[DELTA]
$Revision: 2.66 $ $Date: 2014/12/02 23:30:34 $
! bin/enc2xs
Resolved RT#100656: enc2xs -C fails if URL::Encode::XS is installed
https://rt.cpan.org/Ticket/Display.html?id=100656
Craig A. Berry [Wed, 3 Dec 2014 04:09:12 +0000 (22:09 -0600)]
Eliminate eliminate_macros and fixpath.
These functions have been deprecated outside of MakeMaker for
many years, but due to the complicated inheritance situation
in EUMM have been difficult to get rid of because sometimes the
File::Spec versions would get called when we thought we were
calling the MakeMaker versions. As of MakeMaker 7.04, the last
call to the File::Spec version of fixpath is gone, so we can
finally remove these from File::Spec.
And bump PathTools versions once again.
David Mitchell [Wed, 3 Dec 2014 13:30:12 +0000 (13:30 +0000)]
reduce stderr noise in build
Ideally you should be able to do
(Configure && make test) 2> /tmp/err
with /tmp/err being empty. This is not the case, and this commit
is a first step towards that goal.
The
fprintf (stderr, "Sizeof time_t = %ld\n", sizeof (time_t));
in Configure appears to be just a debugging aid; it's also a copy of the
code in Porting/timecheck.c, which people can always run if need-be.
hints/linux.sh appears to be looking for symbols in libdb.so; if the
library is stripped, this produces to stderr:
/bin/nm: /lib/libdb.so: no symbols
I've silenced it for now with a 2>/dev/null, but I'm not sure if the whole
test is flawed, since with no symbols, 'nm libdb.so | grep pthread' is a
no-op.
make_patchnum.pl, when running backticks, prints $? to stderr if it's
non-zero; since a similar print in the other branch is already commented
out, I assume its just left-over debugging.
David Mitchell [Wed, 3 Dec 2014 10:53:00 +0000 (10:53 +0000)]
Stop test suite filling /tmp
Some test files use File::Temp in such a way that the temporary files and
directories under /tmp aren't deleted at the end. On a smoker system, this
can gradually accumulate thousands of entries under /tmp.
The general culprits fixed by this commit are:
1) using tempfile() without the UNLINK => 1 argument;
2) Using Test::More (which uses Test::Stream), which creates a test
directory in such a way that only the original parent thread will
remove it; for some reason I still don't fully understand, detaching a
thread rather than joining it stops this clean up happening. In the
affected test files, I replaced the ->detach() with a ->join() just
before exit, and the problem went away.
Some tests under cpan/ are still leaky; these will be addressed upstream.
Daniel Dragan [Wed, 3 Dec 2014 00:31:35 +0000 (19:31 -0500)]
pp_eof: a new SV can't have setmagic
-dont compute GvSV multiple times
Tony Cook [Wed, 3 Dec 2014 03:02:28 +0000 (14:02 +1100)]
perldelta for
faa5d6ec871c
Tony Cook [Wed, 3 Dec 2014 02:51:59 +0000 (13:51 +1100)]
[perl #122635] avoid turning a leading // into / on cygwin
//server/sharename is used for Win32 shares on cygwin
bump version, synchronizing across all of PathTools.
syber [Mon, 1 Dec 2014 20:20:27 +0000 (23:20 +0300)]
Speed up method calls like $o->Other::method() and $o->Other::SUPER::method().
It was done by adding new OP_METHOD_REDIR and OP_METHOD_REDIR_SUPER optypes.
Class name to redirect is saved into METHOP as a shared hash string.
Method name is changed (class name removed) an saved into op_meth_sv as
a shared string hash.
So there is no need now to scan for '::' and calculate class and method names
at runtime (in gv_fetchmethod_*) and searching cache HV without precomputed hash.
B::* modules are changed to support new op types.
method_redir is now printed by Concise like (for threaded perl)
$obj->AAA::meth
5 <.> method_redir[PACKAGE "AAA", PV "meth"] ->6
Tony Cook [Wed, 12 Nov 2014 02:53:48 +0000 (13:53 +1100)]
[perl #123063] allow assert() to be used as an expression
In non-DEBUGGING builds it would be replaced with nothing, producing
a syntax error
Tony Cook [Tue, 2 Dec 2014 23:32:20 +0000 (10:32 +1100)]
TARG slots have no name, and produced undefined value warnings
Father Chrysostomos [Tue, 2 Dec 2014 22:10:58 +0000 (14:10 -0800)]
Add James Raspass to AUTHORS
Father Chrysostomos [Tue, 2 Dec 2014 22:10:27 +0000 (14:10 -0800)]
Increase $strict::VERSION to 1.09
James Raspass [Tue, 2 Dec 2014 21:41:19 +0000 (13:41 -0800)]
Optimise strict.pm for the common case
Father Chrysostomos [Tue, 2 Dec 2014 13:48:33 +0000 (05:48 -0800)]
pad.h: Use PERL_PADNAME_MINIMAL by default
See
<CACmk_tvkTETxz2eFc-bJfXEhWRjAexuvv4zw4Z036OJHpWfXVA@mail.gmail.com>
and <
20141202004047.10267.qmail@lists-nntp.develooper.com>.
Father Chrysostomos [Tue, 2 Dec 2014 13:35:08 +0000 (05:35 -0800)]
perl5220delta: Want 0.24 has been released
Father Chrysostomos [Tue, 2 Dec 2014 06:26:33 +0000 (22:26 -0800)]
Add B::PMOP::pmregexp
There was no way to get from a PMOP to its regexp object under non-
threaded builds. The threaded pmoffset field was exposed, but not its
non-threaded counterpart.
I implemented pmregexp in terms of PM_GETRE (which uses op_pmoffset
with threads and op_pmregexp without), so it works under threads, too.
It’s easier than conditionally using the regex_padav to get at things
like this:
$ ./perl -Ilib -MB -e 'use O "Concise", B::regex_padav->ARRAYelt(B::svref_2object(sub {qr/(??{})/})->ROOT->first->first->sibling->pmoffset)->qr_anoncv->object_2svref'
B::Concise::compile(CODE(0x7f8e9185ba08))
2 <1> leavesub[1 ref] K/REFC,1 ->(end)
1 </> qr() P/RTIME ->2
- <@> list K ->-
- <0> pushmark s ->-
- <1> null sK*/1 ->-
- <1> ex-scope sK ->(end)
- <0> stub s ->(end)
- <$> const(PV "(\077?{})") s ->-
-e syntax OK
With pmregexp, it is ‘only’:
$ ./perl -Ilib -MB -e 'use O "Concise", B::svref_2object(sub {qr/(??{})/})->ROOT->first->first->sibling->pmregexp->qr_anoncv->object_2svref'
Father Chrysostomos [Tue, 2 Dec 2014 06:08:49 +0000 (22:08 -0800)]
b.t: Move a test
This should go with the other regexp tests.
Chris 'BinGOs' Williams [Tue, 2 Dec 2014 14:21:54 +0000 (14:21 +0000)]
Update ExtUtils-MakeMaker to CPAN version 7.04
[DELTA]
7.04 Tue Dec 2 12:43:48 GMT 2014
No changes from 7.03_06
7.03_06 Mon Dec 1 15:35:28 GMT 2014
Doc fixes:
- Corrected MAGICXS documentation
7.03_05 Fri Nov 28 18:27:09 GMT 2014
Doc fixes:
- Remove Module::Build encouragement
7.03_04 Thu Nov 27 14:35:15 GMT 2014
Core fixes:
- Do not use ccstdflags with the core extensions
7.03_03 Tue Nov 25 16:37:57 GMT 2014
Win32 Fixes:
- Eliminate sub-process spawning when checking make type
7.03_02 Mon Nov 24 13:18:09 GMT 2014
VMS fixes:
- Fix a couple of missing vendor targets
- Remove VAXCCURSE from ExtUtils::Liblist::Kid::_vms_ext.
7.03_01 Tue Nov 18 21:29:40 GMT 2014
VMS fixes:
- Handle spaces in install targets
- Allow spaces in eliminate_macros and fixpath
- Remove fixpath call from ExtUtils::Liblist::Kid::_vms_ext.
- Override is_make_type() as checks as unnecessary
Core fixes:
- Wrap parse_abstract() call to Encode in eval() to
avoid build failures
- Fix issue with CCFLAGS in core
Matthew Horsfall (alh) [Tue, 2 Dec 2014 13:18:32 +0000 (08:18 -0500)]
Upgrade Devel::PPPort from 3.24 to 3.25
Aristotle Pagaltzis [Tue, 2 Dec 2014 03:05:20 +0000 (04:05 +0100)]
perlfunc: document immediate stricture effect of "our"
Jarkko Hietaniemi [Sat, 29 Nov 2014 17:54:59 +0000 (12:54 -0500)]
Show elapsed wallclock time in t/TEST.
Father Chrysostomos [Tue, 2 Dec 2014 00:32:06 +0000 (16:32 -0800)]
bench.pl: Load IO::File explicitly
to work with older perls that don’t load it automatically.
$ Porting/bench.pl perl5.8.8 perl5.8.7
Can't locate object method "blocking" via package "IO::File" at Porting/bench.pl line 737.
(In this case the system perl is 5.12.4.)
Father Chrysostomos [Tue, 2 Dec 2014 00:29:22 +0000 (16:29 -0800)]
bench.pl: Correct optional = in pod synopsis
Tony Cook [Mon, 1 Dec 2014 23:28:08 +0000 (10:28 +1100)]
fix g++ builds: conversions from void * need a cast
David Mitchell [Mon, 1 Dec 2014 23:15:39 +0000 (23:15 +0000)]
Porting/bench.pl: handle perl select with --write
The cmd-line opts that include a perl, --norm and --sort,
didn't work correctly in the presence of --read, which by-passed
the code that processes the list of perls.
Lukas Mai [Mon, 1 Dec 2014 19:56:25 +0000 (20:56 +0100)]
use more STATIC_ASSERT
Daniel Dragan [Mon, 1 Dec 2014 17:43:16 +0000 (12:43 -0500)]
fix segv for psudofork duping of SAVEt_GP_ALIASED_SV
op/fork.t test 6 that contains "@a = (1..3);" will crash on Win32 with
special debugging heap and race condition rarely crash otherwise.
Refcnt mistake is from commit
ff2a62e0c8 . See perl #40565 for details.
Petr Písař [Mon, 1 Dec 2014 14:28:36 +0000 (15:28 +0100)]
t/op/taint.t: Perform SHA-256 algorithm by crypt() if default one is disabled
The crypt(3) call may return NULL. This is the case on FIPS-enabled
platforms. Then "tainted crypt" test would fail.
See RT#121591 for similar fix in t/op/crypt.t.
Signed-off-by: Petr Písař <ppisar@redhat.com>
Lukas Mai [Thu, 6 Nov 2014 19:24:25 +0000 (20:24 +0100)]
make link->copy fallback work again [#123141]
Sullivan Beck [Mon, 1 Dec 2014 14:59:37 +0000 (14:59 +0000)]
[PATCH] Bump Locale-Codes from 3.32 to 3.33
Signed-off-by: Chris 'BinGOs' Williams <chris@bingosnet.co.uk>
David Mitchell [Mon, 1 Dec 2014 12:48:12 +0000 (12:48 +0000)]
bench.pl: improve single-field formatting
With a single field specified by --fields=foo, bench.pl uses a more
compact output format. Tidy this a bit: left-justify the test names,
and describe which field is being listed in the header.
Steffen Mueller [Sun, 30 Nov 2014 16:26:38 +0000 (17:26 +0100)]
More branch prediction hints for sv_setsv_flags
Dave's cachegrind benchmark says "small win":
REF THIS
------ ------
Ir 105.35 105.91
Dr 104.45 105.42
Dw 105.42 105.17
COND 104.33 104.58
IND 107.04 106.76
COND_m 98.55 110.11
IND_m 110.09 111.08
Steffen Mueller [Sun, 30 Nov 2014 16:25:52 +0000 (17:25 +0100)]
Comment clarification for NULL => IV sv_setsv_flags optimization
Father Chrysostomos [Mon, 1 Dec 2014 06:29:09 +0000 (22:29 -0800)]
Tell known_pod_issues.dat about Want.pm
Father Chrysostomos [Mon, 1 Dec 2014 06:12:39 +0000 (22:12 -0800)]
perl5220delta: Mention Want 0.23
for perl #123332.
Father Chrysostomos [Mon, 1 Dec 2014 03:27:43 +0000 (19:27 -0800)]
op.c: Fix compiler warning
Father Chrysostomos [Mon, 1 Dec 2014 03:26:38 +0000 (19:26 -0800)]
Update B::Showlex docs
I forgot this in
0f94cb1fe.
Father Chrysostomos [Mon, 1 Dec 2014 01:46:38 +0000 (17:46 -0800)]
Fix assertion failure with qr/\Q(?{})/
\Q and \u create ops that need targets, and hence use the pad of
the anonymous sub created temporarily when parsing something like
qr/\Q(?{})/. If it turns out we don’t have a code block (in this
case), that anon sub is thrown away, but there is an assertion that
makes sure its pad has not been used, which fails:
$ ./perl -e 'qr/\Q(?{})/'
Assertion failed: (AvFILLp(PL_comppad) == 0), function Perl_pmruntime, file op.c, line 5395.
Abort trap: 6
(That assertion was added by
d63c20f27.)
If we have had \Q or \l, then the length of the pad may be more than
1, but constant folding should have stolen the values from the pad, so
assert that instead.
Jim Cromie [Thu, 20 Nov 2014 21:45:02 +0000 (14:45 -0700)]
pp.c: dont work around glibc 2.2.5 _moddi3 bugs past 2.7
Add glibc version checks to avoid runtime workarounds for an ancient bug.
p1-
224ec32361 in 2003 added a per-op one-time test to detect the bug,
and patch around it in op_ppaddr.
p2-
befad5d118 in 2007 limited the workaround to GLIBC and IVSIZE == 8
p3-
a5bd31f4dc in 2012 suppressed it for defined(PERL_DEBUG_READONLY_OPS)
https://bugzilla.redhat.com/show_bug.cgi?id=65612
describes the test implemented in [p1]
Per wikipedia:
v2.2.5 isnt dated, but 2.2.4 is 7/2001. redhat fixed theirs in 9/2002
v2.3 is 10/2002, and likely never had the bug released.
v2.3.2 in debian sarge, 2.3.4 in RHEL4
So picking v2.7 (10/2007) as last version pessimized is still quite
conservative, but also already 7 years old, 2x++ our perlpolicy support
window. Its unlikely that such a platform would be seeing an install
of v5.22 or later.
Daniel Dragan [Sun, 30 Nov 2014 21:31:13 +0000 (16:31 -0500)]
fix incomplete mathoming of Perl_pad_compname_type
commit
09d7a3ba91 moved Perl_pad_compname_type to mathoms but didn't
update makedef.pl. This causes a link failure of perl521.dll on Win32.
Father Chrysostomos [Sun, 30 Nov 2014 19:49:11 +0000 (11:49 -0800)]
[Merge] Inflict PADNAMEs on everyone
This makes PADNAME into a separate type from SV. See
<https://rt.perl.org/rt3/Ticket/Display.html?id=123223> for the
reasoning.
Father Chrysostomos [Fri, 28 Nov 2014 22:35:40 +0000 (14:35 -0800)]
Minimise the size of padname + string buffer
If we define the struct a little differently, we can begin the string
buffer two bytes into a pointer, rather than pointer-aligned. In case
some platforms can compare pointer-aligned string faster, I added a
#define to allow that. But on 64-bit darwin the speed is identical
either way:
$ time ./miniperl -e 'eval q|my$a;|x50000 . q|eval q<my $A>|'
I ran this three times in each mode, and the average of the user times
differed by less than 1%.
Father Chrysostomos [Fri, 28 Nov 2014 06:35:17 +0000 (22:35 -0800)]
Remove proto magic type
It is no longer in use, as of two commits ago.
Father Chrysostomos [Fri, 28 Nov 2014 06:33:20 +0000 (22:33 -0800)]
pad.c: Various doc updates
Father Chrysostomos [Fri, 28 Nov 2014 06:30:54 +0000 (22:30 -0800)]
[perl #123223] Make PADNAME a separate type
distinct from SV. This should fix the CPAN modules that were failing
when the PadnameLVALUE flag was added, because it shared the same
bit as SVs_OBJECT and pad names were going through code paths not
designed to handle pad names.
Unfortunately, it will probably break other CPAN modules, but I think
this change is for the better, as it makes both pad names and SVs sim-
pler and makes pad names take less memory.
Father Chrysostomos [Fri, 28 Nov 2014 06:20:47 +0000 (22:20 -0800)]
pad.h: Mention ‘fake’ under PadnameOUTER
We refer to ‘fake’ entries in various places in the documentation,
and we still have the word FAKE in PARENT_FAKELEX_FLAGS, so noting
this should be helpful.
Father Chrysostomos [Fri, 28 Nov 2014 06:18:31 +0000 (22:18 -0800)]
pad.h: Update PadnamePV description
GVs have been using ‘constant’ pad names for a while now, since
v5.21.3-188-gc2bad63.
Father Chrysostomos [Fri, 28 Nov 2014 06:14:39 +0000 (22:14 -0800)]
Use PADNAME rather than SV in pad.c:padlist_dup
Father Chrysostomos [Fri, 28 Nov 2014 06:14:08 +0000 (22:14 -0800)]
Use PADNAME rather than SV in pad.c:pad_push
Father Chrysostomos [Fri, 28 Nov 2014 06:12:56 +0000 (22:12 -0800)]
Use PADNAME rather than SV in pad.c:cv_clone_pad
Father Chrysostomos [Fri, 28 Nov 2014 06:12:11 +0000 (22:12 -0800)]
Use PADNAME rather than SV in pad.c:do_dump_pad