This is a live mirror of the Perl 5 development currently hosted at
23 months ago[MERGE] make optree-walking mostly non-recursive
David Mitchell [Mon, 24 Jun 2019 10:40:30 +0000 (11:40 +0100)]
[MERGE] make optree-walking mostly non-recursive

This branch updates many of the functions in op.c which recursively
walk an op tree during compilation.  This avoids SEGVs from stack
overflow when the op tree is deeply nested, such as
    $n == 1 ? "one" : $n == 2 ? "two" : ....
(especially in code which is auto-generated)

This is particularly noticeable where the code is compiled within a
separate thread, as threads tend to have small stacks by default.

Some functions already avoided recursion by mallocing a buffer
containing a list of ops to visit, but this could be leaked if the code
died during compilation.

Making the functions non-recursive is a lot easier now that the last
node in each OpSIBLING chain holds a pointer back to the parent node.
Where the function needs to recursively visit *every* node, its just a
case of following each child link, then every OpSIBLING link then the
parent link. Where the recursion is more selective, it becomes more
tricky. In some cases I have followed the policy that a node has N kids
and kids I..N need visiting, then start at I and iterate as usual; but
if just kids I and J  needs visiting (but not J+1..N), then do old-style
recursion on nodes I and J. These cases are hopefully rare.

23 months agoPerl_op_lvalue_flags(): make mostly non-recursive
David Mitchell [Fri, 14 Jun 2019 10:26:37 +0000 (11:26 +0100)]
Perl_op_lvalue_flags(): make mostly non-recursive

Recursion is left in a few places where is necessary to call itself
with a different value for 'type'.

23 months agoPerl_op_lvalue_flags() add blank lines
David Mitchell [Wed, 12 Jun 2019 11:03:52 +0000 (12:03 +0100)]
Perl_op_lvalue_flags() add blank lines

... between switch cases for readability.

23 months agoPerl_op_lvalue_flags(): skip OPf_WANT_VOID ops.
David Mitchell [Wed, 12 Jun 2019 10:57:54 +0000 (11:57 +0100)]
Perl_op_lvalue_flags(): skip OPf_WANT_VOID ops.

Currently this function asserts that its 'o' argument is non-VOID;
later when recursing an OP_LIST, it skips any kids which are VOID.

This commit changes it so that the assert becomes a return, and
OP_LIST doesn't check whether its kids are VOID.

Doing it this way makes it easier to shortly make Perl_op_lvalue_flags()

The only functional difference is that on debugging builds,
Perl_op_lvalue_flags() will no longer fail an assert if inadvertently
called with a VOID op.

23 months agoPerl_op_lvalue_flags(): fixup documentation
David Mitchell [Thu, 6 Jun 2019 12:32:25 +0000 (13:32 +0100)]
Perl_op_lvalue_flags(): fixup documentation

First, move the apidoc text for op_lvalue() to be directly above
Perl_op_lvalue_flags() (it had wandered).

Secondly, add a brief non-API note explaining what the extra 'flags'
parameter does

23 months agoreindent op.c:S_lvref()
David Mitchell [Thu, 6 Jun 2019 12:01:41 +0000 (13:01 +0100)]
reindent op.c:S_lvref()

...  after the previous commit wrapped most if it in a while loop.  Also
put a blank line after each switch case for readability.

23 months agomake op.c:S_lvref() non-recursive
David Mitchell [Thu, 6 Jun 2019 12:00:18 +0000 (13:00 +0100)]
make op.c:S_lvref() non-recursive

23 months agodocument what op.c:S_lvref() does
David Mitchell [Tue, 4 Jun 2019 12:41:21 +0000 (13:41 +0100)]
document what op.c:S_lvref() does

23 months agoop.c: S_lvref(): handle all kids on OP_NULL
David Mitchell [Tue, 4 Jun 2019 12:33:22 +0000 (13:33 +0100)]
op.c: S_lvref(): handle all kids on OP_NULL

For an OP_NULL, his function formerly recursed into *all* its kids
if was an ex-list, otherwise only the first one.

To simplify making this function non-recursive, make it so that it
unconditionally recurses into all the kids.

However for now, also add an assertion that a non ex-list OP_NULL
will only have one child at most. If we find some code which violates
this, then we can nmake a more informed decision as to whether
non ex-list OP_NULL's should have all, or only their first child

23 months agoClarify purpose of S_looks_like_bool()
David Mitchell [Fri, 31 May 2019 15:59:53 +0000 (16:59 +0100)]
Clarify purpose of S_looks_like_bool()

23 months agomake op.c:S_find_and_forget_pmops() non-recursive
David Mitchell [Fri, 31 May 2019 15:53:42 +0000 (16:53 +0100)]
make op.c:S_find_and_forget_pmops() non-recursive

