This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perl5.git
13 months agoreentr.[ch]: White-space only
Karl Williamson [Wed, 11 Mar 2020 17:33:39 +0000 (11:33 -0600)]
reentr.[ch]: White-space only

I changed the preprocessor directive indentation to make it easier to
grasp the nesting levels, and added blank lines for readability.

Some of the changes are for future commits that will remove some
nesting.

13 months agoregen/reentr.pl: Add some comments
Karl Williamson [Tue, 10 Mar 2020 23:16:23 +0000 (17:16 -0600)]
regen/reentr.pl: Add some comments

13 months agoFix language referring to GitHub issue tracker in various places
Dave Rolsky [Sat, 14 Mar 2020 17:59:09 +0000 (12:59 -0500)]
Fix language referring to GitHub issue tracker in various places

There were a number of spots that used language more appropriate for an email
address than a web-based tracker.

I noticed this because of the recent 5.30.2 release, which has a perldelta
containing the sentence "If you find any we have missed, send email to
https://github.com/Perl/perl5/issues."

But I think that was because the 5.30.2 branch did not include
8166b4e0bc220e759aa233af54ac1e60cc510f0c.

13 months agoFill in link for 5.30.2 epigraph
Steve Hay [Sat, 14 Mar 2020 17:59:21 +0000 (17:59 +0000)]
Fill in link for 5.30.2 epigraph

13 months agoImport perl5302delta.pod
Steve Hay [Sat, 14 Mar 2020 17:49:42 +0000 (17:49 +0000)]
Import perl5302delta.pod

13 months agoModule::CoreList - Add entry for forthcoming 5.31.10 to Changes
Steve Hay [Sat, 14 Mar 2020 17:42:23 +0000 (17:42 +0000)]
Module::CoreList - Add entry for forthcoming 5.31.10 to Changes

This got missed by 4b9ba9feb3.

13 months agoModule::CoreList - Fix date of 5.30.2
Steve Hay [Sat, 14 Mar 2020 17:40:14 +0000 (17:40 +0000)]
Module::CoreList - Fix date of 5.30.2

This got missed by 30107e92e6 on the maint-5.30 branch.

13 months agoUpdate Module-CoreList with data for 5.30.2
Steve Hay [Sat, 14 Mar 2020 17:36:26 +0000 (17:36 +0000)]
Update Module-CoreList with data for 5.30.2

13 months agoTick off 5.30.2
Steve Hay [Sat, 14 Mar 2020 17:17:28 +0000 (17:17 +0000)]
Tick off 5.30.2

13 months agoAdd epigraph for 5.30.2
Steve Hay [Sat, 14 Mar 2020 17:16:13 +0000 (17:16 +0000)]
Add epigraph for 5.30.2

13 months ago5.30.2 today
Steve Hay [Sat, 14 Mar 2020 12:25:24 +0000 (12:25 +0000)]
5.30.2 today

13 months agoperlop - Avoid $a and $b
Dan Book [Sat, 14 Mar 2020 00:19:20 +0000 (20:19 -0400)]
perlop - Avoid $a and $b

13 months agoFetch git history to run tests like t/porting/cmp-version.t
Nicolas R [Fri, 13 Mar 2020 21:41:14 +0000 (15:41 -0600)]
Fetch git history to run tests like t/porting/cmp-version.t

Make sure t/porting/cmp-version.t is run by GitHub workflow
in order to catch issues on Pull Requests.

Setup a larg diff.renameLimit to avoid git warnings from
multiple unit tests.

Note: the i386 workflow cannot use checkout@v2 and need to keep
using checkout@v1.

13 months agoBump IPC-Open3 versions to fix cmp_version.t
Nicolas R [Fri, 13 Mar 2020 18:00:11 +0000 (12:00 -0600)]
Bump IPC-Open3 versions to fix cmp_version.t

13 months agoExplain that a shell isn’t always used with qx/STRING/.
Peter Oliver [Sat, 7 Mar 2020 19:47:09 +0000 (19:47 +0000)]
Explain that a shell isn’t always used with qx/STRING/.

