This is a live mirror of the Perl 5 development currently hosted at
5 months agohv_func.h, hv_macro.h: Rename compile-once guard
Karl Williamson [Sat, 17 Oct 2020 12:47:11 +0000 (06:47 -0600)]
hv_func.h, hv_macro.h: Rename compile-once guard

These #defines are internal-only, so mark them as such by adding a
trailing underscore to their names.

5 months agoCast parameters to instr, strstr
Karl Williamson [Sat, 17 Oct 2020 12:00:22 +0000 (06:00 -0600)]
Cast parameters to instr, strstr

This code isn't apparently compiled on modern platforms, as when I tried
to force them to compile, I had to do this.

5 months agointrpvar.h: Don't define an undef symbol
Karl Williamson [Mon, 2 Nov 2020 04:02:03 +0000 (21:02 -0700)]
intrpvar.h: Don't define an undef symbol

This symbol needs MULTIPLICTY for its target to actually be defined.
Discovered by Devel::PPPort

5 months agoXSUB.h: Fix some apidoc entries
Karl Williamson [Mon, 2 Nov 2020 03:58:42 +0000 (20:58 -0700)]
XSUB.h: Fix some apidoc entries

So that Devel::PPPort can test that they compile

5 months agoperlapi: Add a link to xsubpp
Karl Williamson [Mon, 2 Nov 2020 03:57:55 +0000 (20:57 -0700)]
perlapi: Add a link to xsubpp

5 months agoperlguts: Fix up some perlapi entries
Karl Williamson [Mon, 2 Nov 2020 03:32:56 +0000 (20:32 -0700)]
perlguts: Fix up some perlapi entries

There were syntax errors in these.

5 months agoperlapi: Document IV_MAX, UV_MAX
Karl Williamson [Sat, 17 Oct 2020 21:37:18 +0000 (15:37 -0600)]
perlapi: Document IV_MAX, UV_MAX

5 months agoperlclib: Don't mention toFOO_LC()
Karl Williamson [Sat, 31 Oct 2020 18:32:41 +0000 (12:32 -0600)]
perlclib: Don't mention toFOO_LC()

There are locales where these macros don't give the right answer for all
legal inputs; so don't mention them.

5 months agoperlio.c: White-space, dead-code only
Karl Williamson [Sat, 31 Oct 2020 18:29:08 +0000 (12:29 -0600)]
perlio.c: White-space, dead-code only

This properly indents nested #preprocessor directives, and removes two
empty #if's

5 months agoBen Cornett is now a Perl author
James E Keenan [Sun, 1 Nov 2020 02:35:52 +0000 (22:35 -0400)]
Ben Cornett is now a Perl author

5 months agoFix typo in perlguts 18277/head
Ben Cornett [Sun, 1 Nov 2020 02:20:05 +0000 (22:20 -0400)]
Fix typo in perlguts

5 months agoperlapi: Document SvPV_free
Karl Williamson [Thu, 8 Oct 2020 20:14:46 +0000 (14:14 -0600)]
perlapi: Document SvPV_free

5 months agoFix up delimcpy_no_escape()
Karl Williamson [Sat, 17 Oct 2020 03:08:13 +0000 (21:08 -0600)]
Fix up delimcpy_no_escape()

I modified this function in ab01742544b98b5b5e13d8e1a6e9df474b9e3005,
and did not fully understand the edge cases.  This commit now handles
those properly, the same as plain delimcpy() does.

5 months agoRewrite delimcpy to use memchr and Copy, not per-byte
Karl Williamson [Fri, 16 Oct 2020 19:27:55 +0000 (13:27 -0600)]
Rewrite delimcpy to use memchr and Copy, not per-byte

Prior to this commit delimcpy() parsed its input byte-by-byte, looking
for a particular character, and copied the input to the output stopping
just before the first such occurrence.

memchr() is much faster for finding a single character.

The complication is that if the character is preceded by a backslash,
it doesn't count as that character, it is considered to be escaped, and
parsing continues to the first unescaped occurrence, if any. Each
escaping backslash is not copied.

