This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perl5.git
4 years agodevel/mkapidoc.sh: Sort the apidoc macros by name
Karl Williamson [Tue, 25 Jun 2019 17:19:18 +0000 (11:19 -0600)]
devel/mkapidoc.sh: Sort the apidoc macros by name

(cherry picked from commit ba3cdff1750f4339cf04e511c9ac9099c93d10a4)
Signed-off-by: Nicolas R <atoomic@cpan.org>
4 years agodevel/mkapidoc.sh: White-space, comments only
Karl Williamson [Tue, 25 Jun 2019 17:09:58 +0000 (11:09 -0600)]
devel/mkapidoc.sh: White-space, comments only

This makes it more readable

(cherry picked from commit 9b98f505fc1548b82871f2870b10282bcdc489d2)
Signed-off-by: Nicolas R <atoomic@cpan.org>
4 years agodevel/mkapidoc.sh: Skip irrelevant embed.fnc lines
Karl Williamson [Thu, 8 Aug 2019 18:33:18 +0000 (12:33 -0600)]
devel/mkapidoc.sh: Skip irrelevant embed.fnc lines

Skip comments, for example.

(cherry picked from commit a71d41a14e304380acebac8be29cba06b6e5d137)
Signed-off-by: Nicolas R <atoomic@cpan.org>
4 years agoparts/apidoc.fnc: Update to latest blead
Karl Williamson [Sun, 15 Sep 2019 00:05:15 +0000 (18:05 -0600)]
parts/apidoc.fnc: Update to latest blead

(cherry picked from commit 7a3ddf4b0ce4331d84b33ea64c6c33e22df6c51b)
Signed-off-by: Nicolas R <atoomic@cpan.org>
4 years agoUpdate to latest blead embed.fnc
Karl Williamson [Sat, 14 Sep 2019 21:09:24 +0000 (15:09 -0600)]
Update to latest blead embed.fnc

(cherry picked from commit c788af012154f2734511c5b7f6f0a9be18de78e7)
Signed-off-by: Nicolas R <atoomic@cpan.org>
4 years agoparts/inc/utf8: Don't use postfix for in D:P tests
Karl Williamson [Sun, 15 Sep 2019 16:21:06 +0000 (10:21 -0600)]
parts/inc/utf8: Don't use postfix for in D:P tests

Devel::PPPort goes back further than this construct.
(cherry picked from commit f5c4f171dfbd4ead0b9a9dd191c9709f9fedcbd5)
Signed-off-by: Nicolas R <atoomic@cpan.org>
4 years agoparts/inc/utf8: blead still doesn't work
Karl Williamson [Tue, 20 Aug 2019 01:29:29 +0000 (19:29 -0600)]
parts/inc/utf8: blead still doesn't work

This was a commit that was made in blead, and needs to be copied to the
distro.  The release at which blead will start working without being
overridden by ppport.h had to be delayed one month.

(cherry picked from commit 7b671cf31e5d22e692481b72066c2624b7cbf823)
Signed-off-by: Nicolas R <atoomic@cpan.org>
4 years agoImplement sv_len_utf8_nomg() and sv_len_utf8()
Pali [Tue, 27 Aug 2019 11:44:35 +0000 (13:44 +0200)]
Implement sv_len_utf8_nomg() and sv_len_utf8()

Also fix sv_len_utf8() for Perl versions prior to 5.17.5.

(cherry picked from commit 91ea0ce8f1d77f9ba270b19eb01ed94cb349b7b3)
Signed-off-by: Nicolas R <atoomic@cpan.org>
4 years agoHACKERS: Add info about Hints and Warnings
Karl Williamson [Thu, 4 Jul 2019 20:19:42 +0000 (14:19 -0600)]
HACKERS: Add info about Hints and Warnings

(cherry picked from commit 51b0c694ca09fb4656215cbe4575b9654a63a522)
Signed-off-by: Nicolas R <atoomic@cpan.org>
4 years agoImplement SvIV_nomg(), SvUV_nomg(), SvNV_nomg() and SvTRUE_nomg()
Pali [Fri, 12 Jul 2019 11:37:06 +0000 (13:37 +0200)]
Implement SvIV_nomg(), SvUV_nomg(), SvNV_nomg() and SvTRUE_nomg()

Use sv_mortalcopy_flags() macro with SV_NOSTEAL flag to create non-magical
copy of input scalar. And on this non-magical copy call original Perl's
SvIV/SvUV/SvNV/SvTRUE macro.

This would ensure that get magic is not processed on original input scalar
argument and also that correct value is returned.