13 months agoSilence test failure by updating AUTHORS.
Peter Oliver [Wed, 5 Feb 2020 18:34:12 +0000 (18:34 +0000)]
Silence test failure by updating AUTHORS.

13 months agoClarify when qx/STRING/ returns undef
Peter Oliver [Fri, 31 Jan 2020 18:42:38 +0000 (18:42 +0000)]
Clarify when qx/STRING/ returns undef

Fixes #16572.

13 months agoperlrun - Update PERLIO documentation
Dan Book [Thu, 12 Mar 2020 02:09:49 +0000 (22:09 -0400)]
perlrun - Update PERLIO documentation

- Remove mention of several layers that have no business being set in PERLIO
- Clarify the role of :crlf and :stdio
- Update mentioned versions to indicate state of things in 5.30
- Consistently refer to layers with a leading colon

13 months agoIPC::Open2 and IPC::Open3 documentation updates
Dan Book [Wed, 18 Dec 2019 21:35:01 +0000 (16:35 -0500)]
IPC::Open2 and IPC::Open3 documentation updates

* Remove direct usage of bareword filehandles and use lexical filehandles for the first example in each synopsis.
* Add examples using STDIN and STDOUT filehandles, and examples using already open filehandles, with explicit examples of where these handles come from.
* Declare variables with 'my' where appropriate and condense declarations inline.
* Add comments in synopsis describing the purpose of each example.
* Consistency of referencing synopsis variables from the description.
* Replace ambiguous phrase 'null string' with 'empty string or undefined' which is also more correct here.
* Add links to referenced CPAN modules and manpages.
* Better describe the reason for using gensym in IPC::Open3 and how to use it.

13 months agoAdd strict and warnings to some .PL files
Nicolas R [Wed, 11 Mar 2020 21:40:01 +0000 (15:40 -0600)]
Add strict and warnings to some .PL files

use a convoluted incantation to be able to set
'use strict; use warnings' only for Perl > 5.6

13 months agoAdd strict and warnings to a few utils
Nicolas R [Thu, 12 Mar 2020 22:42:24 +0000 (16:42 -0600)]
Add strict and warnings to a few utils

13 months agoop.c: change Optype to I32 for cmpchain functions
Yves Orton [Sat, 8 Feb 2020 09:51:48 +0000 (10:51 +0100)]
op.c: change Optype to I32 for cmpchain functions

Optype appears to be almost completely unused, and on Win32 builds
we saw warnings from the cmpchain patches:

    perly.y(1063) : warning C4244: 'function' : conversion from 'I32' to 'Optype', possible loss of data
    perly.y(1065) : warning C4244: 'function' : conversion from 'I32' to 'Optype', possible loss of data
    perly.y(1079) : warning C4244: 'function' : conversion from 'I32' to 'Optype', possible loss of data
    perly.y(1081) : warning C4244: 'function' : conversion from 'I32' to 'Optype', possible loss of data

Reviewing the code I noticed that functions like Perl_newBINOP() have
an I32 type argument, and functions like OpTYPE_set() coerce such
arguments into type OPCODE:

#define OpTYPE_set(o,type) \
STMT_START {                                \
    o->op_type = (OPCODE)type;              \
    o->op_ppaddr = PL_ppaddr[type];         \
} STMT_END

this patch changes the signature to the new cmpchain functions so that
they do they same, and change the type for storage for op_type values
to also use OPCODE like most of the other op.c code.

13 months agopod/perlop.pod: cross-precedence chaining
Zefram [Fri, 7 Feb 2020 11:49:07 +0000 (11:49 +0000)]
pod/perlop.pod: cross-precedence chaining

Warn explicitly that chainable operators don't chain with operators of
different precedence.

13 months agopod/perlop.pod: expand doc on chained comparisons
Zefram [Fri, 7 Feb 2020 09:30:21 +0000 (09:30 +0000)]
pod/perlop.pod: expand doc on chained comparisons

13 months agochained comparisons
Zefram [Wed, 5 Feb 2020 07:43:14 +0000 (07:43 +0000)]
chained comparisons

