This is a live mirror of the Perl 5 development currently hosted at
7 months agoperlbug - remove obsolete paragraph
Dan Book [Sat, 17 Oct 2020 19:59:01 +0000 (15:59 -0400)]
perlbug - remove obsolete paragraph

7 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

7 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()

7 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.

7 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

7 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.

7 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.

7 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.

7 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

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

7 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.

7 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.

7 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.

7 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.

7 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.

7 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.

7 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.

7 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

7 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

7 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.

7 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

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

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

7 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

7 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

7 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.

7 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

7 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.)

7 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

7 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

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

7 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.

7 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

7 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.

7 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.

7 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

7 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

7 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

7 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.

7 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.

7 months agoDocument NOOP, dNOOP, dVAR
Karl Williamson [Wed, 22 Jul 2020 22:50:23 +0000 (16:50 -0600)]
Document NOOP, dNOOP, dVAR

This commit also moves the definition of dVAR down so its
controlling #ifdef is combined with the next #ifdef

8 months agowin32: use the same manifest for Visual C++ and gcc builds
Tomasz Konojacki [Sun, 11 Oct 2020 00:13:09 +0000 (02:13 +0200)]
win32: use the same manifest for Visual C++ and gcc builds

Before this commit, MSVC builds were using /manifestdependency flag
instead of embedding perlexe.manifest. That was causing issues like
GetVersionEx() returning the wrong version number on Windows 10.