(cherry picked from commit c01919df38e1d016f008b3572c81a86f70e53be5)
Signed-off-by: Nicolas R <atoomic@cpan.org>
4 years agoFix eval_pv for Perl versions prior to 5.31.2
Pali [Tue, 9 Jul 2019 10:18:09 +0000 (12:18 +0200)]
Fix eval_pv for Perl versions prior to 5.31.2

Seems that check for SvROK() and SvTRUE() is enough, see:
https://rt.perl.org/Public/Bug/Display.html?id=134177
https://rt.perl.org/Public/Bug/Display.html?id=134175

(cherry picked from commit 0f5184e818b7217c9a75d5275b716a055f7bef6c)
Signed-off-by: Nicolas R <atoomic@cpan.org>
4 years agoBackport PL_mess_sv
Karl Williamson [Mon, 8 Jul 2019 22:04:23 +0000 (16:04 -0600)]
Backport PL_mess_sv

(cherry picked from commit 8f700bf9c63f435025a5d92bfd424c1312b9bc3d)
Signed-off-by: Nicolas R <atoomic@cpan.org>
4 years agoBackport foldEQ_utf8 using ibcmp_utf8
Karl Williamson [Thu, 4 Jul 2019 18:21:16 +0000 (12:21 -0600)]
Backport foldEQ_utf8 using ibcmp_utf8

Though I think there were some bugs in earlier versions.

(cherry picked from commit 53fcb552d031c2a48d34ce24e9f213f5167ce05a)
Signed-off-by: Nicolas R <atoomic@cpan.org>
4 years agoBackport is_utf8_invariant_string, is_invariant_string
Karl Williamson [Thu, 4 Jul 2019 19:15:21 +0000 (13:15 -0600)]
Backport is_utf8_invariant_string, is_invariant_string

These are more correct synonyms for is_ascii_string

(cherry picked from commit 7d9499b7ae83f2017b5c3a659547d98dc11633eb)
Signed-off-by: Nicolas R <atoomic@cpan.org>
4 years agoBackport BOM_UTF8 REPLACEMENT_CHARACTER_UTF8
Karl Williamson [Thu, 4 Jul 2019 18:19:10 +0000 (12:19 -0600)]
Backport BOM_UTF8 REPLACEMENT_CHARACTER_UTF8

(cherry picked from commit 95c5c8d34cb28d3774aac13153a03ae61673bd82)
Signed-off-by: Nicolas R <atoomic@cpan.org>
4 years agoBackport isUTF8_CHAR
Karl Williamson [Thu, 4 Jul 2019 18:14:56 +0000 (12:14 -0600)]
Backport isUTF8_CHAR

(cherry picked from commit 9ef04c4cd59fdfe1f76083ad76803544d38a9012)
Signed-off-by: Nicolas R <atoomic@cpan.org>
4 years agoConsolidate UTF-8 functions/macros into new file
Karl Williamson [Thu, 4 Jul 2019 18:05:32 +0000 (12:05 -0600)]
Consolidate UTF-8 functions/macros into new file

It's easier to grok when these are all together, and not in several
files.

(cherry picked from commit 365c133b9378a47cbf5ccf78a6dfc713cb8388de)
Signed-off-by: Nicolas R <atoomic@cpan.org>
4 years agoImplement sv_mortalcopy_flags()
Pali [Thu, 4 Jul 2019 15:05:34 +0000 (17:05 +0200)]
Implement sv_mortalcopy_flags()

(cherry picked from commit a8ddf81bea0c2c5a7476a76c98b307764f69bee5)
Signed-off-by: Nicolas R <atoomic@cpan.org>
4 years agoImplement newSVsv_flags()
Pali [Thu, 4 Jul 2019 10:01:59 +0000 (12:01 +0200)]
Implement newSVsv_flags()

(cherry picked from commit d1ffac9ac663e9293129c76289d5bb8124566060)
Signed-off-by: Nicolas R <atoomic@cpan.org>
4 years agoAdd tests for IVdf, UVuf, IV_MAX and UV_MAX
Pali [Mon, 1 Jul 2019 12:37:19 +0000 (14:37 +0200)]
Add tests for IVdf, UVuf, IV_MAX and UV_MAX

(cherry picked from commit 2b31db974097bbec6a64078e2a3f8c1c166236ad)
Signed-off-by: Nicolas R <atoomic@cpan.org>
4 years agoFix several other implemented todo
Nicolas R [Thu, 16 May 2019 21:58:36 +0000 (15:58 -0600)]
Fix several other implemented todo

Fixes GH #61 aka RT 134101

(cherry picked from commit 92ceda883e0bc1fc9a093bb0af07d04e81dc01ab)
Signed-off-by: Nicolas R <atoomic@cpan.org>
4 years agoEnable Perl compile-time warnings at all places
Pali [Mon, 1 Jul 2019 20:54:13 +0000 (22:54 +0200)]
Enable Perl compile-time warnings at all places