For every CV that's freed which has a shared optree (e.g. a closure
or between threads), the whole optree is walked looking for PMOPs.
Make that walk non-recursive.

Contrived code that triggers a stack overflow:

    my $outer;
    my $e = 'sub { $outer && '
            . join('&&', ('$x') x 100_000)
            . " }";
    #print $e, "\n";
    eval $e;

Even after this commit, that code still SEGVs due to a separate stack
blow in Perl_rpeep().

23 months agoPerl_doref(): reindent
David Mitchell [Fri, 31 May 2019 15:02:19 +0000 (16:02 +0100)]
Perl_doref(): reindent

Previous commit added a while loop.

23 months agoPerl_doref(): make non-recursive
David Mitchell [Fri, 31 May 2019 10:58:11 +0000 (11:58 +0100)]
Perl_doref(): make non-recursive

This stops the following code from SEGVing for example:

    my $e = "\$r";
    $e = "+do{$e}" for 1..70_000;
    $e = "push \@{$e}, 1";
    eval $e;

Similarly with a long


This commit causes a slight change in behaviour, in that scalar(o)
is now only called once at the end of the top-level doref() call,
rather than at the end of processing each child. This should make no
functional difference, apart from speeding up compiling infinitesimally.

23 months agodocument what Perl_doref does
David Mitchell [Fri, 31 May 2019 09:27:25 +0000 (10:27 +0100)]
document what Perl_doref does

23 months agomake op.c:S_aassign_scan() non-recursive
David Mitchell [Thu, 30 May 2019 13:22:09 +0000 (14:22 +0100)]
make op.c:S_aassign_scan() non-recursive

With this commit and some previous ones, the following code no longer
blows the stack:

    my $e = "1";
    $e = "do { \$x; $e}" for 1..100_000;
    $e = "\@x = $e";
    eval $e;

23 months agomake Perl_op_linklist() non-recursive
David Mitchell [Wed, 29 May 2019 14:57:06 +0000 (15:57 +0100)]
make Perl_op_linklist() non-recursive

23 months agoPerl_op_linklist(): use OPf_KIDS flags
David Mitchell [Wed, 29 May 2019 14:03:42 +0000 (15:03 +0100)]
Perl_op_linklist(): use OPf_KIDS flags

This function just blindly assumes that cUNOPo->op_first is a valid
indication that the op has at least one child. This is successful *most*
of the time. Putting in an assertion caused t/op/lvref.t to fail.

Instead, check the OPf_KIDS flag.

23 months agoPerl_scalarvoid(): add comment saying what it does
David Mitchell [Wed, 29 May 2019 08:49:19 +0000 (09:49 +0100)]
Perl_scalarvoid(): add comment saying what it does

It applies void context, which isn't all that obvious just from the

23 months agoop.c: S_search_const: remove recursion
David Mitchell [Tue, 28 May 2019 16:37:43 +0000 (17:37 +0100)]
op.c: S_search_const: remove recursion

There are a couple of places where this function recurses, but they
are both effectively tail recursion and can be easily eliminated.

23 months agoop.c: add code comments to S_search_const()
David Mitchell [Tue, 28 May 2019 16:25:33 +0000 (17:25 +0100)]
op.c: add code comments to S_search_const()

plus a few blank lines for readability.

23 months agoop.c: S_assignment_type(): make truly trinary
David Mitchell [Tue, 28 May 2019 14:39:50 +0000 (15:39 +0100)]
op.c: S_assignment_type(): make truly trinary

Commit 4fec880468dad87517895b935b19a8d51e98b5a6 converted the
static boolean function S_is_list_assignment() into a 3-valued
function: S_assignment_type().

However, much of the code body still did things like 'return TRUE'.
Replace these with 'return ASSIGN_LIST' etc. These have the same
physical values, so there's no functional change here. But it makes the
code more consistent and readable.

23 months agoPerl_scalar() tail-call optimise
David Mitchell [Wed, 29 May 2019 10:03:26 +0000 (11:03 +0100)]
Perl_scalar() tail-call optimise

The part of this function that scans the children of e.g.

    $scalar = do { void; void; scalar }

applying scalar context only to the last child: tail call optimise that
call to Perl_scalar().

It also adds some extra 'warnings' tests. An earlier attempt at this
patch caused some unrelated tests to start emitting spurious 'useless in
void context' messages, which are covered by the new tests.

This also showed up that the current method for updating PL_curcop
while descending optrees in Perl_scalar/scalarvoid/S_scalarseq is a bit
broken. It gets updated every time a newstate op is seen, but haphazardly
(and sometimes wrongly) restored to &PL_compiling when going back up the
tree. One of the tests is TODO based on PL_curcop being wrong and so the
'no warnings "void"' leaking into an outer scope.