8 months agopod/perlfunc.pod: Remove misleading code example (#18105)
James E Keenan [Wed, 14 Oct 2020 14:51:36 +0000 (10:51 -0400)]
pod/perlfunc.pod:  Remove misleading code example (#18105)

* pod/perlfunc.pod:  Remove misleading code example

For: GH 18016

* Additional correction suggested by Dan Book

8 months agoperlsub - Link to constant pragma
Dan Book [Wed, 14 Oct 2020 01:58:14 +0000 (21:58 -0400)]
perlsub - Link to constant pragma

8 months agoregexec.c: Macroize another common paradigm
Karl Williamson [Sat, 6 Jun 2020 22:10:11 +0000 (16:10 -0600)]
regexec.c: Macroize another common paradigm

8 months agoregexec.c: Macroize a common paradigm
Karl Williamson [Sat, 6 Jun 2020 22:19:43 +0000 (16:19 -0600)]
regexec.c: Macroize a common paradigm

8 months agoregexec.c: Rename a static variable
Karl Williamson [Sat, 6 Jun 2020 21:55:37 +0000 (15:55 -0600)]
regexec.c: Rename a static variable

This is to distinguish it from a similar variable being added in a
future commit

8 months agoregexec.c: find_byclass(): Restructure
Karl Williamson [Sat, 6 Jun 2020 14:10:31 +0000 (08:10 -0600)]
regexec.c: find_byclass(): Restructure

This is a follow-on to the previous commit.  The case number of the main
switch statement now includes three things: the regnode op, the UTF8ness
of the target, and the UTF8ness of the pattern.

This allows the conditionals within the previous cases (which only
encoded the op), to be removed, and things to be moved around so that
there is more fall throughs and fewer gotos, and the macros that are
called no longer have to test for UTF8ness; so I teased the UTF8 ones
apart from the non_UTF8 ones.

8 months agoregexec.c: S_find_byclass(): utf8ness in switch()
Karl Williamson [Tue, 2 Jun 2020 21:50:02 +0000 (15:50 -0600)]
regexec.c: S_find_byclass(): utf8ness in switch()

This uses the #defines created in the previous commit to make the switch
statement in this function incorporate the UTF8ness of both the pattern
and the target string.

The reason for this is that the first statement in nearly every case of
the switch is to test if the target string being matched is UTF-8 or
not.  By putting that information into the the case number, those
conditionals can be eliminated, leading to cleaner, more modular code.
I had hoped that this would also improve performance since there are
fewer conditionals, but Sergey Aleynikov did performance testing of this
change for me, and found no real noticeable gain nor loss.

Further, the cases involving matching EXACTish nodes have to also test
if the pattern is UTF-8 or not before doing anything else.  I added that
information as well to the case number, so that those conditionals can
be eliminated.  For the non-EXACTish nodes, it simply means that that
two case statements execute the same code.

This is an intermediate commit, which only does the expansion of the
current cases into four for each.  The refactoring that takes advantage
of this is in the following commit.

8 months agoregen/ Generate #defines for UTF8ness
Karl Williamson [Wed, 14 Oct 2020 14:27:41 +0000 (08:27 -0600)]
regen/ Generate #defines for UTF8ness

This causes #defines to be generated for regexec.c to use in switch
statements, so that for each opcode there that is a case: there are
actually 4 cases, for the the target being UTF-8 or not, combined with
the pattern being UTF-8 or not.

This will be used in future commits to simplify things.

8 months agoregen/ Change variable name
Karl Williamson [Wed, 14 Oct 2020 14:17:03 +0000 (08:17 -0600)]
regen/ Change variable name

The more specific name this is changed to will make code clearer in
future commits.

8 months agoregen_lib: Output blanks; not tabs
Karl Williamson [Wed, 14 Oct 2020 13:50:15 +0000 (07:50 -0600)]
regen_lib: Output blanks; not tabs

This makes it easier to calculate widths; and our policy is to not use
tabs anyway.

8 months agoAdd exec bit to Porting/
Karl Williamson [Wed, 14 Oct 2020 14:34:35 +0000 (08:34 -0600)]
Add exec bit to Porting/

This was inadvertently recently cleared

8 months agoFix t/porting/cmp_version.t following Pod-Usage update
Steve Hay [Wed, 14 Oct 2020 12:02:59 +0000 (13:02 +0100)]
Fix t/porting/cmp_version.t following Pod-Usage update

8 months agoUpdate DB_File from version 1.854 to 1.855
Steve Hay [Wed, 14 Oct 2020 07:23:21 +0000 (08:23 +0100)]
Update DB_File from version 1.854 to 1.855

8 months agoNo need for empty CUSTOMIZED section
Steve Hay [Wed, 14 Oct 2020 07:15:29 +0000 (08:15 +0100)]
No need for empty CUSTOMIZED section

8 months agoUpdate Pod-Usage from version 1.70 to 2.01
Steve Hay [Wed, 14 Oct 2020 07:07:08 +0000 (08:07 +0100)]
Update Pod-Usage from version 1.70 to 2.01

8 months agot/opbasic/arith.t - extra tests to better exercise dleft/dright paths in pp_modulo
Richard Leach [Fri, 18 Sep 2020 22:10:24 +0000 (23:10 +0100)]
t/opbasic/arith.t - extra tests to better exercise dleft/dright paths in pp_modulo

8 months - remove redundant share()
Richard Leach [Sun, 11 Oct 2020 09:44:11 +0000 (10:44 +0100)] - remove redundant share()

8 months agoAdd alternate email for Eric Lindblad
Karl Williamson [Wed, 14 Oct 2020 02:58:55 +0000 (20:58 -0600)]
Add alternate email for Eric Lindblad

8 months agoReplace ssh with https (#18229)
apparluk [Wed, 14 Oct 2020 02:09:03 +0000 (04:09 +0200)]
Replace ssh with https (#18229)

* use https in perlhack.pod

* https and ssh in perlhack.pod

* closing angle bracket

* links

* author

8 months agoFix t/ and t/TEST to be strict compliant.
Todd Rinaldo [Tue, 13 Oct 2020 17:30:32 +0000 (12:30 -0500)]
Fix t/ and t/TEST to be strict compliant.

So tests can run with -Dusedefaultstrict

8 months agoUpdate Digest to CPAN version 1.19
Todd Rinaldo [Tue, 13 Oct 2020 20:13:32 +0000 (15:13 -0500)]
Update Digest to CPAN version 1.19


1.19 Tue 2020-10-13
- Merge blead change: Remove . from @INC when loading optional modules.

1.18 Tue 2020-10-13
- Correct documentation for add_bits
- Explain $args,... in constructor prototypes
- Add base64_padded_digest method
- Add support for the SHA3 digests
- Update .gitignore and get make manifest working
- Github CI
- Move Digest to a more modern directory tree layout
- Enable strict/warnings for code and tests
- Drop use vars
- Provide a consistent tidy to the code base
- Get rid of the use of bareword file handles
- Modernize the changelog
- Use File::Temp for temporary test files

8 months agoFix enough code to get make test_prep working with -dDusedefaultstrict
Todd Rinaldo [Fri, 11 Sep 2020 22:19:17 +0000 (17:19 -0500)]
Fix enough code to get make test_prep working with -dDusedefaultstrict

This change fixes enough code that it's possible to run make test_prep when perl is compiled with -Dusedefaultstrict.

There are 2 caveats to this:

 - Does not address XSLoader/DynaLoader already submitted in another PR.
 - Does not address cpan/Pod-Usage or cpan/Text-Tabs which continue to be outstanding upstream.

8 months agoremove deprecated GitHub Actions Command and some improvements
Ichinose Shogo [Tue, 13 Oct 2020 15:07:06 +0000 (00:07 +0900)]
remove deprecated GitHub Actions Command and some improvements

Don't use add-path GitHub Action Command
The `add-path` command is deprecated.
For more information see:

* bump up actions/checkout@v1
* enable cache of GitHub Actions
* don't use pre-installed git on cygwin
* split lines for readability

8 months agoTime-HiRes is nearer version 1.9764 than 1.9760
Steve Hay [Tue, 13 Oct 2020 07:36:06 +0000 (08:36 +0100)]
Time-HiRes is nearer version 1.9764 than 1.9760

8 months agoUpdate Pod-Simple from version 3.40 to 3.41
Steve Hay [Tue, 13 Oct 2020 07:28:46 +0000 (08:28 +0100)]
Update Pod-Simple from version 3.40 to 3.41

8 months agoUpdate Win32 from version 0.53 to 0.54
Steve Hay [Mon, 12 Oct 2020 16:36:24 +0000 (17:36 +0100)]
Update Win32 from version 0.53 to 0.54

8 months agoUpdate Unicode-Collate from version 1.28 to 1.29
Steve Hay [Mon, 12 Oct 2020 16:34:02 +0000 (17:34 +0100)]
Update Unicode-Collate from version 1.28 to 1.29

8 months agoUpdate Time-Local from version 1.28 to 1.30
Steve Hay [Mon, 12 Oct 2020 16:26:34 +0000 (17:26 +0100)]
Update Time-Local from version 1.28 to 1.30

8 months agoUpdate Getopt-Long from version 2.51 to 2.52
Steve Hay [Mon, 12 Oct 2020 16:21:50 +0000 (17:21 +0100)]
Update Getopt-Long from version 2.51 to 2.52

8 months agoUpdate ExtUtils-PL2Bat from version 0.002 to 0.003
Steve Hay [Mon, 12 Oct 2020 12:58:18 +0000 (13:58 +0100)]
Update ExtUtils-PL2Bat from version 0.002 to 0.003

Retain the blead customization of t/make_executable.t (b8884e7078).

Exclude the new script/ for now. Presumably this should replace
blead's win32/bin/ at some point?

8 months agoUpdate experimental from version 0.020 to 0.022
Steve Hay [Mon, 12 Oct 2020 12:39:34 +0000 (13:39 +0100)]
Update experimental from version 0.020 to 0.022

8 months agoUpdate Encode from version 3.06 to 3.07
Steve Hay [Mon, 12 Oct 2020 12:36:53 +0000 (13:36 +0100)]
Update Encode from version 3.06 to 3.07

8 months agoUpdate CPAN from vesion 2.27 to 2.28
Steve Hay [Mon, 12 Oct 2020 12:33:40 +0000 (13:33 +0100)]
Update CPAN from vesion 2.27 to 2.28

8 months agoregcomp.c: regpiece: swap order of conditionals
Karl Williamson [Mon, 5 Oct 2020 04:15:17 +0000 (22:15 -0600)]
regcomp.c: regpiece: swap order of conditionals

Its a bit more clearer to test the 0 case before the 1 case, and by
doing so it becomes visually easier to compare and contrast the the two

8 months agoregcomp.c: regpiece: Move chunk of code for clarity
Karl Williamson [Mon, 5 Oct 2020 03:54:06 +0000 (21:54 -0600)]
regcomp.c: regpiece: Move chunk of code for clarity

This changes an error branch to be goto'd out of the mainline code.  The
large chunk being in the middle obscured the comonality of the slightly
different non-error cases.

The branch is moved to the bottom of the routine, and croaks, so there
is no return.

This is a modification to a suggestion by Hugo van der Sanden.

8 months agoregcomp.c: White-space only
Karl Williamson [Sun, 4 Oct 2020 22:25:14 +0000 (16:25 -0600)]
regcomp.c: White-space only

Change indentation to correspond with new blocks formed by the previous

8 months agoregcomp.c: regpiece(): Convert to a switch() stmt
Karl Williamson [Sun, 4 Oct 2020 22:15:53 +0000 (16:15 -0600)]
regcomp.c: regpiece(): Convert to a switch() stmt

This makes the code easier to understand, I think.

8 months agoregcomp.c: regpiece(): More comments; white-space
Karl Williamson [Fri, 24 Apr 2020 18:03:44 +0000 (12:03 -0600)]
regcomp.c: regpiece(): More comments; white-space

8 months agoregcomp.c: regpiece(): Refactor two 'if's
Karl Williamson [Fri, 24 Apr 2020 17:56:39 +0000 (11:56 -0600)]
regcomp.c: regpiece(): Refactor two 'if's

I think this makes it clearer the commonalities of the * and +

8 months agoregcomp.c: regpiece: Consolidate code
Karl Williamson [Fri, 24 Apr 2020 17:50:02 +0000 (11:50 -0600)]
regcomp.c: regpiece: Consolidate code

There is a common place these three occurrences can be placed at,

8 months agoregcomp.c: Change label name; rmv extraneous goto
Karl Williamson [Fri, 24 Apr 2020 17:41:31 +0000 (11:41 -0600)]
regcomp.c: Change label name; rmv extraneous goto

The name was misleading.  There are other things being done here.  And
previous restructuring led to a goto immediately prior to where it went

8 months agoregcomp.c: regpiece(): Pass along that is a code block
Karl Williamson [Sun, 4 Oct 2020 23:20:31 +0000 (17:20 -0600)]
regcomp.c: regpiece(): Pass along that is a code block

regpiece was failing to pass up to its caller that a piece of code
contained a code block, if that code was quantified.

I don't know what the consequences of this are

8 months agoregcomp.c: regpiece() 0 times anything is 0
Karl Williamson [Fri, 24 Apr 2020 17:27:33 +0000 (11:27 -0600)]
regcomp.c: regpiece() 0 times anything is 0

Prior to this commit, regpiece() gave width to many quantified values.
This is wrong.  If something is zero width, repeating it doesn't cause
it to gain width.  I don't know if this led to wrong pattern matching
results, but I imagine it led to slower results in some cases.

8 months agoregcomp.c: regpiece() Don't match 0 length more than once
Karl Williamson [Sun, 4 Oct 2020 22:46:51 +0000 (16:46 -0600)]
regcomp.c: regpiece() Don't match 0 length more than once

There's no point in matching something more than once that doesn't
advance the parse, as long as there are no side effects beyond those
from the first match.  Those could only happen in code blocks, which
this code doesn't have.

8 months agoregcomp.c: Rmv #if 0 bitrotted code
Karl Williamson [Fri, 24 Apr 2020 14:22:25 +0000 (08:22 -0600)]
regcomp.c: Rmv #if 0 bitrotted code

This code has been #ifdef'd out for 20 years, and shows bit rot.  It was
kept around in case there was a problem with the replacement for it, but
that hasn't happened and is very unlikely to happen; in the meantime
this is a visual distraction to the code flow.

8 months agoregcomp.c: Move code to earlier in regpiece()
Karl Williamson [Fri, 24 Apr 2020 13:41:20 +0000 (07:41 -0600)]
regcomp.c: Move code to earlier in regpiece()

This is in preparation for a future commit that will change things so
this would need to be done earlier than the changes.

8 months agoregcomp.c: Rmv misleading comment
Karl Williamson [Fri, 24 Apr 2020 13:26:15 +0000 (07:26 -0600)]
regcomp.c: Rmv misleading comment

This NOTREACHED's presence just before an else would make one think
there is something funny going one, when there isn't.

8 months agoregcomp.c: White-space only
Karl Williamson [Tue, 21 Apr 2020 13:11:30 +0000 (07:11 -0600)]
regcomp.c: White-space only

Outdent since the previous commit removed a surrounding block.
And convert some tabs to blanks

8 months agoregcomp.c: Move some code in regpiece()
Karl Williamson [Tue, 21 Apr 2020 13:05:23 +0000 (07:05 -0600)]
regcomp.c: Move some code in regpiece()

This moves some code, making it part of an if/else.  As a result, several
gotos are eliminated, and the code is in a more logical order.

8 months agoregcomp.c: White-space only
Karl Williamson [Tue, 21 Apr 2020 13:01:05 +0000 (07:01 -0600)]
regcomp.c: White-space only

Outdent since the previous commit removed a surrounding block

8 months agoregcomp.c: Combine common code
Karl Williamson [Tue, 21 Apr 2020 12:41:22 +0000 (06:41 -0600)]
regcomp.c: Combine common code

This bit of code occurs in two places.  Move it so that it gets executed
before the split, so it only has to be specified once.

8 months agoregcomp.c: Move test earlier in regpiece()
Karl Williamson [Tue, 21 Apr 2020 12:26:58 +0000 (06:26 -0600)]
regcomp.c: Move test earlier in regpiece()

Prior to this commit, the code checked if this was a particular
quantifier; if so handled that, then checked if it were some other
quantifier, returning if not.

This commit changes to check first if it is any quantifier, using the
macro that checks for all of them, returning if not.

Thus after the new code we know it is a quantifier and this allows later
commits to simplify

8 months agot/op/inc.t: Test incrementing UV with and without upgrading to NV.
TAKAI Kousuke [Thu, 8 Oct 2020 10:48:51 +0000 (19:48 +0900)]
t/op/inc.t: Test incrementing UV with and without upgrading to NV.

8 months agosv.c: Added missing braces in Perl_sv_inc_nomg().
TAKAI Kousuke [Thu, 8 Oct 2020 10:02:10 +0000 (19:02 +0900)]
sv.c: Added missing braces in Perl_sv_inc_nomg().

8 months agoUpdate Tie-RefHash to CPAN version 1.40
Karen Etheridge [Sat, 10 Oct 2020 20:41:33 +0000 (13:41 -0700)]
Update Tie-RefHash to CPAN version 1.40


1.40      2020-10-10 20:38:32Z
  - switch from "use vars" to "our", raising minimum perl to 5.6
  - tooling improvements

8 months agoperlapi: Consolidate sv_utf8_upgrade-ish entries
Karl Williamson [Sat, 5 Sep 2020 18:32:01 +0000 (12:32 -0600)]
perlapi: Consolidate sv_utf8_upgrade-ish entries

8 months agoperlapi: svtype is a typedef
Karl Williamson [Thu, 8 Oct 2020 20:10:40 +0000 (14:10 -0600)]
perlapi: svtype is a typedef

8 months agoUpdate Test-Simple to CPAN version 1.302181
Todd Rinaldo [Thu, 8 Oct 2020 23:40:08 +0000 (18:40 -0500)]
Update Test-Simple to CPAN version 1.302181


1.302182  2020-10-05 22:02:28-07:00 America/Los_Angeles

 - Fix 5.6 support
 - Fix fragile %INC handling in a test