(cherry picked from commit aad9feda2ec7fa8b44924162ed852de4ea074ab4)
Signed-off-by: Nicolas R <atoomic@cpan.org>
4 years agoMakefile.PL: Fix so works on early perls
Karl Williamson [Tue, 9 Jul 2019 17:40:50 +0000 (11:40 -0600)]
Makefile.PL: Fix so works on early perls

You can't declare a variable within a looping statement like 'for' in
early perls.  Just declare it immediately beforehand.

(cherry picked from commit 1b3fbf992bcf862b418afbd705ce1d1eb0c573fb)
Signed-off-by: Nicolas R <atoomic@cpan.org>
4 years agoAdd required dependency for $(VERSION_FROM) target in Makefile.PL
Pali [Sun, 2 Jun 2019 11:34:45 +0000 (13:34 +0200)]
Add required dependency for $(VERSION_FROM) target in Makefile.PL

(cherry picked from commit 4b59ba9792a43a0891ad07adff7b15b11b239649)
Signed-off-by: Nicolas R <atoomic@cpan.org>
4 years agoUse correct method for checking module version in Makefile.PL
Pali [Sun, 2 Jun 2019 11:34:33 +0000 (13:34 +0200)]
Use correct method for checking module version in Makefile.PL

(cherry picked from commit 45499778ea5ff8fbb51a5e75059b3c94e221f9e6)
Signed-off-by: Nicolas R <atoomic@cpan.org>
4 years agoFix inclusion of META_MERGE in Makefile.PL
Pali [Sun, 2 Jun 2019 11:34:26 +0000 (13:34 +0200)]
Fix inclusion of META_MERGE in Makefile.PL

(cherry picked from commit a145a59bef4ca21685181c0b912d9c7218e0742d)
Signed-off-by: Nicolas R <atoomic@cpan.org>
4 years agoEnable warnings in Makefile.PL
Pali [Sun, 2 Jun 2019 11:34:14 +0000 (13:34 +0200)]
Enable warnings in Makefile.PL

(cherry picked from commit f74454f179348ed4aebc04ba735ccc12eee3c980)
Signed-off-by: Nicolas R <atoomic@cpan.org>
4 years agoUpdate HACKERS
Karl Williamson [Sun, 21 Jul 2019 00:25:23 +0000 (18:25 -0600)]
Update HACKERS

(cherry picked from commit faa4c9817e61fd8aa4c1d18877c2c5800bf113b6)
Signed-off-by: Nicolas R <atoomic@cpan.org>
4 years agoHACKERS: Update
Karl Williamson [Wed, 10 Jul 2019 03:53:12 +0000 (21:53 -0600)]
HACKERS: Update

(cherry picked from commit ac27a862173e52405c4f93657cd350ad9312ec24)
Signed-off-by: Nicolas R <atoomic@cpan.org>
4 years agoHACKERS: Add info about Hints and Warnings
Karl Williamson [Thu, 4 Jul 2019 20:19:42 +0000 (14:19 -0600)]
HACKERS: Add info about Hints and Warnings

(cherry picked from commit 5df9c36cef7b172a0fe805f209de55cbb87f6ac6)
Signed-off-by: Nicolas R <atoomic@cpan.org>
4 years agoDocument D_PPP_ prefix for macros
Pali [Mon, 17 Jun 2019 13:54:13 +0000 (15:54 +0200)]
Document D_PPP_ prefix for macros

(cherry picked from commit 7556987e03558cd2f200df996ee222da58e5889c)
Signed-off-by: Nicolas R <atoomic@cpan.org>
4 years agoregcomp.h: Parenthesize param in macro expansion
Karl Williamson [Sat, 21 Sep 2019 19:18:12 +0000 (13:18 -0600)]
regcomp.h: Parenthesize param in macro expansion

This is always a good idea

4 years agoregcomp.h: Remove duplicate macro expansion
Karl Williamson [Sat, 21 Sep 2019 19:14:25 +0000 (13:14 -0600)]
regcomp.h: Remove duplicate macro expansion

This macro has the same definition as another.

4 years agoregcomp.c: Clarify some comments
Karl Williamson [Fri, 27 Sep 2019 04:09:51 +0000 (22:09 -0600)]
regcomp.c: Clarify some comments

4 years agoregcomp.sym Update and improve descriptions of some nodes
Karl Williamson [Sun, 22 Sep 2019 21:09:05 +0000 (15:09 -0600)]
regcomp.sym Update and improve descriptions of some nodes

EXACTFU nodes always now fold their strings; the information here had
not been updated to reflect that change.