This commit maintains the status quo.

23 months agoPerl_scalar(): doc and reorganise complex bool
David Mitchell [Wed, 29 May 2019 09:32:41 +0000 (10:32 +0100)]
Perl_scalar(): doc and reorganise complex bool

The if statement that scans children applying void context to all except
the last child:

1) document what it does;
2) reorganise it (without changing its logical meaning) to make it
simpler to understand, and to make the next commit easier.

23 months agoPerl_scalar(): indent block
David Mitchell [Tue, 28 May 2019 14:25:48 +0000 (15:25 +0100)]
Perl_scalar(): indent block

.. that has just been wrapped in a while loop.
Whitespace-only change.

23 months agomake Perl_scalar() mostly non-recursive
David Mitchell [Tue, 28 May 2019 14:23:44 +0000 (15:23 +0100)]
make Perl_scalar() mostly non-recursive

Where it just recursively calls scalar() on all its children, instead
iteratively walk the sub-tree, using o->op_sibparent to work back

Where it is more complex, such as OP_REPEAT imposing scalar context on its
first arg but not its second, recurse as before.

23 months agofix type in Perl_list()
David Mitchell [Tue, 28 May 2019 11:23:10 +0000 (12:23 +0100)]
fix type in Perl_list()

23 months agoPerl_scalar(): re-order a few switch cases
David Mitchell [Tue, 28 May 2019 11:22:19 +0000 (12:22 +0100)]
Perl_scalar(): re-order a few switch cases

Just a cosmetic change.

23 months agoPerl_scalar(): remove redundant switch labels
David Mitchell [Tue, 28 May 2019 11:19:23 +0000 (12:19 +0100)]
Perl_scalar(): remove redundant switch labels

Remove some explicit cases that just do the same as 'default:'

23 months agoDocument what Perl_scalar() does
David Mitchell [Tue, 28 May 2019 11:17:12 +0000 (12:17 +0100)]
Document what Perl_scalar() does

and add blank lines for e.g. better readability between switch() cases.
Also remove a lying /* FALLTHROUGH */

23 months agoPerl_list() tail-call optimise
David Mitchell [Tue, 18 Jun 2019 14:11:12 +0000 (15:11 +0100)]
Perl_list() tail-call optimise

The part of this function that scans the children of e.g.

    @a = do { void; void; list }

applying list context only to the last child, tail call optimise that
call to list().

(See also a few commits later entitled "Perl_scalar() tail-call
optimise" for a discourse on setting PL_curcop (in)correctly.)

23 months agoPerl_list(): doc and reorganise complex bool
David Mitchell [Wed, 29 May 2019 10:22:48 +0000 (11:22 +0100)]
Perl_list(): doc and reorganise complex bool

The if statement that scans children applying void context to all except
the last child:

1) document what it does;
2) reorganise it (without changing its logical meaning) to make the next
commit easier.

23 months agoreindent Perl_list()
David Mitchell [Tue, 28 May 2019 10:25:22 +0000 (11:25 +0100)]
reindent Perl_list()

The previous commit wrapped most of the body of this function in a while

23 months agomake Perl_list() mostly non-recursive
David Mitchell [Tue, 28 May 2019 09:57:46 +0000 (10:57 +0100)]
make Perl_list() mostly non-recursive

Where it just recursively calls list() on all its children, instead
iteratively walk the sub-tree, using o->op_sibparent to work back

Where it is more complex, such as OP_REPEAT imposing list context on its
first arg but not its second, recurse as before.

23 months agoPerl_list(): re-order a few switch cases
David Mitchell [Tue, 28 May 2019 09:08:45 +0000 (10:08 +0100)]
Perl_list(): re-order a few switch cases

Just a cosmetic change.

23 months agoPerl_list(): re-order recursion in OP_LIST
David Mitchell [Tue, 28 May 2019 08:57:04 +0000 (09:57 +0100)]
Perl_list(): re-order recursion in OP_LIST

Call list() on an OP_LIST's children, *after* potentially nulling out
the OP_LIST and an OP_PUSHMARK. This will make removing recursion
easier. Should be no functional difference.

23 months agoPerl_list(): add blank lines
David Mitchell [Wed, 22 May 2019 10:31:06 +0000 (11:31 +0100)]
Perl_list(): add blank lines

... between switch cases for readability.

23 months agoPerl_list(): simplify some branches
David Mitchell [Wed, 22 May 2019 10:27:20 +0000 (11:27 +0100)]
Perl_list(): simplify some branches

Remove some explicit cases that just do the same as 'default:'

Also, remove OP_FLOP as a special case and just let it do the default.
This is the same behaviour (apply list() to its one child), except
that it also now does a harmless but (always false) check whether it's
child is an OP_FLOP too.

