This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perl5.git
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.

4 years agoAdd embed.fnc entry for ReANY
Karl Williamson [Thu, 12 Sep 2019 02:33:05 +0000 (20:33 -0600)]
Add embed.fnc entry for ReANY

This inline function should have an entry.

4 years agoAdd embed.fnc entries for TOPMARK, POPMARK
Karl Williamson [Thu, 12 Sep 2019 00:18:33 +0000 (18:18 -0600)]
Add embed.fnc entries for TOPMARK, POPMARK

4 years agoAdd Perl_ to SvAMAGIC _off,_on names
Karl Williamson [Wed, 11 Sep 2019 23:37:23 +0000 (17:37 -0600)]
Add Perl_ to SvAMAGIC _off,_on names

These function names need a Perl_ prefix to avoid namespace pollution.

4 years agoAdd embed.fnc entries for Cv inline fcns
Karl Williamson [Wed, 11 Sep 2019 23:24:38 +0000 (17:24 -0600)]
Add embed.fnc entries for Cv inline fcns

and change the name of one.  CvDEPTH shouldn't have a trailing 'p' to
indicate private memeber access.  It may do so internally, but the name
shouldn't indicate that.

4 years agoFix up get_regex_charset_name()
Karl Williamson [Wed, 11 Sep 2019 23:08:25 +0000 (17:08 -0600)]
Fix up get_regex_charset_name()

This inline function should not be visible outside certain core (and
ext/re) functions.  Make that happen.

4 years agoinline.h: Move some fcn '{' to column 1
Karl Williamson [Wed, 11 Sep 2019 23:03:29 +0000 (17:03 -0600)]
inline.h: Move some fcn '{' to column 1

Traditionally, functions in perl have been written so their initial '{'
is in column 1 after the prototype.  This makes grepping easier.  This
commit brings 3 functions in this file into conformance.

4 years agoMake PadnameIN_SCOPE() name begin with S_
Karl Williamson [Wed, 11 Sep 2019 21:56:11 +0000 (15:56 -0600)]
Make PadnameIN_SCOPE() name begin with S_

All functions should have a prefix.

4 years agoSome SvREFCNT_foo are no longer macros
Karl Williamson [Tue, 10 Sep 2019 18:37:28 +0000 (12:37 -0600)]
Some SvREFCNT_foo are no longer macros

but are inline functions.  They should be listed in embed.fnc.

4 years agoStrip leading underscore _variant_byte_number()
Karl Williamson [Tue, 10 Sep 2019 17:51:40 +0000 (11:51 -0600)]
Strip leading underscore _variant_byte_number()

Names with leading underscores are reserved for the C implementers.

4 years agoChange name of _utf8_to_uvchr_buf()
Karl Williamson [Tue, 10 Sep 2019 17:12:59 +0000 (11:12 -0600)]
Change name of _utf8_to_uvchr_buf()

A function name with a leading underscore is not legal in C.  Instead
add a suffix to differentiate this name from an otherwise identical one.

4 years agoStrip leading underscore from is_utf8_char_helper()
Karl Williamson [Tue, 10 Sep 2019 16:59:04 +0000 (10:59 -0600)]
Strip leading underscore from is_utf8_char_helper()

Leading underscored name are reserved for the C implementers

4 years agoinline.h: Change fcn name prefix from S_ to Perl_
Karl Williamson [Wed, 11 Sep 2019 21:20:45 +0000 (15:20 -0600)]
inline.h: Change fcn name prefix from S_ to Perl_

This is being done only for those functions that don't have a guard
preventing them from being seen outside of the Perl core.

Talking to Tony Cook, we agreed that this was a good idea for two
reasons:

1) The 'Perl_' prefix does not pollute XS caller's name space.  The 'S_'
   one could be argued that it doesn't much either, but it does more so
   than 'Perl_', and the next reason is the clincher:
2) It allows us to change our minds about whether a function should be
   static inline or not, without affecting callers who use the Perl_
   form, which they would be accustomed to anyway if they're using the
   full name form.

4 years agoregen/embed.pl: Generally generate an ARGS_ASSERT
Karl Williamson [Mon, 9 Sep 2019 17:53:55 +0000 (11:53 -0600)]
regen/embed.pl: Generally generate an ARGS_ASSERT