13 months agopp_sort.c: silence the "unused parameter" warning
Tomasz Konojacki [Thu, 12 Mar 2020 23:15:37 +0000 (00:15 +0100)]
pp_sort.c: silence the "unused parameter" warning

The 'flags' argument has been unused since
044d25c73ce10d2b29008b875209d414303ccff7 but we can't remove it
because it's a public API.

Fixes #17632

13 months agoPerlIO bump VERSION for t/porting/cmp_version
Nicolas R [Fri, 13 Mar 2020 01:10:34 +0000 (19:10 -0600)]
PerlIO bump VERSION for t/porting/cmp_version

13 months agoUpdate $VERSION
James E Keenan [Fri, 7 Feb 2020 01:26:44 +0000 (20:26 -0500)]
Update $VERSION

To keep make test_porting happy.

13 months agoB::Deparse fixup uninitialized error in deparsing weird glob statement
Yves Orton [Thu, 6 Feb 2020 06:11:20 +0000 (07:11 +0100)]
B::Deparse fixup uninitialized error in deparsing weird glob statement

This fixes issue #17537, and adds tests

13 months agoI think "program scope" is clearer here than "current file scope"
Tony Cook [Wed, 4 Mar 2020 05:27:35 +0000 (16:27 +1100)]
I think "program scope" is clearer here than "current file scope"

Further clarified it has no effect on modules.

"main program scope" is even clearer, credit to github comments.

Clarifies a documentation nit discussed in #17458

13 months agoRework PerlIO documentation
Dan Book [Wed, 11 Mar 2020 00:31:27 +0000 (20:31 -0400)]
Rework PerlIO documentation

- Add Layers section in the description, giving details of how layers work and encompassing the list of built-in layers
- Add various information relevant to modern usage of each layer
- Consistently refer to layers with a leading colon
- Redo :utf8 and :bytes layer descriptions
- Remove references to using the :utf8 layer for UTF-8 translation
- Add :scalar layer
- Move description of default layers that was oddly in "Querying" section to the end of "Defaults" section
- Correct default layers to specify that PERLIO=:stdio will always result in default layers of :stdio
- Update all examples to be strict-safe and check for open/binmode failure
- Capitalize references to Perl consistently

13 months agoRevert "fixup to "avoid identical stack traces""
Nicolas R [Thu, 12 Mar 2020 21:14:26 +0000 (15:14 -0600)]
Revert "fixup to "avoid identical stack traces""

This reverts commit fb8188b84d8a8f34f90aa9a8d9837892967f6b93.

Unfortunately this is causing some errors during global destruction
like:

Unbalanced string table refcount: (1) for "open_IN" during global destruction

It seems to be flapping, and recompiling Perl could see or not the
issue.

Upstream-URL: https://github.com/Perl/perl5/commit/fb8188b84d8a8f34f90aa9a8d9837892967f6b93

13 months agoIsolate broken 32bit gcc smokers
Nicolas R [Thu, 12 Mar 2020 15:04:14 +0000 (09:04 -0600)]
Isolate broken 32bit gcc smokers

32bits smokers are broken and installing
'dpkg --add-architecture i386' fails on all debian.

Isolate them in order to avoid to have to install i386
architecture.

13 months agodocs: clarify effect of $^H, %^H, ${^WARNING_BITS}
David Mitchell [Thu, 12 Mar 2020 15:41:24 +0000 (15:41 +0000)]
docs: clarify effect of $^H, %^H, ${^WARNING_BITS}

See http://nntp.perl.org/group/perl.perl5.porters/257128

13 months agofixup to "avoid identical stack traces"
David Mitchell [Thu, 12 Mar 2020 14:14:24 +0000 (14:14 +0000)]
fixup to "avoid identical stack traces"

GH #15109, #17567

My original fix for this issue, v5.31.6-141-gf2f32cd638
made a shallow copy of &PL_compiling. However, for non-default
warning bits, this made two COPs share the malloced() cop_warnings,
and bad things ensured. In particular this was flagged up in:

    GH #17567: "BBC: AYOUNG/OpenVZ-0.01.tar.gz"

The fix in this commit is to do a deep copy of the COP using
newSTATEOP().

