This is a live mirror of the Perl 5 development currently hosted at
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

6 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

6 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

6 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

6 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

6 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

6 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

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

6 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

6 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

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

Including a final Porting/ run.

6 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

6 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

6 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

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

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

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

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

6 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

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

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

6 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

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

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

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

6 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

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

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

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

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

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

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

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

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

6 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

6 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

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

6 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

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

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

6 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

6 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

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

6 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

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

6 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

6 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

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

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

6 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

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

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

6 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

6 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

6 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

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

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

6 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

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

6 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

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

6 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

6 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

6 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

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

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

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

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

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

6 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

6 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

6 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

6 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

6 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

6 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

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