The prior code also failed to account for the possibility of the delimiter
being a backslash, the same as the escape.

The new routine looks for the character with memchr, sees if it is
escaped. If not, Copy does the whole copy at once. If it is escaped,
it uses Copy up to that backslash, and repeats the process.

5 months agoAdd API test for delimcpy()
Karl Williamson [Sun, 16 Aug 2020 12:50:12 +0000 (06:50 -0600)]
Add API test for delimcpy()

It turns out that the existing implementation has some bugs, so some of
the tests are marked TODO.

5 months agoPerl_custom_op_get_field(): remove undef behaviour
David Mitchell [Fri, 30 Oct 2020 20:50:58 +0000 (20:50 +0000)]
Perl_custom_op_get_field(): remove undef behaviour

Thus function has a couple a switches with

                   NOT_REACHED; /* NOTREACHED */

but clang is complaining that the value returned by the function is
undefined if those default branches are taken, since the 'any' variable
doesn't get set in that path.

Replace the NOTREACHED with a croak("panic: ..."). It's possible (albeit
not intended) for Perl_custom_op_get_field() to be called with a 'field'
arg which triggers the default case. So if this ever happens, make it
clear that something has gone wrong, rather than just silently
continuing on non-debugging builds.

In any case, this shuts up clang.

5 months agoPathTools/Cwd.xs: fix off-by-one in bsd_realpath()
David Mitchell [Mon, 26 Oct 2020 15:11:14 +0000 (15:11 +0000)]
PathTools/Cwd.xs: fix off-by-one in bsd_realpath()