And the descriptions of several EXACTish nodes are now changed to be
slightly shorter and to remove mention of the string length, which is
problematic, and is covered in the description for EXACT

4 years agoregen/regcomp.pl: Rename variable
Karl Williamson [Thu, 26 Sep 2019 22:30:21 +0000 (16:30 -0600)]
regen/regcomp.pl: Rename variable

The old name was misleading.

4 years agoregen/regcomp.pl, regcomp.sym: Comments
Karl Williamson [Thu, 26 Sep 2019 22:23:33 +0000 (16:23 -0600)]
regen/regcomp.pl, regcomp.sym: Comments

I spent some time in this code trying to understand some things, and as
a result I'm commenting previously undocumented features.  The comments
about what an entry in regcomp.sym should look like are moved to that
file, rather than the file that reads it.  The former is most often
touched, and they had gotten out-of-sync in the latter.  Things now make
more sense to me, and hopefully anyone using this in the future.

4 years agoSilence verbatim line pod warning in perldebguts
Karl Williamson [Fri, 27 Sep 2019 02:49:53 +0000 (20:49 -0600)]
Silence verbatim line pod warning in perldebguts

This generated pod has many lines that really can't be wrapped.  So
change the podcheck.t db to ignore these errors in this file.

4 years agoAdd note to debugging output if regex already compiled
Karl Williamson [Thu, 26 Sep 2019 19:14:14 +0000 (13:14 -0600)]
Add note to debugging output if regex already compiled

Prior to this commit, the debugging output says "Compiling REx foo".
But there was no indication that it was skipped due to the pattern
already being compiled; so that was confusing to people, and was a Stack
Overflow question of what is going on.  Now there's an extra message
that the recompilation is skipped.

4 years agoperlrun: Note that -W can't be in PERL5OPT
Karl Williamson [Sun, 22 Sep 2019 21:48:51 +0000 (15:48 -0600)]
perlrun: Note that -W can't be in PERL5OPT

4 years agohandy.h: Avoid compiler warnings for withinCOUNT()
Karl Williamson [Thu, 26 Sep 2019 04:23:55 +0000 (22:23 -0600)]
handy.h: Avoid compiler warnings for withinCOUNT()

If a parameter to this function is unsigned, gcc, at least, generates a
comparison-always-true warning for the asserts on the parameters.
Silence these by casting to an NV.  Any extra machine instructions will
be gone from non-DEBUGGING builds.  The value in an NV won't necessarily
be exact, but all the assertions care about is the sign, which is
guaranteed by C11 standard 6.3.1.4 item 2.

This technique was the idea of Tomasz Konojacki.

4 years agohandy.h: Rmv duplicated assert in inRANGE()
Karl Williamson [Sat, 21 Sep 2019 18:23:49 +0000 (12:23 -0600)]
handy.h: Rmv duplicated assert in inRANGE()

This assertion is done in the macro that is called to do the real work.

4 years agohandy.h Fix withinCOUNT() for > 32 bit operands
Karl Williamson [Mon, 9 Sep 2019 20:57:07 +0000 (14:57 -0600)]
handy.h Fix withinCOUNT() for > 32 bit operands

It needs to cast to unsigned in all circumstances; prior to this commit
it failed to do so for oprands wider than 32 bits

4 years ago[MERGE] little fixups to signature tweaks
David Mitchell [Wed, 25 Sep 2019 20:51:50 +0000 (21:51 +0100)]
[MERGE] little fixups to signature tweaks

v5.31.4-18-g9fb6174d08 tweaked a few signature-related things but
introduced a leak in the test suite and left some debugging code in.

4 years agofix leak in APItest.xs
David Mitchell [Wed, 25 Sep 2019 20:46:47 +0000 (21:46 +0100)]
fix leak in APItest.xs

The leak Was introduced by my recent commit v5.31.4-16-g4df857782a,
which added an extra op at the head of a signature subtree, but which
wasn't being freed by the code in the parse_subsignature test.

4 years agoPerl_Slab_Alloc(): tweak logging
David Mitchell [Wed, 25 Sep 2019 17:34:09 +0000 (18:34 +0100)]
Perl_Slab_Alloc(): tweak logging

When looking for a suitable op-sized chunk of memory in a slab's free
list, perl logs the search but doesn't log a successful match. Add such
a log line to make analysis of the output of 'perl -DS' easier.

4 years agoXS-APItest/t/subsignature.t: remove debugging code
David Mitchell [Tue, 24 Sep 2019 12:45:20 +0000 (13:45 +0100)]
XS-APItest/t/subsignature.t: remove debugging code

I accidentally left a temporary Data::Dumper line in it.

4 years agot/lib/charnames/alias: Fix typo in comment
Karl Williamson [Fri, 30 Aug 2019 17:11:47 +0000 (11:11 -0600)]
t/lib/charnames/alias: Fix typo in comment