Prior to this commit, if you changed a pointer argument to allow it
being a NULL, you had to go in and also remove the function's
PERL_ARGS_ASSERT macro call.  Now, such macros are generally defined
even if they are empty, so you can add such a call to any function, and
it will always compile.  If there is no assertion needed, the macro
expands to nothing.

Thus now, the use of these macros is optional when no assert is needed;
but still required by the porting test args_assert.t when an assert is
needed.

The generation of such a macro (when its use is optional) can be
suppressed for individual entries by the new G flag in embed.fnc, also
added by this commit.

4 years agoregen/embed.pl: Wrap #if..#endif differently
Karl Williamson [Mon, 9 Sep 2019 17:43:18 +0000 (11:43 -0600)]
regen/embed.pl: Wrap #if..#endif differently

By surrounding the interior stuff with these in one statement, it makes
it easier to change that interior stuff without having dangling
statements.

This makes no difference in the current generated output

4 years agoembed.fnc: Mark atof2, atof3 for internal use only
Karl Williamson [Sun, 1 Sep 2019 02:58:57 +0000 (20:58 -0600)]
embed.fnc: Mark atof2, atof3 for internal use only

Now that we have Strtod, my_strtod, those should be used instead.

4 years agosv.h: SVt_INVLIST is core-only
Karl Williamson [Sun, 21 Jul 2019 20:02:31 +0000 (14:02 -0600)]
sv.h: SVt_INVLIST is core-only

4 years agoembed.fnc: Change some 'x' marked fcns to 'C'
Karl Williamson [Fri, 9 Aug 2019 17:41:07 +0000 (11:41 -0600)]
embed.fnc: Change some 'x' marked fcns to 'C'

The previous commit added the C flag, which is better to use in many
instances than x.  This commit changes the x entries in embed.fnc that
I'm pretty sure would be better off being C, and removes some 'x'
entries for internal only functions

4 years agoAdd 'C' flag to embed.fnc, for "core-only" fcns
Karl Williamson [Sun, 21 Jul 2019 19:20:55 +0000 (13:20 -0600)]
Add 'C' flag to embed.fnc, for "core-only" fcns

Previously the x flag was (mis-)used for this purpose.  Some functions
that are accessible by XS writers shouldn't be used by them, such as
helper functions that an inline public function calls.  This new flag
alows that to be specified, without having to mark the function as
experimental, which could be misleading to later core maintainers

4 years agoembed.fnc: Clarify comments, and note 'u' flag exceptions
Karl Williamson [Sat, 31 Aug 2019 20:30:29 +0000 (14:30 -0600)]
embed.fnc: Clarify comments, and note 'u' flag exceptions

The next release of Devel::PPPort will know how to handle all these
unorthodox functions, so no need to declare them as such, and in fact
they shouldn't be declared so.

4 years agomathoms.c: Add comment
Karl Williamson [Wed, 11 Sep 2019 23:17:18 +0000 (17:17 -0600)]
mathoms.c: Add comment

4 years agot/re/anyof.t: Fix test names
Karl Williamson [Fri, 13 Sep 2019 02:56:59 +0000 (20:56 -0600)]
t/re/anyof.t: Fix test names

This previously duplicated some boiler plate in the test name

4 years agoregcomp.c: Fix -Dr bug
Karl Williamson [Sun, 26 May 2019 18:22:26 +0000 (12:22 -0600)]
regcomp.c: Fix -Dr bug

If dumping the program and a single range crosses the border between
being in the bitmap and not, the range must be split at the border
because the output has separate text for things in the bitmap vs. those
not.

I'm not sure that there is a situation where this currently occurs, but
it will so with a future commit

4 years agoregcomp.c: Collapse some code
Karl Williamson [Sun, 31 Mar 2019 20:13:58 +0000 (14:13 -0600)]
regcomp.c: Collapse some code

These case statements are all repeated in the code for bracketed
character classes, and mean the same thing.  That code knows a bunch of
things for optimizing.  No need to duplicate that.  Instead, pretend
these are being called within brackets, and call the code to handle
that case, which will generate the proper ops.  This now follows the
example of Unicode properties which have long been processed by
pretending they are surrounded by [...]

4 years agoGeneralize inRANGE()
Karl Williamson [Wed, 26 Jun 2019 18:23:47 +0000 (12:23 -0600)]
Generalize inRANGE()

I figured out a way to make this work generally.  I've also tested this
vs what some modern compilers do under -O2.  It seems this macro is
slightly better.