At the heart of this function is a loop which repeatedly finds the next
component in the path, processes it, then chops that component off the
front of the path by shifting the string to the start of the buffer;
i.e. something like:

    while (remaining_len) {
        s = strchr(remaining, '/')
        remaining_len -= s - remaining;
        memmove(remaining, s, remaining_len + 1);

The problem is that the per-iteration decrement to remaining_len doesn't
take account of the '/' character, so each iteration, remaining_len gets
one more byte too big.

It turns out that this is harmless - it just means that more and more
garbage characters after the trailing null byte get copied each time,
but after each copy the path string is still well formed, with a
trailing null in the right place. So just the random garbage after the
null byte is different.

This commit fixes that.

Although really, it would be better to just increment the
start-of-string pointer each time rather than shift the whole string
each time.

5 months agobump version numbers for PathTools to 3.79
David Mitchell [Mon, 26 Oct 2020 15:13:29 +0000 (15:13 +0000)]
bump version numbers for PathTools to 3.79

5 months agoext/POSIX/t/posix.t: use 'warnings'
Karl Williamson [Thu, 29 Oct 2020 20:18:19 +0000 (14:18 -0600)]
ext/POSIX/t/posix.t: use 'warnings'

5 months agot/run/locale.t: use 'warnings'
Karl Williamson [Thu, 29 Oct 2020 20:16:51 +0000 (14:16 -0600)]
t/run/locale.t: use 'warnings'

A symobl it was testing is either defined or not; was testing the wrong

5 months use 'warnings'
Karl Williamson [Thu, 29 Oct 2020 22:09:15 +0000 (16:09 -0600)] use 'warnings'

5 months Fix locales_enabled()
Karl Williamson [Thu, 29 Oct 2020 21:53:50 +0000 (15:53 -0600)] Fix locales_enabled()

This commit properly returns the new list it is supposed to, clarifies
the documentation.

Fixes GH #18245

5 months agot/ Don't destroy caller's array
Karl Williamson [Thu, 29 Oct 2020 20:30:46 +0000 (14:30 -0600)]
t/ Don't destroy caller's array

This changes to make a copy of the input array, which can then be
modified without affecting the caller.

5 months agoremove assertion that collation magic has data
Tony Cook [Thu, 29 Oct 2020 04:59:16 +0000 (15:59 +1100)]
remove assertion that collation magic has data

This broke on some smokers where the locale collation data was
broken in some way (and rejected by the collation setup code.)

It also broke if collation magic was generated for an SV and then
the SV was modified, freeing the collation data before the SV was

5 months agoremove dead code when using Perl_strtod for numeric conversion
Tony Cook [Wed, 21 Oct 2020 00:02:20 +0000 (11:02 +1100)]
remove dead code when using Perl_strtod for numeric conversion

which is the common case.

If strtod() is disabled, (and USE_PERL_ATOF isn't also disabled) this
code is used, so I moved it into the #elif block.

It's also possible to Configure disabling both strtod() and

  ./Configure ... -Ud_strtod -Accflags=-DUSE_PERL_ATOF=0 ...

which resulted in a build with a broken Perl_my_atof3(), so fail the
build early with #error in that case.

5 months agoembed.h: Add caution about PERL_NO_SHORT_NAMES
Karl Williamson [Mon, 19 Oct 2020 21:49:27 +0000 (15:49 -0600)]
embed.h: Add caution about PERL_NO_SHORT_NAMES

5 months agoFix GH #17278
Karl Williamson [Fri, 23 Oct 2020 13:54:53 +0000 (07:54 -0600)]
Fix GH #17278

This was an assertion failure in regexec.c under rare circumstances.  A
reduction of the fuzzed test case is now in pat_advanced.t

The root cause of this was that the pattern being compiled was encoded in
UTF-8 and 'use locale' was in effect, equivalent to the /l charset, and
then the charset was reset inside the pattern, to /d.  But /d in a UTF-8
patterns is illegal, hence the later assertion failure.

The solution is to reset instead to /u when the pattern is UTF-8.

5 months ago[MERGE] don't do special-cases in S_mg_free_struct
David Mitchell [Fri, 23 Oct 2020 13:26:11 +0000 (14:26 +0100)]
[MERGE] don't do special-cases in S_mg_free_struct

Move all the special-case handling of various magic types out into
vtable->free() methods.

5 months agoadd Perl_magic_freemglob() magic vtable method
David Mitchell [Mon, 19 Oct 2020 15:01:49 +0000 (16:01 +0100)]
add Perl_magic_freemglob() magic vtable method

S_mg_free_struct() has a workaround to never free mg->mg_ptr for

Move this logic into a new magic vtable free method instead, so that
S_mg_free_struct() (which gets called for every type of magic) doesn't
have the overhead of checking every time for mg->mg_type ==

[ No, I don't know why PERL_MAGIC_regex_global's vtable and methods
  are suffixed mglob rather than regex_global or vice versa ]

5 months agoadd Perl_magic_freeutf8() magic vtable method
David Mitchell [Mon, 19 Oct 2020 13:54:59 +0000 (14:54 +0100)]
add Perl_magic_freeutf8() magic vtable method

S_mg_free_struct() has a workaround to free mg->mg_ptr in
PERL_MAGIC_utf8 even if mg_len is zero.

Move this logic into a new magic vtable free method instead, so that
S_mg_free_struct() (which gets called for every type of magic) doesn't
have the overhead of checking every time for mg->mg_type ==

5 months agoadd Perl_magic_freecollxfrm() magic vtable method
David Mitchell [Mon, 19 Oct 2020 13:43:18 +0000 (14:43 +0100)]
add Perl_magic_freecollxfrm() magic vtable method

v5.29.9-139-g44955e7de8 added a workaround to S_mg_free_struct() to
free mg->mg_ptr in PERL_MAGIC_collxfrm even if mg_len is zero.

Move this logic into a new magic vtable free method instead, so that
S_mg_free_struct() (which gets called for every type of magic) doesn't
have the overhead of checking every time for mg->mg_type ==

5 months agot/ Consider thread 0 always locale-safe
Karl Williamson [Wed, 21 Oct 2020 10:46:51 +0000 (04:46 -0600)]
t/ Consider thread 0 always locale-safe

Test files call this code to see if locales are enabled.  Prior to this
commit, it returned that they were disabled on builds where there are
possible races between threads.  This was to silence some rarely
occurring smoke failures.  But that had the result that such builds
didn't get locales tested at all, even if there was just a single thread
operating.  This commit changes it so that when called from other than
the main thread on such a system, it returns disabled, but enabled for
the main thread.

5 months agoperlguts: some items are actually documented in config.h
Karl Williamson [Sat, 17 Oct 2020 18:14:34 +0000 (12:14 -0600)]
perlguts: some items are actually documented in config.h

5 months agoautodoc: Add clarifying info to error messages
Karl Williamson [Wed, 21 Oct 2020 00:56:00 +0000 (18:56 -0600)]
autodoc: Add clarifying info to error messages

5 months agoperl.h: Fix rarely compiled syntax errors
Karl Williamson [Sat, 17 Oct 2020 21:52:12 +0000 (15:52 -0600)]
perl.h: Fix rarely compiled syntax errors

This #ifdef'd code clearly doesn't get compiled, as it would fail.

5 months agoperl.h: Fix typo in comment
Karl Williamson [Sat, 17 Oct 2020 21:38:17 +0000 (15:38 -0600)]
perl.h: Fix typo in comment

5 months agoperl.h: Call macro instead of expanding it out
Karl Williamson [Sat, 17 Oct 2020 21:35:32 +0000 (15:35 -0600)]
perl.h: Call macro instead of expanding it out

5 months agoperlapi: Add markup
Karl Williamson [Sat, 17 Oct 2020 18:49:34 +0000 (12:49 -0600)]
perlapi: Add markup

5 months agoutf8.c: Add blank line for visual clarity
Karl Williamson [Sat, 17 Oct 2020 18:48:13 +0000 (12:48 -0600)]
utf8.c: Add blank line for visual clarity

5 months agoperlapi: PTRV is a typedef
Karl Williamson [Sat, 17 Oct 2020 18:45:33 +0000 (12:45 -0600)]
perlapi: PTRV is a typedef

5 months Use $scalars to hold heading names
Karl Williamson [Tue, 20 Oct 2020 18:03:13 +0000 (12:03 -0600)] Use $scalars to hold heading names

Prior to this, the headings were kept as string keys in a hash.  This
allows for easier tweaking of their contents, and to more easily catch

5 months Output undocumented fcns in multi columns
Karl Williamson [Tue, 20 Oct 2020 15:44:04 +0000 (09:44 -0600)] Output undocumented fcns in multi columns

This is just a list, with nothing to be gained by having a single entry
per line, and making multiple columns shortens it significantly.

5 months Extract code into a function
Karl Williamson [Tue, 20 Oct 2020 13:31:03 +0000 (07:31 -0600)] Extract code into a function

This is in preparation of it becoming more complex in a future commit

5 months Rename sort function for clarity of purpose
Karl Williamson [Tue, 20 Oct 2020 13:43:36 +0000 (07:43 -0600)] Rename sort function for clarity of purpose

5 months agoDevel::PPPort Makefile.PL is not customized since 46677718f1
Steve Hay [Thu, 22 Oct 2020 07:07:19 +0000 (08:07 +0100)]
Devel::PPPort Makefile.PL is not customized since 46677718f1

5 months agoperlintro - Use single hyphen in NAME section
Dan Book [Tue, 20 Oct 2020 23:53:14 +0000 (19:53 -0400)]
perlintro - Use single hyphen in NAME section

5 months agoModule-CoreList-5.20201020 is on CPAN
Steve Hay [Tue, 20 Oct 2020 22:18:58 +0000 (23:18 +0100)]
Module-CoreList-5.20201020 is on CPAN

5 months agoPrepare Module::CoreList for 5.33.4
Steve Hay [Tue, 20 Oct 2020 22:17:36 +0000 (23:17 +0100)]
Prepare Module::CoreList for 5.33.4

5 months agoBump version to 5.33.4
Steve Hay [Tue, 20 Oct 2020 22:06:01 +0000 (23:06 +0100)]
Bump version to 5.33.4

5 months agoCreate new perldelta for 5.33.4
Steve Hay [Tue, 20 Oct 2020 21:52:16 +0000 (22:52 +0100)]
Create new perldelta for 5.33.4

5 months agoTick off 5.33.3
Steve Hay [Tue, 20 Oct 2020 21:43:50 +0000 (22:43 +0100)]
Tick off 5.33.3

5 months agoAdd epigraph for 5.33.3
Steve Hay [Tue, 20 Oct 2020 21:43:01 +0000 (22:43 +0100)]
Add epigraph for 5.33.3

5 months ago5.33.3 today v5.33.3
Steve Hay [Tue, 20 Oct 2020 19:50:06 +0000 (20:50 +0100)]
5.33.3 today

5 months agoFinalize perldelta
Steve Hay [Tue, 20 Oct 2020 19:46:37 +0000 (20:46 +0100)]
Finalize perldelta

Including a final Porting/ run.

5 months agoUpdate Module::CoreList for 5.33.3
Steve Hay [Tue, 20 Oct 2020 19:35:57 +0000 (20:35 +0100)]
Update Module::CoreList for 5.33.3

5 months agosysconf.t: close() takes filehandle, not file descriptor
James E Keenan [Sun, 18 Oct 2020 16:21:58 +0000 (12:21 -0400)]
sysconf.t: close() takes filehandle, not file descriptor

Per suggestion from Leon Timmermans in

5 months agoUpdate Devel-PPPort to release 3.62
Nicolas R [Mon, 19 Oct 2020 16:13:24 +0000 (10:13 -0600)]
Update Devel-PPPort to release 3.62

5 months agoperldelta - Various updates
Steve Hay [Sun, 18 Oct 2020 21:18:11 +0000 (22:18 +0100)]
perldelta - Various updates

5 months agoperldelta - Remove boilerplate
Steve Hay [Sun, 18 Oct 2020 10:27:03 +0000 (11:27 +0100)]
perldelta - Remove boilerplate

5 months agoperldelta - Update Modules and Pragmata
Steve Hay [Sun, 18 Oct 2020 10:19:20 +0000 (11:19 +0100)]
perldelta - Update Modules and Pragmata

5 months agoperlbug - remove obsolete paragraph
Dan Book [Sat, 17 Oct 2020 19:59:01 +0000 (15:59 -0400)]
perlbug - remove obsolete paragraph

5 months agoINSTALL - Correct section about upgrading from previous version
Steve Hay [Sat, 17 Oct 2020 15:02:32 +0000 (16:02 +0100)]
INSTALL - Correct section about upgrading from previous version

5 months agoConsolidate and revise pod for toLOWERfoo()
Karl Williamson [Sat, 17 Oct 2020 11:52:43 +0000 (05:52 -0600)]
Consolidate and revise pod for toLOWERfoo()

5 months agoregcomp.c: Do some extra folding
Karl Williamson [Sat, 4 Apr 2020 22:06:52 +0000 (16:06 -0600)]
regcomp.c: Do some extra folding

Generally we have to wait until runtime to do folding for regnodes that
are locale dependent, because we don't know what the locale at runtime
will be, and hence what the folds will be.

But UTF-8 locales all have the same folding behavior, no matter what the
locale is, with the exception of two fold pairs in Turkish.  (Lithuanian
too, but Perl doesn't support that language's special folding rules.)
UTF-8 is the only locale type that Perl supports that can represent code
points above 255.  Therefore we do know at compile time what the
above-255 folds are (again excepting the two in Turkish), and so we can
do the folding then.  But only if both the components are above 255.
There are a few folds that cross the 255/256 boundary, and they must be

However, there are two instances where there are three characters that
fold together in which two of them are above 255, and the third isn't.
That the two high ones are equivalent under /i is known at compile time,
and so that equivalence can be stated then.

5 months agoregexec.c: Store expression in a variable
Karl Williamson [Tue, 17 Mar 2020 22:55:37 +0000 (16:55 -0600)]
regexec.c: Store expression in a variable

This makes the text look cleaner, and prepares for a future commit,
where we will want to change the variable (which can't be done with the

5 months agoregexec.c: Change variable name in a function
Karl Williamson [Tue, 17 Mar 2020 22:53:50 +0000 (16:53 -0600)]
regexec.c: Change variable name in a function

This makes it like a corresponding variable.

5 months agoregexec.c: Rename local variable; change type
Karl Williamson [Mon, 9 Mar 2020 02:58:46 +0000 (20:58 -0600)]
regexec.c: Rename local variable; change type

I found myself getting confused, as this most likely was named before
UTF-8 came along.  It actually is just a byte, plus an out-of-bounds

While I'm at it, I'm also changing the type from I32, to the perl
equivalent of the C99 'int_fast16_t', as it doesn't need to be 32 bits,
and we should let the compiler choose what size is the most efficient
that still meets our needs.

5 months agocharclass_invlists.h: Add some inverse folds.
Karl Williamson [Wed, 18 Mar 2020 15:12:34 +0000 (09:12 -0600)]
charclass_invlists.h: Add some inverse folds.

The MICRO SIGN folds to above the Latin1 range, the only character that
does so in Unicode (or ever likely to).  This requires special handling.
This commit reduces some of the need for that handling by creating the
inversion map for it, which can be used in certain instances in pattern
matching, without having to have a special case.  The actual use of this
will come in a future commit.

5 months agoregen/ White space only
Karl Williamson [Sun, 29 Mar 2020 21:55:30 +0000 (15:55 -0600)]
regen/ White space only

This does some line wrapping, etc

5 months agoregen/ Rmv unused macro
Karl Williamson [Sat, 28 Mar 2020 03:28:25 +0000 (21:28 -0600)]
regen/ Rmv unused macro

5 months agoregen/ Use case fold
Karl Williamson [Fri, 3 Apr 2020 18:12:06 +0000 (12:12 -0600)]
regen/ Use case fold

Prior to this commit, only the upper case of Latin1 characters was dealt
with.  But we really want case folding, and there are a few other
characters that fold to Latin1.  This commit acknowledges them.

5 months agoregen/ White space, comment only
Karl Williamson [Fri, 27 Mar 2020 03:01:50 +0000 (21:01 -0600)]
regen/ White space, comment only

Outdent and remove lines from changes in the previous commit.

5 months agoregcharclass.h: multi-folds: Add some unfoldeds
Karl Williamson [Thu, 26 Mar 2020 21:59:50 +0000 (15:59 -0600)]
regcharclass.h: multi-folds: Add some unfoldeds

Prior to this commit, the generated macros for dealing with multi-char
folds in UTF-8 strings only recognized completely folded strings.  This
commit changes that to add the uppercase for characters in the Latin1
range.  Hopefully an example will clarify.

followed by U+0307: COMBINING DOT ABOVE.  But since we are doing /i
matching, an 'I' followed by U+307 should also match.  This commit
changes the macros to know this.  Before this, if the fold were entirely
ASCII, the macros would know all the possible combinations.  This commit
extends that to all code points < 256.  (Since there are no folds to the
upper latin1 range), that really means all code points below 128.  But
making it general means it wouldn't have to be revised if a fold were
ever added to the upper half range.)

The reason to make this change is that it makes some future code less
complicated.  And it adds very little complexity to the generated
macros; less than the code it will save.  I originally thought it would
be more complext than it now turns out to be.  Much of that is because
the infrastructure has advanced since that decision.

I couldn't find any current places that this change will allow to be
simplified.  There could be if the macros were extended to do this on
all code points, not just the low ones.  I tried that, but the generated
macros were at least 400 lines longer than before.  That does add
significant complexity, so I backed that out.

5 months agoregen/ Use char instead of hex
Karl Williamson [Sun, 29 Mar 2020 21:46:09 +0000 (15:46 -0600)]
regen/ Use char instead of hex

This changes the generated macros to use a printable character or
mnemonic instead of a hex value.  This makes the macros easier to read.

5 months agoregen/ Move parameter to caller
Karl Williamson [Sun, 29 Mar 2020 18:42:52 +0000 (12:42 -0600)]
regen/ Move parameter to caller

This commit changes a sub in this file to be passed a new parameter.
This is in preparation for the value to be used in the caller.  No need
to derive it twice.

5 months agoregen/ Change member to method
Karl Williamson [Sun, 29 Mar 2020 21:17:32 +0000 (15:17 -0600)]
regen/ Change member to method

This will allow more flexibility in future commits to instead of using a
static format, to use one based on the input value.

The only non-white space change from this commit, is the reordering of a
couple tests; I'm not sure why that happened.

5 months agoregcomp.c: Simplify
Karl Williamson [Fri, 3 Apr 2020 17:46:20 +0000 (11:46 -0600)]
regcomp.c: Simplify

This was a case statement of every type of EXACTish node.  Instead,
there is a simple way to see if something is EXACTish.

5 months agoregcomp.c,regexec.c: Simplify
Karl Williamson [Fri, 3 Apr 2020 16:30:38 +0000 (10:30 -0600)]
regcomp.c,regexec.c: Simplify

This commit uses the new macros from the previous commit to simply come

5 months agoregnodes.h: Add two convenience bit masks
Karl Williamson [Fri, 3 Apr 2020 16:22:19 +0000 (10:22 -0600)]
regnodes.h: Add two convenience bit masks

These categorize the many types of EXACT nodes, so that code can refer
to a particular subset of such nodes without having to list all of them
out.  This simplifies some 'if' statements, and makes updating things

5 months agoregcomp.c: Simplify
Karl Williamson [Sat, 28 Mar 2020 04:03:21 +0000 (22:03 -0600)]
regcomp.c: Simplify

The previous commit made the opcodes for two regops adjacent, so that we
can refer to them by a single range.  This commit takes  advantage of
that change.

5 months agoregcomp.sym: Make adjacent opcodes for 2 similar regnodes
Karl Williamson [Sat, 28 Mar 2020 02:59:38 +0000 (20:59 -0600)]
regcomp.sym: Make adjacent opcodes for 2 similar regnodes

These are often tested together.  By making them adjacent we can use

5 months agoregcomp.sym: Update node comments
Karl Williamson [Wed, 18 Mar 2020 15:07:15 +0000 (09:07 -0600)]
regcomp.sym: Update node comments

5 months agoregcomp.c: Clarify comment
Karl Williamson [Thu, 26 Mar 2020 22:39:24 +0000 (16:39 -0600)]
regcomp.c: Clarify comment

5 months agoregen/ Add a couple constants
Karl Williamson [Thu, 19 Mar 2020 02:14:27 +0000 (20:14 -0600)]
regen/ Add a couple constants

which will be needed in a future commit

5 months agoregexp.h: White-space only
Karl Williamson [Thu, 19 Mar 2020 18:46:38 +0000 (12:46 -0600)]
regexp.h: White-space only

Indent preprocessor lines for clarity of program structure

5 months agoMake some flags accessible from /ext
Karl Williamson [Fri, 16 Oct 2020 12:53:11 +0000 (06:53 -0600)]
Make some flags accessible from /ext

Nothing in the test suite (nor apparently CPAN) had exercised this area
of the code, and so this flaw hadn't been discovered.  But new code
about to be commited does.

5 months agoext/B/Makefile.PL: #define can have interior white space
Karl Williamson [Fri, 16 Oct 2020 12:55:33 +0000 (06:55 -0600)]
ext/B/Makefile.PL: #define can have interior white space

As a result, it would fail to see legal preprocessor lines like

 # define foo

5 months agoPorting/ --update --from=v5.33.2
Steve Hay [Fri, 16 Oct 2020 12:18:25 +0000 (13:18 +0100)]
Porting/ --update --from=v5.33.2

(The new "author" relates to commit ac175de77d.)

5 months agoPorting/ - Don't switch EOLs on Windows
Steve Hay [Fri, 16 Oct 2020 12:17:12 +0000 (13:17 +0100)]
Porting/ - Don't switch EOLs on Windows

5 months agot/porting/customized.dat - Pod::Checker no longer has any CUSTOMIZED files
Steve Hay [Fri, 16 Oct 2020 07:26:42 +0000 (08:26 +0100)]
t/porting/customized.dat - Pod::Checker no longer has any CUSTOMIZED files

5 months agoRMG - Spelling and grammar tweaks
Steve Hay [Fri, 16 Oct 2020 07:19:03 +0000 (08:19 +0100)]
RMG - Spelling and grammar tweaks

5 months agoHP cc can't handle NOT_REACHED
Karl Williamson [Fri, 16 Oct 2020 03:30:28 +0000 (21:30 -0600)]
HP cc can't handle NOT_REACHED

Like solaris, trying to give the hint to the compiler that we know this
area of the code is unreachable, merely results in the warning we were
trying to suppress.  So turn it off.

5 months agoChange name of intermediary macro, and #undef it
Karl Williamson [Fri, 16 Oct 2020 03:28:33 +0000 (21:28 -0600)]
Change name of intermediary macro, and #undef it

Instead of using an underscore to mark this as private, we can #undef
this intermediary after use, as it isn't needed to be defined outside
the small area is is used in in perl.h

5 months agoFix __builtin_unreachable
Karl Williamson [Fri, 16 Oct 2020 03:25:32 +0000 (21:25 -0600)]
Fix __builtin_unreachable

Tomasz Konojacki pointed out on #irc that the formulation in
5d5b9c460e2a06563d2b5e35a1a79991460696eb was wrong, and the correction
here is the right way of doing it.

5 months agoversion - Fixes from recent CPAN update (966a34475a)
Steve Hay [Thu, 15 Oct 2020 17:19:40 +0000 (18:19 +0100)]
version - Fixes from recent CPAN update (966a34475a)

The customization of vutil.c in 51b56f5c7c was lost.

The customization of restored by 2351bb7334 was not recorded in
the usual places, which is probably why it got lost before.

5 months agoMemoize - t/expmod_t.t and t/speed.t were CUSTOMIZED by 53379bfd2f and f0206e8198
Steve Hay [Thu, 15 Oct 2020 16:40:45 +0000 (17:40 +0100)]
Memoize - t/expmod_t.t and t/speed.t were CUSTOMIZED by 53379bfd2f and f0206e8198

5 months agoMath::Complex - t/underbar.t was CUSTOMIZED by cde2523b3a
Steve Hay [Thu, 15 Oct 2020 16:34:55 +0000 (17:34 +0100)]
Math::Complex - t/underbar.t was CUSTOMIZED by cde2523b3a

5 months agoTie::RefHash - Some files are EXCLUDED from blead
Steve Hay [Thu, 15 Oct 2020 16:30:37 +0000 (17:30 +0100)]
Tie::RefHash - Some files are EXCLUDED from blead

5 months agoregcomp.c: Zero width constructs shouldn't be SIMPLE
Karl Williamson [Thu, 15 Oct 2020 13:30:58 +0000 (07:30 -0600)]
regcomp.c: Zero width constructs shouldn't be SIMPLE

This is reserved for length-1 constructs.

5 months agoRefactor and document ASSUME()
Karl Williamson [Wed, 7 Oct 2020 03:50:16 +0000 (21:50 -0600)]
Refactor and document ASSUME()

The blead definition doesn't compile when I use Devel::PPPort earlier than
some point in the 5.19 series.

Examining the code, I noticed that there was a potential cyclic
definition: ASSUME can call NOTREACHED, and NOTREACHED can call assume.

Blead also assumed without checking that __builtin_unreachable() exists.

So, I refactored things so that there is no cycle, and changed a few
words in the comments to turn them into pod, and the new version
compiles all the way back.