4 years agoutil.c: Missing semicolon with rarely used compile ops
Karl Williamson [Tue, 3 Sep 2019 15:46:28 +0000 (09:46 -0600)]
util.c: Missing semicolon with rarely used compile ops

4 years agot/harness: Clarify error message wording
Karl Williamson [Tue, 3 Sep 2019 15:34:47 +0000 (09:34 -0600)]
t/harness: Clarify error message wording

4 years ago[MERGE] assorted su signature tweaks
David Mitchell [Mon, 23 Sep 2019 15:20:37 +0000 (16:20 +0100)]
[MERGE] assorted su signature tweaks

Apply several small fixes to the subroutine signatures implementation,
in preparation for major improvements to the syntax likely to happen
soon.

Nothing here changes the signatures syntax.

4 years agosub foo($_) {...} - change error message
David Mitchell [Mon, 23 Sep 2019 14:22:11 +0000 (15:22 +0100)]
sub foo($_) {...}  - change error message

When using one of the globals like $_ or @_ in a subroutine signature,
the error message was misleading:

    Can't use global $_ in "my"

This commit changes it to:

    Can't use global $_ in subroutine signature

4 years agoput signature ops in their own subtree.
David Mitchell [Fri, 20 Sep 2019 13:43:01 +0000 (14:43 +0100)]
put signature ops in their own subtree.

The following code:

    sub f ($x,$y) {
        study;
    }

used to compile as:

    a  <1> leavesub[1 ref] K/REFC,1 ->(end)
    -     <@> lineseq KP ->a
    1        <;> nextstate(main 5 p:5) v:%,fea=7 ->2
    2        <+> argcheck(2,0) v ->3
    3        <;> nextstate(main 3 p:5) v:%,fea=7 ->4
    4        <+> argelem(0)[$x:3,5] v/SV ->5
    5        <;> nextstate(main 4 p:5) v:%,fea=7 ->6
    6        <+> argelem(1)[$y:4,5] v/SV ->7
    -        <;> ex-nextstate(main 5 p:5) v:%,fea=7 ->7
    7        <;> nextstate(main 5 p:6) v:%,fea=7 ->8
    9        <1> study sK/1 ->a
    -           <1> ex-rv2sv sK/1 ->9
    8              <$> gvsv(*_) s ->9

Following this commit, it compiles as:

    a  <1> leavesub[1 ref] K/REFC,1 ->(end)
    -     <@> lineseq KP ->a
    -        <1> ex-argcheck vK/1 ->7
    -           <@> lineseq vK ->-
    1              <;> nextstate(main 5 p:5) v:%,fea=7 ->2
    2              <+> argcheck(2,0) v ->3
    3              <;> nextstate(main 3 p:5) v:%,fea=7 ->4
    4              <+> argelem(0)[$x:3,5] v/SV ->5
    5              <;> nextstate(main 4 p:5) v:%,fea=7 ->6
    6              <+> argelem(1)[$y:4,5] v/SV ->7
    -              <;> ex-nextstate(main 5 p:5) v:%,fea=7 ->-
    7        <;> nextstate(main 5 p:6) v:%,fea=7 ->8
    9        <1> study sK/1 ->a
    -           <1> ex-rv2sv sK/1 ->9
    8              <#> gvsv[*_] s ->9

All the ops associated with the signature have been put in their own
subtree, with an extra NULL ex-argcheck op "on top". The op on top
serves two purposes: first, it makes it easier for Deparse.pm etc to
spot siganure code; secondly, it may at some point in the future be
upgraded to OP_SIGNATURE when signatures get optimised. It's of type
ex-argcheck only because when being created it needs to be an op type
that's in class UNOP_AUX so that the created op will be suitable for
later optimising, and making it an ex-type associated with signatures
helps flag it as such.

There should be no functional changes apart from the shape of the
optree.

4 years agorpeep(): skip duplicate nextstates even with gaps
David Mitchell [Sat, 21 Sep 2019 11:24:45 +0000 (12:24 +0100)]
rpeep(): skip duplicate nextstates even with gaps

rpeep() already optimises away consecutive nextstate ops. This commit
makes it do this even if there are 'noop' ops between them like null,
scope, lineseq.

This has a specific utility for the next commit, which will reorganise
the optree for subroutine signatures in a way which introduces a lineseq
between two nextstates.

4 years agoSignatures: change param count from IV to UV
David Mitchell [Fri, 20 Sep 2019 10:11:36 +0000 (11:11 +0100)]
Signatures: change param count from IV to UV

For some reason I was storing the counts of sub signature parameters and
optional parameters as signed ints. Since these can never be negative,
change them to UV instead.