4 years agoAdd withinCOUNT() macro and change inRANGE to use it
Karl Williamson [Wed, 26 Jun 2019 18:01:05 +0000 (12:01 -0600)]
Add withinCOUNT() macro and change inRANGE to use it

This uses just one conditional to see if a value is between low and
(low + n).

4 years agoperl.h: Fix typo in comment
Karl Williamson [Sun, 15 Sep 2019 04:18:13 +0000 (22:18 -0600)]
perl.h: Fix typo in comment

4 years agoAvoid panic when last s///g is tainted and utf8
David Mitchell [Sat, 14 Sep 2019 15:18:46 +0000 (16:18 +0100)]
Avoid panic when last s///g is tainted and utf8

RT #134409

In a repeated substitution, where the replacement is an expression,
and when the last replacement value is both tainted and utf8, and
everything earlier has been plain, and the final string is suitably
shorter than the original, a panic resulted:

    sv_pos_b2u: bad byte offset, blen=1, byte=6

This is because when at the end, taint magic is being being added to
the target of the s///, the target SV has already had its buffer updated
with the shorter result string, but still has the pos() magic set which
corresponded to the original longer string (this pos value would, in the
normal flow of things, be reset shortly afterwards).

One quirk of sv_magic(), which adds any sort of magic including taint
magic, is that it always checks for the presence of pos() magic, and if
so, converts the byte to utf8 offset if necessary. This was seeing the
invalid pos() offset and panicing.

The check was added by v5.19.3-111-g25fdce4a16:
    "Stop pos() from being confused by changing utf8ness"
It seems like a bit of hack to recalibrate pos() each time sv_magic()
is called, but I've left that alone (sleeping dogs and all that) and
instead added a hack in the taint code path in pp_substcont to reset pos
before setting taint.

4 years agoperldelta for 1e1b6d926a0c8361bc2ebd2b6630ac97988335e3
James E Keenan [Fri, 13 Sep 2019 18:12:54 +0000 (14:12 -0400)]
perldelta for 1e1b6d926a0c8361bc2ebd2b6630ac97988335e3

4 years agoperldelta for 00ea29f1a18d6cb17456df2e33f105a90ddc8c3a
James E Keenan [Fri, 13 Sep 2019 17:32:33 +0000 (13:32 -0400)]
perldelta for 00ea29f1a18d6cb17456df2e33f105a90ddc8c3a

4 years agoUpdate Test-Simple to CPAN version 1.302168
Chad Granum [Fri, 13 Sep 2019 17:27:41 +0000 (13:27 -0400)]
Update Test-Simple to CPAN version 1.302168

1.302168  2019-09-06 07:40:18-07:00 America/Los_Angeles

    - Fix Typo in a Test2::API::Breakage warning (Thanks E. Choroba)
    - Delay loading of Term::Table until needed (Thanks Graham Knop)

1.302167  2019-08-23 14:07:58-07:00 America/Los_Angeles

    - add test2_is_testing_done api method
    - Fix string compare warning

4 years agoUpdate Scalar-List-Utils from 1.50 to 1.52
Max Maischein [Fri, 13 Sep 2019 07:21:35 +0000 (09:21 +0200)]
Update Scalar-List-Utils from 1.50 to 1.52

This updates the following modules from 1.50 to 1.52:

List::Util
List::Util::XS
Scalar::Util
Sub::Util

4 years agoUpdate Module-Metadata to CPAN version 1.000037
Chris 'BinGOs' Williams [Fri, 13 Sep 2019 13:23:36 +0000 (14:23 +0100)]
Update Module-Metadata to CPAN version 1.000037

  [DELTA]

1.000037  2019-09-07 18:32:44Z
  - add decode_pod option for automatic =encoding handling

4 years agoUpdate ExtUtils-MakeMaker to CPAN version 7.38
Chris 'BinGOs' Williams [Fri, 13 Sep 2019 12:30:12 +0000 (13:30 +0100)]
Update ExtUtils-MakeMaker to CPAN version 7.38

  [DELTA]

7.38 Wed 11 Sep 10:01:46 BST 2019

    No changes since v7.37_04

7.37_04 Thu 22 Aug 15:20:34 BST 2019

    Bug fixes:
    - Fix static linking on macOS

7.37_03 Sat Aug  3 12:37:29 BST 2019

    Enhancements:
    - Improved mandoc section detection