13 months agoCI do not abort a build too early
Nicolas R [Thu, 12 Mar 2020 14:57:59 +0000 (08:57 -0600)]
CI do not abort a build too early

Currently the 32bit smokers are broken due to some
deps issues. We could consider disable them but it's
better that they do not impact other smokers.

13 months agoRevert "Avoid failures from Install 32bit dependencies issues"
Nicolas R [Thu, 12 Mar 2020 14:56:36 +0000 (08:56 -0600)]
Revert "Avoid failures from Install 32bit dependencies issues"

This reverts commit 29a8ce81089f5cf0be406bc203e22cbe4dc52584.

13 months agogh#10059 - potentially reduce -Wall warnings on plan9. Not tested.
Richard Leach [Sat, 15 Feb 2020 01:34:57 +0000 (01:34 +0000)]
gh#10059 - potentially reduce -Wall warnings on plan9. Not tested.

13 months agoAvoid failures from Install 32bit dependencies issues
Nicolas R [Wed, 11 Mar 2020 22:12:14 +0000 (16:12 -0600)]
Avoid failures from Install 32bit dependencies issues

Multiple CI build failed due to 32 bits dependencies
issues. Let's try to move them as optional.

13 months agoop.c: S_fold_constants_eval can't be inlined
Karl Williamson [Tue, 10 Mar 2020 04:27:34 +0000 (22:27 -0600)]
op.c: S_fold_constants_eval can't be inlined

Because it uses setjmp, is what g++ says

13 months agoStop requesting inlining some functions in recomp.c
Karl Williamson [Tue, 10 Mar 2020 00:28:47 +0000 (18:28 -0600)]
Stop requesting inlining some functions in recomp.c

Pattern compilation is not a performance critical process; there's no
need to request these to be inlined.  Let the compiler decide, given
they are static anyway.  This came up because g++ was warning they
weren't getting inlined anyway.

13 months agoRevert "croak_memory_wrap is an inline function."
Karl Williamson [Mon, 9 Mar 2020 23:47:09 +0000 (17:47 -0600)]
Revert "croak_memory_wrap is an inline function."

This reverts commit 6c714a09cc08600278e72aea1fcdf83576d061b4.
croak_memory_wrap is designed to save a few bytes of memory, and was
never intended to be inlined.  This commit moves it to util.c where the
other croak functions are.

13 months agoregexec.c: Clean up debug call
Hugo van der Sanden [Tue, 10 Mar 2020 19:05:55 +0000 (13:05 -0600)]
regexec.c: Clean up debug call

The code this replaces relies on the internal structure of a macro,
which can change and break things.  This commit changes to use a more
straight forward way of accomplishing the same thing.

13 months agoRmv obsolete function
Karl Williamson [Wed, 11 Mar 2020 22:16:18 +0000 (16:16 -0600)]
Rmv obsolete function

Use of this function was removed as part of adding wildcarding to the
Unicode name property

13 months agouse re qw(debug foo) should warn
Karl Williamson [Fri, 6 Mar 2020 00:25:26 +0000 (17:25 -0700)]
use re qw(debug foo) should warn

Instead, foo was silently ignored

13 months agoAllow debugging from regexec.c back to regcomp.c
Karl Williamson [Tue, 25 Feb 2020 05:25:07 +0000 (22:25 -0700)]
Allow debugging from regexec.c back to regcomp.c

The compilation of User-defined properties in a regular expression that
haven't been defined at the time that pattern is compiled is deferred
until execution time.  Until this commit, any request for debugging info
on those was ignored.

This fixes that by

13 months agoregcomp.c: Update comments
Karl Williamson [Thu, 20 Feb 2020 20:14:56 +0000 (13:14 -0700)]
regcomp.c: Update comments

13 months agolib/charnames.t: White-space only
Karl Williamson [Thu, 20 Feb 2020 19:27:53 +0000 (12:27 -0700)]
lib/charnames.t: White-space only

13 months agoregen/opcodes: Clarify comment
Karl Williamson [Wed, 11 Mar 2020 20:23:18 +0000 (14:23 -0600)]
regen/opcodes: Clarify comment