23 months agomake S_gen_constant_list() void return
David Mitchell [Fri, 17 May 2019 12:01:35 +0000 (13:01 +0100)]
make S_gen_constant_list() void return

Its gen_constant_list(o) returns an OP*, but the thing it returns is
currently always o.

So just assume it returns it arg.

This will shortly make making Perl_list() non-recursive easier.

23 months agoDocument what Perl_list() and its helper do
David Mitchell [Fri, 17 May 2019 11:58:38 +0000 (12:58 +0100)]
Document what Perl_list() and its helper do

23 months agoremove DEFER_OP macros from op.c
David Mitchell [Wed, 15 May 2019 10:06:49 +0000 (11:06 +0100)]
remove DEFER_OP macros from op.c

the previous commit removed the last use of them

23 months agoS_optimize_op(): remove anti-recursion deferring
David Mitchell [Tue, 14 May 2019 15:47:06 +0000 (16:47 +0100)]
S_optimize_op(): remove anti-recursion deferring

S_optimize_op() used to recursively work its way down an optree
marking ops as being in the appropriate context.

This commit removes the deferred mechanism, and instead makes use of the
newish OP_PARENT mechanism to iterate over the optree, following each
kid, then back up via the parent pointer to the next sibling etc.

23 months agoMake op_free() non-recursive
David Mitchell [Mon, 8 Apr 2019 13:17:59 +0000 (14:17 +0100)]
Make op_free() non-recursive

Stop using the DEFER mechanism (which could leak if something croaks)
and instead tree walk using the new OP_PARENT link to allow walking
back up the tree.

The freeing is done depth-first: children are freed before their

23 months agoscalarvoid(): remove anti-recursion deferring
David Mitchell [Fri, 5 Apr 2019 14:38:24 +0000 (15:38 +0100)]
scalarvoid(): remove anti-recursion deferring

Perl_scalarvoid() used to recursively work its way down an optree
marking ops as being in the appropriate context.

Around 5.22.0 the code was changed to avoid recursion, and instead to
malloc a buffer (if necessary) to maintain a list of deferred child ops
that need visiting. This stopped perl crashing if the optree (and thus
the recursion) was too deep, but it introduced a potential leak.
For example

    use warnings FATAL => qw(void);
    $a = "abc";
    length $a ;

The fatal warning causes scalarvoid() to leak the deferred buffer.

This commit removes the deferred mechanism, and instead makes use of the
newish OP_PARENT mechanism to iterate over the optree, following each
kid, then back up via the parent pointer to the next sibling etc.

23 months agoperldelta for 9918f0bc5148
Tony Cook [Mon, 24 Jun 2019 01:14:00 +0000 (11:14 +1000)]
perldelta for 9918f0bc5148