4 years agoOP_ARGCHECK: use custom aux struct
David Mitchell [Fri, 20 Sep 2019 09:57:54 +0000 (10:57 +0100)]
OP_ARGCHECK: use custom aux struct

This op is of class OP_UNOP_AUX, Ops of this class have an op_aux pointer
which typically points to a variable-length malloced array of IVs,
UVs, etc. However in the specific case of OP_ARGCHECK the data stored
in the aux struct is fixed. So this commit casts the aux pointer to a
struct containing the relevant fields (number of parameters etc), rather
than referring to them as aux[0], aux[1] etc. This makes the code more
readable.

Should be no functional changes.

4 years agosignatures: add tests for multiline sig
David Mitchell [Thu, 19 Sep 2019 10:39:30 +0000 (11:39 +0100)]
signatures: add tests for multiline sig

4 years agosignatures: add taint tests
David Mitchell [Thu, 19 Sep 2019 10:25:53 +0000 (11:25 +0100)]
signatures: add taint tests

4 years ago[MERGE] fixup add+use si_cxsubix field
David Mitchell [Mon, 23 Sep 2019 13:21:32 +0000 (14:21 +0100)]
[MERGE] fixup add+use si_cxsubix field

Re-apply merged branch that was temporarily reverted, and add a fix
which fixes the breakage which triggered the revert.

4 years agosi_cxsubix not restored on goto &XS_sub
David Mitchell [Mon, 23 Sep 2019 13:02:49 +0000 (14:02 +0100)]
si_cxsubix not restored on goto &XS_sub

My recent merge commit v5.31.3-198-gd2cd363728 (temporarily reverted by
v5.31.4-0-g20ef288c53) added a si_cxsubix field to the stackinfo struct
to track the most recent sub context. This field wasn't being restored
correctly with 'goto &XS-sub', and broke Test::Deep.

4 years agoUn-revert "[MERGE] add+use si_cxsubix field"
David Mitchell [Sat, 21 Sep 2019 12:23:16 +0000 (13:23 +0100)]
Un-revert "[MERGE] add+use si_cxsubix field"

original merge commit: v5.31.3-198-gd2cd363728
reverted by:           v5.31.4-0-g20ef288c53

The commit following this commit fixes the breakage, which that means
the revert can be undone.

4 years agobump $Time::HiRes::VERSION
Tony Cook [Mon, 23 Sep 2019 04:54:38 +0000 (14:54 +1000)]
bump $Time::HiRes::VERSION

4 years agoTime::HiRes: fix compilation with Visual C++ 2013 and older origin/tonyc/132447-time-hires-old-vc
Tomasz Konojacki [Mon, 23 Sep 2019 01:19:05 +0000 (03:19 +0200)]
Time::HiRes: fix compilation with Visual C++ 2013 and older

1d96b9c90e199a42267d0142b9d623350a183412 broke it. It turns out
that Visual C++ 2013 and older don't have the timespec structure.