13 months agomake_ext.pl should use current Perl to run Makefile.PL
Nicolas R [Wed, 11 Mar 2020 17:15:26 +0000 (11:15 -0600)]
make_ext.pl should use current Perl to run Makefile.PL

13 months agoAdd thread safety to some environment accesses
Karl Williamson [Fri, 6 Mar 2020 21:18:45 +0000 (14:18 -0700)]
Add thread safety to some environment accesses

The previous commit added a mutex specifically for protecting against
simultaneous accesses of the environment.  This commit changes the
normal getenv, putenv, and clearenv functions to use it, to avoid races.

This makes the code simpler in places where we've gotten burned and
added stuff to avoid races.  Other places where we haven't known we were
getting burned could have existed until now.  Now that comes
automatically, and we can remove the special cases we earlier stumbled
over.

getenv() returns a pointer to static memory, which can be overwritten at
any moment from another thread, or even another getenv from the same
thread.  This commit changes the accesses to be under control of a
mutex, and in the case of getenv, a mortalized copy is created so that
there is no possible race.

13 months agoAdd mutex for accessing ENV
Karl Williamson [Thu, 20 Feb 2020 23:51:31 +0000 (16:51 -0700)]
Add mutex for accessing ENV

13 months agoCreate new PUSHSTACKi for regcomp.c
Karl Williamson [Tue, 10 Mar 2020 04:21:31 +0000 (22:21 -0600)]
Create new PUSHSTACKi for regcomp.c

See previous commit.

13 months agocop.h: Add comment
Karl Williamson [Mon, 9 Mar 2020 23:29:22 +0000 (17:29 -0600)]
cop.h: Add comment

13 months agoImplement \p{Name=/.../} wildcards
Karl Williamson [Sat, 15 Feb 2020 21:28:32 +0000 (14:28 -0700)]
Implement \p{Name=/.../} wildcards

This commit adds wildcard subpatterns for the Name and Name Aliases
properties.

13 months agocharnames.pm: Make a variable ReadOnly
Karl Williamson [Mon, 9 Mar 2020 22:57:23 +0000 (16:57 -0600)]
charnames.pm: Make a variable ReadOnly

This is in preparation for exporting it in the next commit.

13 months agomktables: Calculate legal chars in algorithmic names
Karl Williamson [Mon, 24 Feb 2020 20:35:01 +0000 (13:35 -0700)]
mktables: Calculate legal chars in algorithmic names

Many ideographic character names are of the form 'prefix-code_point'.
For these, we know that the legal names are just the ones in the prefix,
the dash, and uppercase hex digits.  This commit for each series of
these types of names figures out what characters are legal in that
series, and adds that info to the hash describing the series.  This will
be used in a later commit to rule out entire series when matching
under some circumstances, without having to try any individual matches
within it.

13 months agolib/_charnames.pm: Fix comment
Karl Williamson [Mon, 9 Mar 2020 22:26:52 +0000 (16:26 -0600)]
lib/_charnames.pm: Fix comment

13 months agoReformat lib/unicore/Name.pl
Karl Williamson [Thu, 13 Feb 2020 16:04:41 +0000 (09:04 -0700)]
Reformat lib/unicore/Name.pl

This changes the format of this generated file so that it can more
easily be used with the Unicode Name property in wildcard matching.

Each line will now end with \n\n, and the \t characters are replaced by
\n.  Thus an entry will look like

00001\nSTART OF HEADING\n\n

This makes matching of user-defined patterns using anchors work under
/m, which commit 4829f32decd128e6a122bd8ce35fe944bd87f104 forces.  That
commit also changed some anchors' defintions to make them match \n under
/m with wildcards, so this makes it all transparent to user patterns.

The double \n\n at the end of an entry is so that the code can
distinguish between a line that contains a code point vs a name without
relying on the content; it is a disambiguator, like the \t that used to
be.

13 months agoext/re/re.pm: Fix up setting debug option defaults
Karl Williamson [Thu, 5 Mar 2020 03:19:01 +0000 (20:19 -0700)]
ext/re/re.pm: Fix up setting debug option defaults