23 months ago(perl #134189) handle no gcc, but cc is clang
Tony Cook [Thu, 13 Jun 2019 04:04:35 +0000 (04:04 +0000)]
(perl #134189) handle no gcc, but cc is clang

You can setup Ubuntu (and presumably other dists) with clang and no
gcc installed, which left plibpth unfilled.

23 months agoMake -Duse64bitint the default on VMS.
Craig A. Berry [Sun, 23 Jun 2019 03:09:04 +0000 (22:09 -0500)]
Make -Duse64bitint the default on VMS.

The capability came along with Alpha more than two decades ago, so
maybe the third decade of the twenty-first century should see it
become the default.

23 months agoBegin restore of case sensitive symbols on VMS
Craig A. Berry [Sun, 23 Jun 2019 03:00:10 +0000 (22:00 -0500)]
Begin restore of case sensitive symbols on VMS

There is a long-unmaintained option to build with case sensitive
symbols, which is needed by some extensions that have symbols
that differ only by case and need the Perl core to be built with
the same option.

There will be additional steps necessary, but getting "perl" and
"globals" in the correct case is a start.  We no longer need to
explicitly specify globals for the linker, so don't do that and
thus avoid having to guess which case it wants.

23 months agoFix Unix-format path in Devel::PPPort's Makefile.PL
Craig A. Berry [Sun, 23 Jun 2019 02:26:51 +0000 (21:26 -0500)]
Fix Unix-format path in Devel::PPPort's Makefile.PL

Post-editing the output of MakeMaker means owning all of its many
platform-specific abstractions, in this case the fact that
t/01_test.t might actually be [.t]01_test.t, t\01_test.t, etc.,
constructed for the parsing pleasure of the native make utility.

So when scanning make rules for this test make a regex that
should match on most platforms, at least if they preserve
filename case.  And delete the redundant dependency on pure_all
because, except for the hard-coded Unix-format path, it's already
been correctly inserted by MakeMaker.

No version bump for now as e01077d94eaee34f1361857373 seems to
think we shouldn't, though I'm not sure I follow its rationale.

23 months agoRevert previous changes to pod/perl5311delta.pod
Nicolas R [Fri, 21 Jun 2019 23:26:05 +0000 (18:26 -0500)]
Revert previous changes to pod/perl5311delta.pod

23 months agoTemporary bump PPPort to 3.54 before next release
Nicolas R [Fri, 21 Jun 2019 20:46:27 +0000 (16:46 -0400)]
Temporary bump PPPort to 3.54 before next release

This is making porting/cmp_version.t happy for now.
We plan to release Devel::PPPort over the next days/weeks
and this would be required before the next release.

Note that previous Perl version was release without
releasing Devel::PPPort. We probably want to release
a 3.53 version matching it, followed by a 3.54 one.

23 months agoignore macOS .DS_Store files
Nicolas R [Fri, 14 Jun 2019 16:21:45 +0000 (10:21 -0600)]
ignore macOS .DS_Store files

(cherry picked from commit 98181351f809838fa9a239c16e0cbb25dc16d659)
Signed-off-by: Nicolas R <>
23 months agoFix unused variable warning in 5.30
Nicolas R [Fri, 14 Jun 2019 15:05:43 +0000 (09:05 -0600)]
Fix unused variable warning in 5.30

Fixes #99

(cherry picked from commit 4aa658c84dee2b1ea29f2683151bab5543da6c6e)
Signed-off-by: Nicolas R <>
23 months agoFor gcc compiler enable compile warnings
Pali [Tue, 11 Jun 2019 09:49:22 +0000 (11:49 +0200)]
For gcc compiler enable compile warnings

(cherry picked from commit b6d631d5a258ad6b22ec8fe038b1db9d4ef18908)
Signed-off-by: Nicolas R <>
23 months agoUpdate NEED_* list in
Pali [Tue, 11 Jun 2019 08:23:50 +0000 (10:23 +0200)]
Update NEED_* list in

This NEED_* list in is not automatically generated or updated.

(cherry picked from commit dc9459686897182bff1a157f6be9caf324029838)
Signed-off-by: Nicolas R <>
23 months agoRemove old #define NEED_vnewSVpvf
Pali [Tue, 11 Jun 2019 08:19:16 +0000 (10:19 +0200)]
Remove old #define NEED_vnewSVpvf

Since f5d27a8 it is not needed.

(cherry picked from commit e609df1c14b00fc4f1a800a2077b637ce5fc7552)
Signed-off-by: Nicolas R <>
23 months agoDevel::PPPort: Implement newSVsv_nomg()
Pali [Wed, 13 Feb 2019 13:58:08 +0000 (14:58 +0100)]
Devel::PPPort: Implement newSVsv_nomg()

(cherry picked from commit 4cdb0bb9430ff854e6683e74efab8ac096c8c8ad)
Signed-off-by: Nicolas R <>
(cherry picked from commit 2bcd1c9ab24c4d77e7a636d7d9aa9ef44842f052)
Signed-off-by: Nicolas R <>
23 months agoDevel::PPPort: Implement SV_NOSTEAL for sv_setsv_flags()
Pali [Fri, 20 Jul 2018 14:49:03 +0000 (16:49 +0200)]
Devel::PPPort: Implement SV_NOSTEAL for sv_setsv_flags()

(cherry picked from commit 63beb3be5c3584094d6eed159067f9f7e71996bd)
Signed-off-by: Nicolas R <>
(cherry picked from commit e357148a8002d3227d86c5468fd9b63c54c07854)
Signed-off-by: Nicolas R <>
23 months agoFix processing ERRSV and croak_sv
Pali [Mon, 3 Jun 2019 13:09:20 +0000 (15:09 +0200)]
Fix processing ERRSV and croak_sv

ERRSV macro is function call, so ensure that it is not called more times.
Therefore pass it only to macros which evaluate its arguments only once.

Backported croak_sv() macro is changed to evaluate its argument only once,
like implementation in core Perl.

(cherry picked from commit 2a8cd79042fe49b26b5654d9597dfd9d750783f4)
Signed-off-by: Nicolas R <>
23 months agoGenerate Makefile dependences for ppport.h,, RealPPPort.xs and tests
Pali [Sun, 2 Jun 2019 10:50:22 +0000 (12:50 +0200)]
Generate Makefile dependences for ppport.h,, RealPPPort.xs and tests

All test files and depend on all include files in parts/inc.
Also RealPPPort.xs depends on ppport.h and ppport.h depends on

Test file t/01_test.t is generated when all test files are regenerated. All
test targets depends on pure_all target, so add t/01_test.t as dependency
for pure_all.

Also all those generated files, needed for building PPPort binary should
not depend on built PPPort binary. So ensure that they do not depend on
pm_to_blib target, which depends on built PPPort in blib/ (as it is
circular dependency).

Dependences are injected via MY::processPL method by updating corresponding
Makefile targets.

So make test now run mktests.PL if test files are not up-to-date prior
running tests.

(cherry picked from commit 1e0b1139a2d64cb9c7d3e9dbbb4aa043f7183f36)
Signed-off-by: Nicolas R <>
23 months agoAdd mktests.PL to MakeMaker's PL_FILES
Pali [Sun, 2 Jun 2019 10:49:20 +0000 (12:49 +0200)]
Add mktests.PL to MakeMaker's PL_FILES

This would ensure that mktests.PL is run from make all. Every script in
PL_FILES must generate file, so add empty test 01_test file for it.

(cherry picked from commit 74263dc21b864812d7996df9cb6c8f2153b33f20)
Signed-off-by: Nicolas R <>
23 months Remove special case
Karl Williamson [Fri, 31 May 2019 16:26:20 +0000 (10:26 -0600)] Remove special case

The latest doc entries have a flag indicating that special handling is
used.  Use this flag here instead of knowing the specific current cases
that required it.

(cherry picked from commit f548bffdc1ec2dfa00287c7be4dc3db1354a550c)
Signed-off-by: Nicolas R <>
23 months agoUse latest blead embed.fnc
Karl Williamson [Fri, 31 May 2019 16:24:12 +0000 (10:24 -0600)]
Use latest blead embed.fnc

This comes with different meanings for some of the flags, so those are
updated too.

This resolves the issue with 'mysterious name'

(cherry picked from commit e4aa2c33a3bc4e3c4c62d588a7d1d3149c65b298)
Signed-off-by: Nicolas R <>
23 months Don't store non-public functions
Karl Williamson [Fri, 31 May 2019 16:20:44 +0000 (10:20 -0600)] Don't store non-public functions

D:P shouldn't be making available things that aren't in the public API.
(cherry picked from commit 0834e32743a278f0737d0b20db77301aba5cd83c)
Signed-off-by: Nicolas R <>
23 months Add required line to generated apidoc.fnc
Karl Williamson [Fri, 31 May 2019 16:16:12 +0000 (10:16 -0600)] Add required line to generated apidoc.fnc

Instead of expecting whoever is updating the embed.fnc to remember that
this extra line is required, do it while parsing it.  This means that
the embed.fnc can just be copied from the latest blead.

(cherry picked from commit 129fd7f72ac04fa279e3a01de050dddea82d4a3c)
Signed-off-by: Nicolas R <>
23 months doc elements may have lead/trail space
Karl Williamson [Fri, 31 May 2019 16:11:48 +0000 (10:11 -0600)] doc elements may have lead/trail space

Entries in embed.fnc and =for apidoc have elements separated by '|', but
in fact space should be ignored adjacent to them.

(cherry picked from commit 4698ebfa8a1fa20790b96c1ec1c41a0430dd0e27)
Signed-off-by: Nicolas R <>
23 months agoparts/inc/uv: A char* should be a U8*
Karl Williamson [Fri, 31 May 2019 16:34:20 +0000 (10:34 -0600)]
parts/inc/uv: A char* should be a U8*

(cherry picked from commit 3e80164d818c083465c9b6ec7e3bbd6bbc728aae)
Signed-off-by: Nicolas R <>
23 months agoAvoid usage of PL_Sv if possible
Pali [Fri, 31 May 2019 10:15:32 +0000 (12:15 +0200)]
Avoid usage of PL_Sv if possible

(cherry picked from commit 4f8e73bc1ae4c90c71f994ad8ba85159561b269e)
Signed-off-by: Nicolas R <>
23 months agoFix gv_fetchpvn_flags
Pali [Thu, 30 May 2019 09:24:32 +0000 (11:24 +0200)]
Fix gv_fetchpvn_flags

* Add support for GV_NOADD_MASK flag
* Add support for sv_type argument
* Define it as macro without NEED_* define

(cherry picked from commit 88a9d883f3e2e86c1a085f336933266136949ed1)
Signed-off-by: Nicolas R <>
23 months agoDefine more API functions as macros
Pali [Mon, 27 May 2019 10:37:50 +0000 (12:37 +0200)]
Define more API functions as macros

So their usage via ppport.h can be done via specifying corresponding NEED_.

(cherry picked from commit 28098b495a98ed86fa40faee76c58463a14683cd)
Signed-off-by: Nicolas R <>
23 months agoFix compilation of uv for Perl 5.5.3
Pali [Sun, 26 May 2019 08:31:44 +0000 (10:31 +0200)]
Fix compilation of uv for Perl 5.5.3

There is no, so it cannot be 'use'-d. Also there is no
UTF8_SAFE_SKIP() so it must be in section after 'skip:'.

(cherry picked from commit f8471054ec5b3940fbeb7f1cdcf52a7825024e3b)
Signed-off-by: Nicolas R <>
23 months agoFix utf8_to_uvchr_buf()
Pali [Sun, 26 May 2019 08:18:59 +0000 (10:18 +0200)]
Fix utf8_to_uvchr_buf()

API defines first argument of utf8_to_uvchr_buf() as const. So users of
this API expects that they can pass const variable. Fix it by explicit
casting of non-const var to const in D_PPP_utf8_to_uvchr_buf_callee() call.

Change also tests to verify that const argument can be really passed.

Remove utf8_to_uvchr_buf() from TODO list as it is now implemented.

Do not compile test functions which are not provided for older Perl

(cherry picked from commit cde3c8256deae674cd7e25eaac2a8bbf82b37899)
Signed-off-by: Nicolas R <>
23 months agoparts/inc/uv: Use D_PP_ prefix for internal symbols
Karl Williamson [Fri, 17 May 2019 18:11:02 +0000 (12:11 -0600)]
parts/inc/uv: Use D_PP_ prefix for internal symbols

Suggested by Pali

(cherry picked from commit de9fb8809c8dde341241153aaff85ff202e87a67)
Signed-off-by: Nicolas R <>
23 months agoparts/inc/uv: White-space changes only
Karl Williamson [Fri, 17 May 2019 18:09:37 +0000 (12:09 -0600)]
parts/inc/uv: White-space changes only

(cherry picked from commit b9864ade1343063d3449372aafc8a40f3118b257)
Signed-off-by: Nicolas R <>
23 months agoIssue #72 utf8_to_uvchr fails for 5.6.0
Karl Williamson [Fri, 17 May 2019 18:03:16 +0000 (12:03 -0600)]
Issue #72 utf8_to_uvchr fails for 5.6.0

And the underlying implementation for 5.6.0 is so different from
anything that came later, that we aren't implementing it, and this
causes things to compile

(cherry picked from commit d2d2e9f36066b9391be9546d6ae5cb78304245e5)
Signed-off-by: Nicolas R <>
23 months agoIssue #71: Overflow failures with <= 5.8.6
Karl Williamson [Fri, 17 May 2019 17:47:07 +0000 (11:47 -0600)]
Issue #71: Overflow failures with <= 5.8.6

These versions need more work to get right; this commit does that.

(cherry picked from commit ebe8b7681463dd9f7a23716166a8861ce6514ae2)
Signed-off-by: Nicolas R <>
23 months agoparts/inc/uv: Add some UNLIKELY()s
Karl Williamson [Fri, 17 May 2019 17:42:54 +0000 (11:42 -0600)]
parts/inc/uv: Add some UNLIKELY()s

These will be very uncommonly encountered

(cherry picked from commit 804f380c1272b22f4d7cec72453b7e0558a6be16)
Signed-off-by: Nicolas R <>
23 months agoparts/inc/uv: Use IV_MAX instead of PERL_INT_MAX
Karl Williamson [Fri, 17 May 2019 17:35:24 +0000 (11:35 -0600)]
parts/inc/uv: Use IV_MAX instead of PERL_INT_MAX

This conditional really is about IVs.

(cherry picked from commit dde86fdb411a443543ab98b785c1328c24481166)
Signed-off-by: Nicolas R <>
23 months agoparts/inc/uv: Combine two preprocessor directives onto same line
Karl Williamson [Fri, 17 May 2019 17:25:37 +0000 (11:25 -0600)]
parts/inc/uv: Combine two preprocessor directives onto same line

I didn't know this special one was combinable.

(cherry picked from commit ae169237b9646630f9f58fe322c478caf7532b8b)
Signed-off-by: Nicolas R <>
23 months agoparts/inc/uv: Comments only
Karl Williamson [Fri, 17 May 2019 17:20:07 +0000 (11:20 -0600)]
parts/inc/uv: Comments only

(cherry picked from commit 15e6555487e5d4c05a50abed6a69efb1b453b73a)
Signed-off-by: Nicolas R <>
23 months agoparts/inc/uv: Add two tests of overlongs
Karl Williamson [Fri, 17 May 2019 17:07:12 +0000 (11:07 -0600)]
parts/inc/uv: Add two tests of overlongs

This now has a test for each possible overlong range in the legal
Unicode range.  Those have start bytes of C0 or C1, E0, and F0.

(cherry picked from commit fe97c4cc6e837cf123a0d777fb65575d7bf9f828)
Signed-off-by: Nicolas R <>
23 months agoparts/inc/uv: Skip only some tests on early perls
Karl Williamson [Fri, 17 May 2019 17:01:02 +0000 (11:01 -0600)]
parts/inc/uv: Skip only some tests on early perls

This was skipping every test, not just the affected ones.

(cherry picked from commit 25d26ec2886c6a339ea9fd7e3c5d5531f4c41cd0)
Signed-off-by: Nicolas R <>
23 months agoparts/inc/uv: Improve diagnostic test name
Karl Williamson [Fri, 17 May 2019 16:56:00 +0000 (10:56 -0600)]
parts/inc/uv: Improve diagnostic test name

(cherry picked from commit 6b2440b318280e1270ad59e6f0030ff93ae4c4df)
Signed-off-by: Nicolas R <>
23 months agoMove declaration to before code, so can work on C89 compiler
Karl Williamson [Fri, 17 May 2019 18:06:56 +0000 (12:06 -0600)]
Move declaration to before code, so can work on C89 compiler

(cherry picked from commit 95c5effdf058e7f01a1d1797d70474a2b332c0fb)
Signed-off-by: Nicolas R <>
23 months agodist target now depends on manifest
Nicolas R [Fri, 17 May 2019 15:02:11 +0000 (09:02 -0600)]
dist target now depends on manifest

Fixes GH #68

make sure we regenerate the manifest
when building a dist.

We recently removed on purpose the
MANIFEST file from the git repo to
make sure we always generate a fresh
version on dist...

(cherry picked from commit e90e36f77e7717bfe596adbc50b4210825f1ed56)
Signed-off-by: Nicolas R <>
23 months agofix dist/Module-CoreList/t/maintainer.t by filling in real release date
Karen Etheridge [Fri, 21 Jun 2019 17:48:33 +0000 (10:48 -0700)]
fix dist/Module-CoreList/t/maintainer.t by filling in real release date

23 months agobump this version check for now, to get tests passing
Karen Etheridge [Fri, 21 Jun 2019 17:25:53 +0000 (10:25 -0700)]
bump this version check for now, to get tests passing

The real fix still needs to be merged from the Devel-PPPort repository.

23 months agoupdating perldelta not needed here
Karen Etheridge [Fri, 21 Jun 2019 17:12:57 +0000 (10:12 -0700)]
updating perldelta not needed here the updated modules section is generated automatically when perldelta is finalized

23 months agoadd explicit command to do a clean build
Karen Etheridge [Fri, 21 Jun 2019 17:12:32 +0000 (10:12 -0700)]
add explicit command to do a clean build

23 months agoupdate Module::CoreList for 5.031002
Karen Etheridge [Fri, 21 Jun 2019 17:01:43 +0000 (10:01 -0700)]
update Module::CoreList for 5.031002

23 months agoupdate Module::CoreList to be ready for 5.31.2 changes
Karen Etheridge [Fri, 21 Jun 2019 15:47:00 +0000 (08:47 -0700)]
update Module::CoreList to be ready for 5.31.2 changes

23 months agoRun regen/ to increment $VERSION in lib/B/
James E Keenan [Fri, 21 Jun 2019 14:54:37 +0000 (10:54 -0400)]
Run regen/ to increment $VERSION in lib/B/

Thereby keeping t/porting/regen.t happy.

23 months agoAdd two entries to pod issues database
James E Keenan [Fri, 21 Jun 2019 14:48:42 +0000 (10:48 -0400)]
Add two entries to pod issues database

Two diagnostic one-liners were added to release manager's guide.  They
exceeded POD line length limits and were not easily breakable.  Hence,
added to list of exceptions.

23 months agoNobody expects the Spanish Inquisition
Chris 'BinGOs' Williams [Fri, 21 Jun 2019 11:32:36 +0000 (12:32 +0100)]
Nobody expects the Spanish Inquisition

23 months agoRMG improvements
Karen Etheridge [Thu, 20 Jun 2019 20:47:22 +0000 (13:47 -0700)]
RMG improvements

23 months agoadd epigraph for 5.31.1
Karen Etheridge [Thu, 20 Jun 2019 20:45:24 +0000 (13:45 -0700)]
add epigraph for 5.31.1

23 months agofix template for next major release
Karen Etheridge [Thu, 20 Jun 2019 20:25:52 +0000 (13:25 -0700)]
fix template for next major release

23 months agotick off 5.31.1 release
Karen Etheridge [Thu, 20 Jun 2019 20:24:59 +0000 (13:24 -0700)]
tick off 5.31.1 release

23 months agobump version to 5.31.2
Karen Etheridge [Thu, 20 Jun 2019 20:22:45 +0000 (13:22 -0700)]
bump version to 5.31.2

23 months agogenerate new perldelta
Karen Etheridge [Thu, 20 Jun 2019 20:43:11 +0000 (13:43 -0700)]
generate new perldelta

23 months agoadd new release to perlhist v5.31.1
Karen Etheridge [Thu, 20 Jun 2019 17:51:01 +0000 (10:51 -0700)]
add new release to perlhist