[perl #134447]

4 years agoAdd 5.31.5 to Module::CoreList data
Max Maischein [Fri, 20 Sep 2019 22:19:04 +0000 (00:19 +0200)]
Add 5.31.5 to Module::CoreList data

4 years agoBump Version from 5.31.4 to 5.31.5 in various places
Max Maischein [Fri, 20 Sep 2019 22:09:56 +0000 (00:09 +0200)]
Bump Version from 5.31.4 to 5.31.5 in various places

4 years agonew perldelta for 5.31.4
Max Maischein [Fri, 20 Sep 2019 21:59:28 +0000 (23:59 +0200)]
new perldelta for 5.31.4

4 years agoAdd the 5.31.4 epigraph
Max Maischein [Fri, 20 Sep 2019 21:54:47 +0000 (23:54 +0200)]
Add the 5.31.4 epigraph

4 years agoTick the entry for the 5.31.4 release
Max Maischein [Fri, 20 Sep 2019 21:53:21 +0000 (23:53 +0200)]
Tick the entry for the 5.31.4 release

4 years agoRevert "[MERGE] add+use PL_curstackinfo->si_cxsubix field" v5.31.4
Max Maischein [Fri, 20 Sep 2019 21:00:04 +0000 (23:00 +0200)]
Revert "[MERGE] add+use PL_curstackinfo->si_cxsubix field"

This reverts commit d2cd363728088adada85312725ac9d96c29659be, reversing
changes made to 068b48acd4bdf9e7c69b87f4ba838bdff035053c.

This change breaks installing Test::Deep:

...
not ok 37 - Test 'isa eq' completed
ok 38 - Test 'isa eq' no premature diagnostication
...

4 years agoadd new release to perlhist
Max Maischein [Fri, 20 Sep 2019 17:18:03 +0000 (19:18 +0200)]
add new release to perlhist

4 years agoUpdate perldelta for 5.31.4
Max Maischein [Fri, 20 Sep 2019 17:08:57 +0000 (19:08 +0200)]
Update perldelta for 5.31.4

4 years agoUpdate INSTALL file
Max Maischein [Fri, 20 Sep 2019 17:03:25 +0000 (19:03 +0200)]
Update INSTALL file

4 years agoUpdate Module::CoreList for 5.31.4
Max Maischein [Fri, 20 Sep 2019 16:43:20 +0000 (18:43 +0200)]
Update Module::CoreList for 5.31.4

4 years agomakedef.pl: export symbols flagged as C
Craig A. Berry [Fri, 20 Sep 2019 20:11:35 +0000 (15:11 -0500)]
makedef.pl: export symbols flagged as C

0923255565af0741 broke the build on any platform that does not
promiscuously export all symbols from a shared library because
it moved a bunch of symbols from being API (A flag) to core-only
(C flag), but the new C flag was unknown to the program that
generates the export list.  Some of these functions are already
used outside the core (such as by the Encode extension) so we
can't simply pull the plug on them.

4 years ago[MERGE] add+use PL_curstackinfo->si_cxsubix field
David Mitchell [Thu, 19 Sep 2019 09:48:52 +0000 (10:48 +0100)]
[MERGE] add+use PL_curstackinfo->si_cxsubix field

Makes determining context at runtime faster (e.g. last statement in a
sub).

4 years agoperldelta for PL_curstackinfo->si_cxsubix
David Mitchell [Thu, 19 Sep 2019 09:22:25 +0000 (10:22 +0100)]
perldelta for PL_curstackinfo->si_cxsubix

4 years agoPerl_gimme_V(): assume caller always provides cxt
David Mitchell [Wed, 18 Sep 2019 12:43:12 +0000 (13:43 +0100)]
Perl_gimme_V(): assume caller always provides cxt

So we don't need to check whether (cxstack[cxix].blk_gimme & G_WANT),
just use it. Replace the check with an assertion.

4 years agoadd Perl_gimme_V() static inline fn for GIMME_V
David Mitchell [Tue, 17 Sep 2019 14:28:51 +0000 (15:28 +0100)]
add Perl_gimme_V() static inline fn for GIMME_V

This function makes use of PL_curstackinfo->si_cxsubix to avoid the
overhead of a call to block_gimme() when the context of the op is
unknown.

4 years agoadd PL_curstackinfo->si_cxsubix field
David Mitchell [Tue, 17 Sep 2019 13:20:40 +0000 (14:20 +0100)]
add PL_curstackinfo->si_cxsubix field

This tracks the most recent sub/eval/format context pushed onto the
context stack. Then make dopopto_cursub use it.

The previous value is saved in the cxt struct, and is restored whenever
the context is popped.

This adds a tiny overhead for every sub call, but speeds up other
operations, such as determining the caller context when returning a
value from a sub - this has to be dpne for every sub call where the last
expression is context sensitive, so its often a win.

4 years agoadd dopopto_cursub() macro to pp_ctl.c
David Mitchell [Tue, 17 Sep 2019 13:25:39 +0000 (14:25 +0100)]
add dopopto_cursub() macro to pp_ctl.c

short for dopoptosub(cxstack_ix), a common idiom in that file.

4 years agoset VOID on OP_ENTER
David Mitchell [Wed, 18 Sep 2019 11:28:18 +0000 (12:28 +0100)]
set VOID on OP_ENTER

The OP_ENTER planted at the start of a program (and possibly elsewhere)
gets left as UNKNOWN context rather than VOID context, due to op_scope()
not honouring the current context.

Fixing this makes things infinitesimally faster.

4 years agoVanL is now a perl author
Tony Cook [Thu, 19 Sep 2019 05:11:53 +0000 (15:11 +1000)]
VanL is now a perl author

4 years agoupdate perl5-porters list information
VanL [Thu, 19 Sep 2019 04:59:39 +0000 (14:59 +1000)]
update perl5-porters list information

4 years agoperldelta: Add note that documentation has been added to perlapi,perlintern
Karl Williamson [Tue, 17 Sep 2019 00:08:45 +0000 (18:08 -0600)]
perldelta: Add note that documentation has been added to perlapi,perlintern

4 years agoAdd check for malloc_usable_size (Richard Leach)
H.Merijn Brand [Mon, 16 Sep 2019 06:04:37 +0000 (08:04 +0200)]
Add check for malloc_usable_size (Richard Leach)

4 years agoperldelta for 2cb5a7e8af11
Tony Cook [Mon, 16 Sep 2019 01:10:57 +0000 (11:10 +1000)]
perldelta for 2cb5a7e8af11

4 years ago(perl #125557) correctly handle overload for bin/oct floats
Tony Cook [Wed, 11 Sep 2019 01:50:23 +0000 (11:50 +1000)]
(perl #125557) correctly handle overload for bin/oct floats

The hexfp code doesn't check that the shift is 4, and so also
accepts binary and octal fp numbers.

Unfortunately the call to S_new_constant() always passed a prefix
of 0x, so overloading would be trying to parse the wrong number.

Another option is to simply allow only hex floats, though some work
was done in 131894 to improve oct/bin float support.

4 years agoregcomp.sym: Fix comment
Karl Williamson [Sun, 15 Sep 2019 22:08:13 +0000 (16:08 -0600)]
regcomp.sym: Fix comment

The length of an EXACTish node is the same bits as the FLAGS field in
other nodes; it doesn't "precede the length", as previously claimed.

4 years agoMerge branch 'embed.fnc' into blead
Karl Williamson [Sun, 15 Sep 2019 16:40:29 +0000 (10:40 -0600)]
Merge branch 'embed.fnc' into blead

This series of commits slightly improves XS code name space pollution
from the core, and better documents what is happening.

It adds a new C flag to embed.fnc which doesn't change the pollution
problem, but makes it easier for downstream tools, like Devel::PPPort.

Some of the inline.h functions didn't even have prefixes, contrary to
our policy of having functions visible outside the core have a 'Perl_'
prefix.

The branch also documents a couple of API functions and macros.

And better error checking of embed.fnc entries is now done.

4 years agoregen/embed.pl: Enforce some flag restrictions
Karl Williamson [Sat, 14 Sep 2019 20:34:23 +0000 (14:34 -0600)]
regen/embed.pl: Enforce some flag restrictions

embed.fnc now has been updated to not have these flaws, so can now
enforce them for the future.

4 years agoregen/embed.pl: Update a branch test
Karl Williamson [Sat, 14 Sep 2019 20:33:16 +0000 (14:33 -0600)]
regen/embed.pl: Update a branch test

The two flags are now mutually exclusive, so no need to test for both.

4 years agoembed.fnc: M and o flags don't make sense together
Karl Williamson [Sat, 14 Sep 2019 20:30:18 +0000 (14:30 -0600)]
embed.fnc: M and o flags don't make sense together

The M flag does what the o flag except add an incorrect warning.  So
remove the 'o' which gets rid of the warning.

4 years agoembed.fnc: 'm' and 'p' flags don't make sense together
Karl Williamson [Sat, 14 Sep 2019 20:26:05 +0000 (14:26 -0600)]
embed.fnc: 'm' and 'p' flags don't make sense together

This is a macro, so doesn't have a Perl_ long form function call.
Also forbid 'm' and 'S', but there weren't any current uses of that.

4 years agoperlapi: Properly document Perl_custom_op_xop()
Karl Williamson [Sat, 14 Sep 2019 20:16:19 +0000 (14:16 -0600)]
perlapi: Properly document Perl_custom_op_xop()

It requires the prefix and a thread context parameter.

4 years agoautodoc.pl: Special case macros whose name begins with Perl_
Karl Williamson [Sat, 14 Sep 2019 20:11:47 +0000 (14:11 -0600)]
autodoc.pl: Special case macros whose name begins with Perl_

The usage example for these will have the thread context parameter
unless there is no thread context.

4 years agoembed.fnc: Add some comment about name space pollution
Karl Williamson [Sat, 14 Sep 2019 20:06:51 +0000 (14:06 -0600)]
embed.fnc: Add some comment about name space pollution

4 years agoembed.fnc: E, X flags don't make sense with m
Karl Williamson [Thu, 12 Sep 2019 20:31:47 +0000 (14:31 -0600)]
embed.fnc: E, X flags don't make sense with m

Macros can't currently be restricted in scope.

4 years agoDocument IS_SAFE_SYSCALL
Karl Williamson [Thu, 12 Sep 2019 20:24:48 +0000 (14:24 -0600)]
Document IS_SAFE_SYSCALL

4 years agoperlapi: Improve description of is_safe_syscall()
Karl Williamson [Thu, 12 Sep 2019 20:23:18 +0000 (14:23 -0600)]
perlapi: Improve description of is_safe_syscall()

Two parameters weren't described, nor the warnings category used.

4 years agoembed.fnc: Add p flag for is_utf8_non_invariant_string()
Karl Williamson [Thu, 12 Sep 2019 04:08:24 +0000 (22:08 -0600)]
embed.fnc: Add p flag for is_utf8_non_invariant_string()

This is because it has the X flag, which means the function is visible
on ELF systems.