This was not setting the defaults properly for 'debug', and 'Debug'

13 months agoregcomp.h: Combine two macros into one
Karl Williamson [Thu, 5 Mar 2020 02:58:33 +0000 (19:58 -0700)]
regcomp.h: Combine two macros into one

One of these macros is no longer used, so just combine them.

13 months agoregexp.h: no subbeg move when reordering regexp struct
Richard Leach [Sun, 8 Mar 2020 13:09:30 +0000 (13:09 +0000)]
regexp.h: no subbeg move when reordering regexp struct

13 months agoregexp.h -reorder regexp to close x86-64 alignment holes
Richard Leach [Tue, 25 Feb 2020 00:15:32 +0000 (00:15 +0000)]
regexp.h -reorder regexp to close x86-64 alignment holes

13 months agoadd the missing =back
David Cantrell [Fri, 6 Mar 2020 10:15:01 +0000 (10:15 +0000)]
add the missing =back

13 months agominor changes from review
David Cantrell [Fri, 6 Mar 2020 00:21:47 +0000 (00:21 +0000)]
minor changes from review

13 months agodocumentation on how -I, -M, PERL5LIB and PERL5OPT interact
David Cantrell [Thu, 5 Mar 2020 22:58:30 +0000 (22:58 +0000)]
documentation on how -I, -M, PERL5LIB and PERL5OPT interact

13 months agoregexp.h: remove redundant comment
Hugo van der Sanden [Wed, 11 Mar 2020 14:29:40 +0000 (14:29 +0000)]
regexp.h: remove redundant comment

14 years of churn have so far removed this comment from its original
referents that it has no current relevance.

13 months agoUnicode 13.0 is now official
Karl Williamson [Wed, 11 Mar 2020 03:46:09 +0000 (21:46 -0600)]
Unicode 13.0 is now official

There were no changes in the files since blead was last updated with the
beta versions.

13 months agoImprove handling missing data in t/porting/authors.t with github actions.
John Lightsey [Thu, 5 Mar 2020 15:52:14 +0000 (09:52 -0600)]
Improve handling missing data in t/porting/authors.t with github actions.

On cygwin smoke runs, the "merge-base" calculation results in an error, but
the test is functional if it traverses the full git history.

13 months agoAdd clang and 32bit gcc to linux smoke test matrix.
John Lightsey [Thu, 5 Mar 2020 04:25:48 +0000 (22:25 -0600)]
Add clang and 32bit gcc to linux smoke test matrix.

13 months agoAdd additional email addresses for John Lightsey
John Lightsey [Thu, 5 Mar 2020 03:50:49 +0000 (21:50 -0600)]
Add additional email addresses for John Lightsey

13 months agoFix cygwin smoker configuration.
John Lightsey [Thu, 5 Mar 2020 03:29:55 +0000 (21:29 -0600)]
Fix cygwin smoker configuration.

Checkouts in the cygwin smoke action were performed without authentication.
This made the action fail in private repos.

This also fixes a mistake in the way shell commands were quoted.

13 months agoEncode: synch with CPAN version 3.04
James E Keenan [Wed, 11 Mar 2020 00:22:54 +0000 (20:22 -0400)]
Encode: synch with CPAN version 3.04

13 months agoTime-Piece: synch with CPAN version 1.34
James E Keenan [Tue, 10 Mar 2020 02:24:37 +0000 (02:24 +0000)]
Time-Piece: synch with CPAN version 1.34

13 months agoregcomp.c: Fix comments
Karl Williamson [Mon, 9 Mar 2020 23:08:25 +0000 (17:08 -0600)]
regcomp.c: Fix comments

Spotted by Hugo van der Sanden

13 months agoperlunicode: Fix typo
Karl Williamson [Mon, 9 Mar 2020 22:23:37 +0000 (16:23 -0600)]
perlunicode: Fix typo

Spotted by Hugo van der Sanden

13 months agomalloc.c: Fix compiler warnings/error
Karl Williamson [Sun, 8 Mar 2020 18:29:01 +0000 (12:29 -0600)]
malloc.c: Fix compiler warnings/error