7.37_02 Thu Jun 27 11:10:39 BST 2019

    Test fixes:
    - Fix test failures in 02-xsdynamic.t on Android native builds
      Github issue #337

7.37_01 Fri Jun  7 11:21:39 BST 2019

    Test fixes:
    - [rt.cpan.org #129763] fixed test errors with latest Pod::Simple

4 years agoPATCH: [perl #134405] Compiler warnings in blead
Karl Williamson [Wed, 11 Sep 2019 22:22:15 +0000 (16:22 -0600)]
PATCH: [perl #134405] Compiler warnings in blead

This was caused by functions that should have been deprecated all along,
and now are.  But they are still called in places.  In most instances
one deprecated function is a wrapper for another.  In one instance, the
calling of the function is to just make sure that mathoms.o gets linked
to.

The solution adopted here, some of which was suggested by Tony Cook, is
to use #pragmas to silence the warnings.  By doing this around the
entirety of mathoms.c, future issues will most likely be avoided.  And
there are unlikely to enough future cases outside of mathoms to cause a
problem.

4 years agoFlorian Weimer is now a perl author
Tony Cook [Tue, 10 Sep 2019 00:44:10 +0000 (10:44 +1000)]
Florian Weimer is now a perl author

4 years agoConfigure: Include <stdlib.h> in futimes check
Florian Weimer [Mon, 9 Sep 2019 17:35:47 +0000 (19:35 +0200)]
Configure: Include <stdlib.h> in futimes check

Needed for the exit function.

4 years agoREADME.cn: Fix pod errors
Karl Williamson [Mon, 9 Sep 2019 16:53:00 +0000 (10:53 -0600)]
README.cn: Fix pod errors

These were introduced in 4d714158728b57246e7015b4f913802c7445a80a

4 years agoMerge branch 'pull/22' into blead (from https://github.com/Perl/perl5/pull/22)
Karen Etheridge [Mon, 9 Sep 2019 05:46:17 +0000 (22:46 -0700)]
Merge branch 'pull/22' into blead (from https://github.com/Perl/perl5/pull/22)

4 years agoReplace a few http urls with https
Kang-min Liu [Sun, 1 Sep 2019 06:24:43 +0000 (15:24 +0900)]
Replace a few http urls with https

A few link labels are also updated.

4 years agoRevise URLs in README.ko
Kang-min Liu [Sun, 1 Sep 2019 06:10:03 +0000 (15:10 +0900)]
Revise URLs in README.ko

1. Remove a dead link
2. Replace http urls with https, when available.

4 years agoRevise the URLs un READEM.cn and README.tw
Kang-min Liu [Sun, 1 Sep 2019 06:01:14 +0000 (15:01 +0900)]
Revise the URLs un READEM.cn and README.tw

- link "the homepage" to www.perl.org instead of perl.com
- modify the description of www.perl.com to stop mentioning O'Reilly.
- replace a few urls with https://

4 years agoPrefer https for a few important urls.
Kang-min Liu [Sun, 1 Sep 2019 05:46:31 +0000 (14:46 +0900)]
Prefer https for a few important urls.

Since browsers are marking "http" as "insecure", it's generally
looking good to link to a https URL when possible.

Also, since www.perl.com is no longer operated by O'Reilly. It is probably
better to remove the name of O'Reilly from the link label.

4 years agoRemove a dead link and its label.
Kang-min Liu [Fri, 30 Aug 2019 13:51:57 +0000 (22:51 +0900)]
Remove a dead link and its label.

4 years agoprefer https URLs.
Kang-min Liu [Fri, 30 Aug 2019 01:47:25 +0000 (10:47 +0900)]
prefer https URLs.

4 years agobump $Time::HiRes::VERSION
Tony Cook [Mon, 9 Sep 2019 01:14:05 +0000 (11:14 +1000)]
bump $Time::HiRes::VERSION

4 years agoTime::HiRes: implement clock_gettime() and clock_getres() for win32
Tomasz Konojacki [Mon, 2 Sep 2019 05:37:17 +0000 (07:37 +0200)]
Time::HiRes: implement clock_gettime() and clock_getres() for win32

To make the implementation easier, the guts of gettimeofday() were
moved to a separate function named GetSystemTimePreciseAsFileTime().

[perl #134398]

4 years ago(perl #133981) fix my stupid mistake
Tony Cook [Thu, 5 Sep 2019 05:37:30 +0000 (15:37 +1000)]
(perl #133981) fix my stupid mistake