This needed a const to compile, and there were warnings as well.

13 months agooptimize sort by inlining comparison functions
Tomasz Konojacki [Mon, 2 Mar 2020 23:45:05 +0000 (00:45 +0100)]
optimize sort by inlining comparison functions

This makes special-cased forms such as sort { $b <=> $a }
even faster.

Also, since this commit removes PL_sort_RealCmp, it fixes the
issue with nested sort calls mentioned in gh #16129

13 months agopp_sort.c: small refactoring
Tomasz Konojacki [Mon, 2 Mar 2020 23:45:04 +0000 (00:45 +0100)]
pp_sort.c: small refactoring

This will make the future changes a bit easier.

13 months agopp_sort.c: call Perl_sortsv_flags directly
Tomasz Konojacki [Mon, 2 Mar 2020 23:45:03 +0000 (00:45 +0100)]
pp_sort.c: call Perl_sortsv_flags directly

That pointer isn't needed.

13 months agopp_sort.c: normalize indentation
Tomasz Konojacki [Mon, 2 Mar 2020 23:45:02 +0000 (00:45 +0100)]
pp_sort.c: normalize indentation

According to perlhack, code should be indented with four spaces.

This commit doesn't contain any functional changes. If you're
seeing it in "git blame" output, try using -w switch, it will
hide whitespace-only changes.

13 months agonew function specifier: PERL_STATIC_FORCE_INLINE
Tomasz Konojacki [Wed, 4 Mar 2020 22:34:38 +0000 (23:34 +0100)]
new function specifier: PERL_STATIC_FORCE_INLINE

It's the same thing as PERL_STATIC_INLINE but it also adds
__attribute__(always_inline) or __forceinline if the compiler
supports that.

13 months agoregen/embed.pl: handle PERL_STATIC_INLINE_NO_RET properly
Tomasz Konojacki [Wed, 4 Mar 2020 22:17:31 +0000 (23:17 +0100)]
regen/embed.pl: handle PERL_STATIC_INLINE_NO_RET properly

13 months agoregen/embed.pl: fix error message
Tomasz Konojacki [Wed, 4 Mar 2020 22:13:16 +0000 (23:13 +0100)]
regen/embed.pl: fix error message

13 months agosymbian/symbianish.h: Fix broken macro name
Karl Williamson [Sat, 7 Mar 2020 14:33:32 +0000 (07:33 -0700)]
symbian/symbianish.h: Fix broken macro name

The name was misspelled, and could never have compiled.

This indicates that no one on a Symbian system has tried perls since
2016.

13 months agofix typo in perlivp
Craig A. Berry [Fri, 6 Mar 2020 13:27:23 +0000 (07:27 -0600)]
fix typo in perlivp

13 months agoAllow wildcard pattern debugging
Karl Williamson [Mon, 24 Feb 2020 19:16:46 +0000 (12:16 -0700)]
Allow wildcard pattern debugging

This fixes #17026

Patterns can have subpatterns since 5.30.  These are processed when
encountered, by suspending the main pattern compilation, compiling the
subpattern, and then matching that against the set of all legal
possibilities, which Perl knows about.

Debugging info for the compilation portion of the subpattern was added
by be8790133a0ce8fc67454e55e7849a47a0858d32, without fanfare.  But,
prior to this new commit, debugging info was not available for that
matching portion of the compilation, except under DEBUGGING builds, with
-Drv.  This commit adds a new option to 'use re qw(Debug ...)',
WILDCARD, to enable subpattern match debugging.  Whatever other match
debugging options have been turned on will show up when a wildcard
subpattern is compiled iff WILDCARD is specified.

The output of this may be voluminous, which is why you have to ask for
it specifically.  Or, the EXTRA option turns it on, along with several
other things.

13 months agoregcomp.c: Rmv use of extraneous macro
Karl Williamson [Wed, 4 Mar 2020 23:01:24 +0000 (16:01 -0700)]
regcomp.c: Rmv use of extraneous macro

I added this becuase the name of another macro confused me into thinking
this was necessary, whereas that other macro was all that was needed.

This is the only use of the extraneous macro.

13 months agoregex: Change internal macro name
Karl Williamson [Wed, 4 Mar 2020 22:59:29 +0000 (15:59 -0700)]
regex: Change internal macro name

It wasn't clear to me that the macro did more than a declaration, given
its name.  Rename it to be clear as to what it does.

13 months agoFix variable name in wrap_keyword_plugin documentation
Stefan Seifert [Thu, 5 Mar 2020 10:57:28 +0000 (11:57 +0100)]
Fix variable name in wrap_keyword_plugin documentation

13 months agoregcomp.h: remove redundant comment
Hugo van der Sanden [Thu, 5 Mar 2020 12:23:19 +0000 (12:23 +0000)]
regcomp.h: remove redundant comment

This 1989 comment stopped being true in 1997 with commit c277df4222.

13 months agobump $XS::APItest::VERSION
Tony Cook [Wed, 4 Mar 2020 04:52:41 +0000 (15:52 +1100)]
bump $XS::APItest::VERSION

13 months agoadd casts to IV_MAX, UV_MAX so they match the IVdf, UVdf macros
Tony Cook [Wed, 22 Jan 2020 04:40:05 +0000 (15:40 +1100)]
add casts to IV_MAX, UV_MAX so they match the IVdf, UVdf macros

fixes #17338

13 months agoAPItest: get a compile-time warning if IVdf doesn't match IV_MAX
Tony Cook [Wed, 22 Jan 2020 04:38:15 +0000 (15:38 +1100)]
APItest: get a compile-time warning if IVdf doesn't match IV_MAX

and similarly for UVuf/UV_MAX.

This already warns in PPPort, but that's for testing PPPort, not
the core.

13 months agoregcomp.c: Get rid of meaningless test
Karl Williamson [Mon, 2 Mar 2020 17:15:25 +0000 (10:15 -0700)]
regcomp.c: Get rid of meaningless test

Since ea3daa5, parts of this test became nonsensical as max_offset
cannot be larger than OPTIMIZE_INFIINITY.  (I don't know why compilers
didn't say that this branch is always false.)

Hugo van der Sanden suggested something like this commit to keep the
still valid part of the test.

13 months agoAllow more debugging in re_comp.c
Karl Williamson [Mon, 24 Feb 2020 19:13:16 +0000 (12:13 -0700)]
Allow more debugging in re_comp.c

This adds two main functions that were previously only defined in
regcomp.c to also be defined in re_comp.c.  This allows re.pm to use
debugging with them.   To avoid duplicating large data structures,
several lightweight wrapper functions are added to regcomp.c that
re_comp.c calls to access those structures.

13 months agochar_class_invlists.h: Give re_comp.c access to enums,#defines
Karl Williamson [Mon, 24 Feb 2020 18:20:13 +0000 (11:20 -0700)]
char_class_invlists.h: Give re_comp.c access to enums,#defines

The previous commit changed the code so that enums and #defines could be
requested to be in re_comp.c.  This commit changes to use that new
capability.

13 months agoregen/mk_invlists.pl: Allow enums/defines to be in re_comp.c
Karl Williamson [Mon, 24 Feb 2020 16:31:02 +0000 (09:31 -0700)]
regen/mk_invlists.pl: Allow enums/defines to be in re_comp.c

Tables, to save memory, that are for regcomp.c are excluded from
re_comp.c, but enums use no resources, and a later commit will want them
accessible from re_comp.c.  So change the code so that they can be
requested to be in re_comp.c

13 months agoMove two regex functions so that can use re debug
Karl Williamson [Mon, 24 Feb 2020 04:00:14 +0000 (21:00 -0700)]
Move two regex functions so that can use re debug

These have to have a version in re_comp.c for re.pm to work on them.

13 months agoembed.fnc: Reorder the entries dealing with regexes
Karl Williamson [Mon, 24 Feb 2020 03:46:35 +0000 (20:46 -0700)]
embed.fnc: Reorder the entries dealing with regexes

This moves a bunch of entries around so that they make more sense, and
consolidates some blocks that had the same #ifdefs.  There should be no
change in what gets compiled.