This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perl5.git
8 months agoNo need to use locale_r with thread-safe locales
Karl Williamson [Tue, 10 Mar 2020 21:28:38 +0000 (15:28 -0600)]
No need to use locale_r with thread-safe locales

These use a completely different mechanism.

8 months agoUse quoted strings to compare 5.031006 in Safe.pm
Todd Rinaldo [Thu, 30 Jul 2020 22:31:41 +0000 (17:31 -0500)]
Use quoted strings to compare 5.031006 in Safe.pm

8 months agoFixup AUTHORS with recent merges
Nicolas R [Thu, 30 Jul 2020 22:31:33 +0000 (17:31 -0500)]
Fixup AUTHORS with recent merges

8 months agoAdjust AUTHORS file with new authors
Nicolas R [Thu, 30 Jul 2020 22:17:05 +0000 (17:17 -0500)]
Adjust AUTHORS file with new authors

8 months agoDo not load utf8_heavy.pl in Safe.pm above 5.31.6
Todd Rinaldo [Thu, 30 Jul 2020 22:22:01 +0000 (17:22 -0500)]
Do not load utf8_heavy.pl in Safe.pm above 5.31.6

This is a fixup for #17969 which wanted to load utf8_heavy.pl but
it is no longer available as of 5.31.6

8 months agoRemove obsolete FCRYPT ifdefs and associated PL_cryptseen (#17624)
Richard Leach [Thu, 30 Jul 2020 22:18:41 +0000 (23:18 +0100)]
Remove obsolete FCRYPT ifdefs and associated PL_cryptseen (#17624)

Co-authored-by: Karl Williamson <khw@cpan.org>
8 months agoHaiku use finddir for default prefix in hints
Thibault DUPONCHELLE [Sat, 13 Jun 2020 14:42:57 +0000 (16:42 +0200)]
Haiku use finddir for default prefix in hints

8 months agoAlign to haiku ports (+ keep some extra) and set path dynamically
Thibault DUPONCHELLE [Sat, 13 Jun 2020 13:39:02 +0000 (15:39 +0200)]
Align to haiku ports (+ keep some extra) and set path dynamically

8 months agore-work opslab handling to avoid non-portable alignment assumptions
Tony Cook [Thu, 25 Jun 2020 05:26:32 +0000 (15:26 +1000)]
re-work opslab handling to avoid non-portable alignment assumptions

Fixes #17871

The op slab allocator code made the assumption that since OP and
hence OPSLOT contain pointers, the base of each of those would be
an integral number of sizeof(pointer) (pointer units) from the
beginning of OPSLAB.

This assumption is non-portable, and broke calculating the location
of the slab based on the address of the op slot and the op slot offset
on m68k platforms.

To avoid that, this change now stores the opslot_offset as the
offset in pointer units from the beginning of opslab_slots rather
than from the beginning of the slab.

If alignment on a pointer boundary for OPs is required, the compiler
will align opslab_opslots and since we work in pointer units from there,
any allocated op slots will also be aligned.

If we assume PADOFFSET is no larger than a pointer and requires no
stricter alignment and structures in themselves have no stricter
alignment requirements then since we work in pointer units all core
OP structures should have sufficient alignment (if this isn't true,
then it's not a new problem, and not the problem I'm trying to solve
here.)

I haven't been able to test this on m68k hardware (the emulator I
tried to use can't maintain a network connection.)

8 months agoRevert "op.h: Add additional padding to struct opslab to ensure proper alignment"
Tony Cook [Tue, 23 Jun 2020 04:19:43 +0000 (14:19 +1000)]
Revert "op.h: Add additional padding to struct opslab to ensure proper alignment"

This reverts commit a760468c9355bafaee57e94f13705c0ea925d9ca.

This change is fragile, the next change avoids the need for such
manual padding.

8 months agoAlways expose the perl_tsa_mutex_* functions when threads are enabled
Tom Stellard [Thu, 14 May 2020 23:51:15 +0000 (23:51 +0000)]
Always expose the perl_tsa_mutex_* functions when threads are enabled

These functions were only part of the API if perl is built with clang.
However perl modules built with clang still try to use them even
when perl itself is built with gcc.  This patch replaces the #ifdef PERL_TSA_ACTIVE
around these functions with defined(USE_ITHREADS) && defined(I_PTHREAD)
so they are always available when treading is enabled.  This fixes the clang build of
perl modules when perl is built with gcc.

8 months agocorelist - print a better error message if unknown versions are passed to corelist...
Dan Book [Wed, 20 May 2020 00:22:46 +0000 (20:22 -0400)]
corelist - print a better error message if unknown versions are passed to corelist --diff

8 months agoreport the index for not found hash/array index lookups in report_uninit()
Tony Cook [Mon, 1 Jun 2020 06:11:50 +0000 (16:11 +1000)]
report the index for not found hash/array index lookups in report_uninit()

where the index is a non-magical, non-reference variable.

This only works where the op is converted to OP_MULTIDEREF, but that
should be happening for the simple cases this handles.

An alternative would be to report the index variable name rather than
the index, but that seems less useful to me.

8 months agoPorting/makerel: add cleanup option
Nicolas R [Fri, 5 Jun 2020 18:15:07 +0000 (12:15 -0600)]
Porting/makerel: add cleanup option

We can now run 'Porting/makerel -c' to cleanup
and generate the tarball.

8 months agoPorting/makerel - check for xz
Nicolas R [Fri, 5 Jun 2020 18:08:25 +0000 (12:08 -0600)]
Porting/makerel - check for xz

In addition to the .tar.gz file also abort when one .xz file
already exists.

8 months agoUpdate Net-Ping from 2.72 to 2.73
Nicolas R [Thu, 23 Jul 2020 15:07:24 +0000 (09:07 -0600)]
Update Net-Ping from 2.72 to 2.73

Fix #17992

This is preserving customized tests
and mark them as customized.

8 months agoClearing DB::action at the end is no longer needed
E. Choroba [Mon, 27 Jul 2020 09:32:51 +0000 (11:32 +0200)]
Clearing DB::action at the end is no longer needed

as it's cleared right after it's been run.

8 months agoAfter running an action in the debugger, turn it off
E. Choroba [Fri, 26 Jun 2020 19:19:24 +0000 (21:19 +0200)]
After running an action in the debugger, turn it off

When running with "c", there was no problem, but when running with "n"
or "s", once the action was executed, it kept executing on the
following lines, which wasn't expected. Clearing $action here prevents
this unwanted behaviour.

8 months agoFix indirect method call in ExtUtils::Constant test
Dagfinn Ilmari Mannsåker [Mon, 13 Jul 2020 21:08:45 +0000 (22:08 +0100)]
Fix indirect method call in ExtUtils::Constant test

It puts both "use $];" and "bootstrap $package \$VERSION;" in the
generated test module, which is going to break if we ever remove
`indirect` from the current feature bundle.

Fix by making the method call direct instead.

8 months agoput version directly in Exporter::Heavy
Graham Knop [Thu, 9 Jul 2020 15:22:07 +0000 (17:22 +0200)]
put version directly in Exporter::Heavy

Modules should have their version number directly in the module, not try
to pull it in from another module. The Exporter module that would be
loaded may not correspond to the Exporter::Heavy that is having its
version checked. Generally, pulling a version from another module would
fail on something like PAUSE or a CPAN client, but because Exporter is
probably already loaded, the old code would usually just pick the
version of the currently installed Exporter, rather than the one
corresponding to the Exporter::Heavy module that is being checked.

8 months agoFuture proof version check
Adam Hartley [Thu, 23 Jul 2020 18:53:07 +0000 (19:53 +0100)]
Future proof version check

8 months agoUpdate darwin.sh
Adam Hartley [Wed, 22 Jul 2020 12:15:53 +0000 (13:15 +0100)]
Update darwin.sh

8 months agoSimplify syscall check
Adam Hartley [Wed, 22 Jul 2020 12:15:30 +0000 (13:15 +0100)]
Simplify syscall check

8 months agoUpdate deprecated syscall check for 11.x and greater
Adam Hartley [Sat, 11 Jul 2020 10:41:27 +0000 (11:41 +0100)]
Update deprecated syscall check for 11.x and greater

8 months agoUpdate error message
Adam Hartley [Wed, 8 Jul 2020 18:10:33 +0000 (19:10 +0100)]
Update error message

8 months agoUpdate AUTHORS
Adam Hartley [Wed, 8 Jul 2020 18:04:45 +0000 (19:04 +0100)]
Update AUTHORS

8 months agoAdd 11.x support for darwin.sh
Adam Hartley [Mon, 6 Jul 2020 21:59:42 +0000 (22:59 +0100)]
Add 11.x support for darwin.sh

8 months agoUpdate regen/feature.pl
☢ ℕicolas ℝ [Wed, 29 Jul 2020 17:23:01 +0000 (11:23 -0600)]
Update regen/feature.pl

Features bundles are built on top of each other.

This change make it easier to read what features
were added from one version to another.
It also helps identify similar bundles.

Features are also now sorted on pod.

Enforce strict & warnings to generate feature.pm

8 months agoIO::Socket::UNIX: synchronize behavior with module documentation (#17787)
vividsnow [Thu, 30 Jul 2020 21:37:58 +0000 (00:37 +0300)]
IO::Socket::UNIX: synchronize behavior with module documentation (#17787)

* synchronize behavior with module documentation

IO::Socket docs states that passing Blocking => 0 will be set socket to non-blocking mode

* Update AUTHORS
* bump version

8 months agopp.c/pp_hot.c - add NV<->NV case to numerical comparison ops
Richard Leach [Tue, 2 Jun 2020 21:48:06 +0000 (22:48 +0100)]
pp.c/pp_hot.c - add NV<->NV case to numerical comparison ops

8 months agoFix 404 and text in New Unicode properties section
raiph [Thu, 2 Jul 2020 16:30:07 +0000 (17:30 +0100)]
Fix 404 and text in New Unicode properties section

See https://github.com/Perl/perl5/issues/17881

I found a 404, and an "old" link. I investigated.

My conclusion was UC have landed new TR18 and TR39 since text in section
  New Unicode properties Identifier_Status and Identifier_Type supported
was written.

I've guessed at a suitable update.

8 months agobump IO to 1.44
Tony Cook [Tue, 12 May 2020 01:27:09 +0000 (11:27 +1000)]
bump IO to 1.44

and update the ChangeLog

8 months agoIO::Handle: clear the error on both input and output streams
Tony Cook [Tue, 12 May 2020 00:59:08 +0000 (10:59 +1000)]
IO::Handle: clear the error on both input and output streams

Similarly to GH #6799 clearerr() only cleared the error status
of the input stream, so clear both.

8 months agomake $fh->error report errors from both input and output
Tony Cook [Tue, 12 May 2020 00:29:17 +0000 (10:29 +1000)]
make $fh->error report errors from both input and output

For character devices and sockets perl uses separate PerlIO objects
for input and output so they can be buffered separately.

The IO::Handle::error() method only checked the input stream, so
if a write error occurs error() would still returned false.

Change this so both the input and output streams are checked.

fixes #6799

8 months agodocument the unary minus exception for barewords
Tony Cook [Mon, 8 Jun 2020 04:17:23 +0000 (14:17 +1000)]
document the unary minus exception for barewords

This exception is deliberate, code in op.c explicitly prevents this
from producing an error under use strict.

8 months agouse semicolon to separate statements
Graham Knop [Tue, 2 Jun 2020 19:03:12 +0000 (21:03 +0200)]
use semicolon to separate statements

One of the statements in warnings.pm was terminated with a comma rather
than a semicolon, most likely as a typo. There's no reason for it to be
a comma, so change it to a semicolon for clarity and to avoid potential
issues with statement reordering.

8 months agoSmall changes to test on bugzilla and improve compatibility
Ryan Voots [Tue, 12 Nov 2019 19:57:57 +0000 (14:57 -0500)]
Small changes to test on bugzilla and improve compatibility

8 months agoBump Safe.pm version with change
Ryan Voots [Mon, 11 Nov 2019 22:24:58 +0000 (17:24 -0500)]
Bump Safe.pm version with change

8 months agoUpdate Safe.pm to use tr/// to trigger loading utf8_heavy.pl.
Ryan Voots [Mon, 11 Nov 2019 21:46:56 +0000 (16:46 -0500)]
Update Safe.pm to use tr/// to trigger loading utf8_heavy.pl.
Fixes GH #17271

8 months agoperlrecharclass.pod: Make clear that $, has been assigned to
James E Keenan [Fri, 17 Jul 2020 21:08:59 +0000 (21:08 +0000)]
perlrecharclass.pod: Make clear that $, has been assigned to

Correct typo spotted by Dan Book.

For: https://github.com/Perl/perl5/issues/17892

8 months agoFix format issue in t/op/taint.t and add strict/warnings
Nicolas R [Fri, 17 Jul 2020 22:01:32 +0000 (16:01 -0600)]
Fix format issue in t/op/taint.t and add strict/warnings

Format was using '<'*5 instead of '<'x5 in multiple locations
also enforce strict & warnings to detect similar issues in the
future.

8 months agoForce path to ExtUtils::PL2Bat in make_ext.pl
Leon Timmermans [Thu, 25 Apr 2019 14:40:51 +0000 (16:40 +0200)]
Force path to ExtUtils::PL2Bat in make_ext.pl

8 months agoMake pl2bat use ExtUtils::PL2Bat
Leon Timmermans [Thu, 25 Apr 2019 12:50:50 +0000 (14:50 +0200)]
Make pl2bat use ExtUtils::PL2Bat

8 months agoEliminate -a option of pl2bat
Leon Timmermans [Thu, 25 Apr 2019 11:22:28 +0000 (13:22 +0200)]
Eliminate -a option of pl2bat

8 months agoImport ExtUtils::PL2Bat
Leon Timmermans [Thu, 25 Apr 2019 09:11:05 +0000 (11:11 +0200)]
Import ExtUtils::PL2Bat

8 months agointrpvar.h -reorder PERLVARS to close x86-64 alignment holes
Richard Leach [Sat, 14 Mar 2020 22:52:52 +0000 (22:52 +0000)]
intrpvar.h -reorder PERLVARS to close x86-64 alignment holes

8 months agouse absolute paths in ExtUtils::ParseXS tests on all platforms
Graham Knop [Sun, 14 Jun 2020 06:10:49 +0000 (08:10 +0200)]
use absolute paths in ExtUtils::ParseXS tests on all platforms

System perl on macOS also doesn't like linking libraries using relative
paths. The tests for ExtUtils::ParseXS already converted to absolute
paths on android, but it doesn't hurt to do that on all platforms.

Remove the platform conditional, and update the comment.

8 months agoavoid using C99/C11 functions that NetBSD doesn't define
Tony Cook [Mon, 15 Jun 2020 05:45:24 +0000 (05:45 +0000)]
avoid using C99/C11 functions that NetBSD doesn't define

Neither NetBSD 8.0 not 9.0 define several C99/C11 long double math
functions.

This is already a known issue upstream, see http://gnats.netbsd.org/53234

Fixes #17854

This will require some updates to hints/netbsd.sh once (if) NetBSD fix it
at their end.

8 months agoGNU/Hurd doesn't support SO_PROTOCOL
Samuel Thibault [Thu, 18 Jun 2020 11:47:36 +0000 (13:47 +0200)]
GNU/Hurd doesn't support SO_PROTOCOL

8 months agoRevert "Debugging GH #17671."
Karl Williamson [Thu, 23 Apr 2020 15:36:15 +0000 (09:36 -0600)]
Revert "Debugging GH #17671."

This reverts commit f12bbb761071acfd5663d673ad891ffbb2ffdbd9.

That commit temporarily turned off a test that was causing intermittent
failures in an experimental feature.  We agreed to leave it off for
5.32.  Since then, there have been some fixes, which possibly have fixed
it.  I'm now re-enabling that test in 5.33 so as to see if the bug crops
up again or not.

8 months agoRevert "there is no obvious reason not to set flags"
Karl Williamson [Fri, 20 Mar 2020 18:22:55 +0000 (12:22 -0600)]
Revert "there is no obvious reason not to set flags"

This reverts commit 0ddecb91901742e7df780394170d4bf818ee1da8
as part of https://github.com/Perl/perl5/issues/15855

8 months agoDefine a new SAVEt_HINT_HH type
Paul "LeoNerd" Evans [Mon, 20 Jul 2020 16:23:02 +0000 (17:23 +0100)]
Define a new SAVEt_HINT_HH type

Rather than possibly push an extra HV* to the save stack if the right
bit is set in the (saved) hints flags, better just to define a different
SAVEt type. Having done this, the stack layout is now constant per type
value.

This fixes

  https://github.com/Perl/perl5/issues/17895

8 months agolex_assign.t: Correct typo in test description
James E Keenan [Wed, 29 Jul 2020 17:35:41 +0000 (13:35 -0400)]
lex_assign.t:  Correct typo in test description

8 months agoDocument PERL_VERSION and kin as deprecated
Karl Williamson [Wed, 29 Jul 2020 03:20:53 +0000 (21:20 -0600)]
Document PERL_VERSION and kin as deprecated

Code should be removing these.  This documents them and gives the
preferred alternative to using them.

8 months agoImprove detection of Intel C/C++ compilers. (#18001)
Graham✈️✈️ [Wed, 29 Jul 2020 14:57:17 +0000 (08:57 -0600)]
Improve detection of Intel C/C++ compilers. (#18001)

* Improve detection of Intel C/C++ compilers.

My version of Intel C/C++ reports these versions:

✅ starscream% icc -V
Intel(R) C Intel(R) 64 Compiler for applications running on Intel(R) 64, Version 19.1.1.217 Build 20200306
Copyright (C) 1985-2020 Intel Corporation.  All rights reserved.
FOR NON-COMMERCIAL USE ONLY

✅ starscream% icpc -V
Intel(R) C++ Intel(R) 64 Compiler for applications running on Intel(R) 64, Version 19.1.1.217 Build 20200306
Copyright (C) 1985-2020 Intel Corporation.  All rights reserved.
FOR NON-COMMERCIAL USE ONLY

* simplified case for detecting Intel C++ compiler

* update authors for plicease

8 months agoautodoc.pl: Improve wording in perlapi/perlintern
Karl Williamson [Wed, 29 Jul 2020 03:13:11 +0000 (21:13 -0600)]
autodoc.pl: Improve wording in perlapi/perlintern

It was referring to function, when in reality it is a definition.

8 months agoFile-Path: sync in CPAN version 2.17
James E Keenan [Sun, 26 Jul 2020 01:52:46 +0000 (21:52 -0400)]
File-Path: sync in CPAN version 2.17

8 months agowin32.c: rework the waitpid(-1, WNOHANG) fix
Tomasz Konojacki [Wed, 18 Mar 2020 02:17:52 +0000 (03:17 +0100)]
win32.c: rework the waitpid(-1, WNOHANG) fix

Oops! While 08e55ec5e3ef6d6c040c0dc8bdec7d59f76bfbe8 made
waitpid(-1, WNOHANG) not segfault, it introduced another problem:
when retry == 1, MsgWaitForMultipleObjects() will sometimes be
called with a very large timeout due to unsigned integer overflow.

This is *exactly* the same problem that the comment above the loop
warns about.

8 months agoFix typo when using nBIT_UMAX
Nicolas R [Wed, 22 Jul 2020 23:46:03 +0000 (17:46 -0600)]
Fix typo when using nBIT_UMAX

nBIT_MAX was used instead of nBIT_UMAX
from d223e1ea9ae864c0e563187f1e76 changes

note: at first glance it seems that
nBIT_UMAX is an alias for nBIT_MASK

8 months agoFixes typo from d223e1ea9ae864c0e563187f1e76240ef1acad87
Ryan Voots [Wed, 22 Jul 2020 19:56:16 +0000 (15:56 -0400)]
Fixes typo from d223e1ea9ae864c0e563187f1e76240ef1acad87

This breaks in malloc.c when configured using the Perl malloc implementation i.e. -Dusemymalloc

End result is this when linking:

    /usr/bin/ld: malloc.o: in function `Perl_mfree':
    malloc.c:(.text+0x98): undefined reference to `nBITMASK'
    /usr/bin/ld: malloc.c:(.text+0xb9): undefined reference to `nBITMASK'
    /usr/bin/ld: malloc.c:(.text+0xd3): undefined reference to `nBITMASK'
    /usr/bin/ld: malloc.c:(.text+0x138): undefined reference to `nBITMASK'
    /usr/bin/ld: malloc.o: in function `Perl_malloced_size':
    malloc.c:(.text+0x1fc): undefined reference to `nBITMASK'
    /usr/bin/ld: malloc.o:malloc.c:(.text+0x328): more undefined references to `nBITMASK' follow

8 months agoadd 'isa' operator to perlexperiment
reneeb [Wed, 22 Jul 2020 14:08:50 +0000 (16:08 +0200)]
add 'isa' operator to perlexperiment

8 months agowarnings: fix missed `$c` in previous commit
Dagfinn Ilmari Mannsåker [Tue, 21 Jul 2020 17:03:50 +0000 (18:03 +0100)]
warnings: fix missed `$c` in previous commit

Thanks @Grinnz for spotting.

8 months agowarnings: fix POD typo "you" → "your"
Dagfinn Ilmari Mannsåker [Tue, 21 Jul 2020 16:50:59 +0000 (17:50 +0100)]
warnings: fix POD typo "you" → "your"

8 months agowarnings: rename `$a` and `$b` lexical variables in docs and code
Dagfinn Ilmari Mannsåker [Tue, 21 Jul 2020 16:34:15 +0000 (17:34 +0100)]
warnings: rename `$a` and `$b` lexical variables in docs and code

These variables are special for `sort` and should not be used as
lexicals even in examples.  Use `$x` and `$y` instead.  Also rename
`@a` and `$c` for consistency in examples and meaningfulness in code.

8 months ago[MERGE] Remove Symbian support and PERL_GLOBAL_STRUCT
Dagfinn Ilmari Mannsåker [Tue, 21 Jul 2020 10:41:06 +0000 (11:41 +0100)]
[MERGE] Remove Symbian support and PERL_GLOBAL_STRUCT

Symbian never made it beyond being a toy port, and the platform is long obsolete.

This also lets us get rid of the `PERL_GLOBAL_STRUCT` compilation
option and its associated `dVAR`, which people kept forgetting to add
to functions that needed it, as well as `USE_HEAP_INSTEAD_OF_STACK`,
`SETSOCKOPT_OPTION_VALUE_T`, `PERLIO_STD_SPECIAL`, and the interpreter
variables `PL_appctx` and `PL_timesbase`

8 months agoPerldelta entry for PERL_GLOBAL_STRUCT removal 17941/head
Dagfinn Ilmari Mannsåker [Sun, 19 Jul 2020 21:46:07 +0000 (22:46 +0100)]
Perldelta entry for PERL_GLOBAL_STRUCT removal

8 months agoPerldelta entry for Symbian removal
Dagfinn Ilmari Mannsåker [Sun, 19 Jul 2020 21:21:31 +0000 (22:21 +0100)]
Perldelta entry for Symbian removal

8 months agoRemove PL_appctx and PL_timesbase interpreter variables
Dagfinn Ilmari Mannsåker [Sat, 18 Jul 2020 12:26:35 +0000 (13:26 +0100)]
Remove PL_appctx and PL_timesbase interpreter variables

These were only ever needed by Symbian.

8 months agoRemove code guarded by PERLIO_STD_SPECIAL
Dagfinn Ilmari Mannsåker [Sat, 18 Jul 2020 12:23:58 +0000 (13:23 +0100)]
Remove code guarded by PERLIO_STD_SPECIAL

The symbol was only defined on Symbian, and calling macros only
defined there.

8 months agoRemove use of dVAR in core
Dagfinn Ilmari Mannsåker [Fri, 20 Mar 2020 22:37:06 +0000 (22:37 +0000)]
Remove use of dVAR in core

It only does anything under PERL_GLOBAL_STRUCT, which is gone.
Keep the dNOOP defintion for CPAN back-compat

8 months agoRemove PERL_GLOBAL_STRUCT
Dagfinn Ilmari Mannsåker [Fri, 20 Mar 2020 21:15:43 +0000 (21:15 +0000)]
Remove PERL_GLOBAL_STRUCT

This was originally added for MinGW, which no longer needs it, and
only still used by Symbian, which is now removed.

This also leaves perlapi.[ch] empty, but we keep the header for CPAN
backwards compatibility.

8 months agoRemove Symbian port
Dagfinn Ilmari Mannsåker [Wed, 4 Mar 2020 00:28:00 +0000 (00:28 +0000)]
Remove Symbian port

Also eliminate USE_HEAP_INSTEAD_OF_STACK and
SETSOCKOPT_OPTION_VALUE_T, since Symbian was the only user of those.

8 months agoperldebguts: fix documentation for ${"_<$filename"}
Dagfinn Ilmari Mannsåker [Mon, 20 Jul 2020 21:58:34 +0000 (22:58 +0100)]
perldebguts: fix documentation for ${"_<$filename"}

The `gv_fetchfile()` functions has set the scalar slot to `$filename`
since it was added in 5.0 alpha 2 (commit
79072805bf63abe5b5978b5928ab00d360ea3e7f), but the documentation,
added in 5.003_11 (commit 36477c247f3c188fb8cc7e276c87b739d3e6ab7c)
erroneously claims the value is `_<$filename`.

In passing add C<> around second mention of `filename`.

8 months agoRemove the final remnants of 5005threads support
Dagfinn Ilmari Mannsåker [Sun, 19 Jul 2020 17:01:36 +0000 (18:01 +0100)]
Remove the final remnants of 5005threads support

Only THREAD_RET_TYPE is still used.

8 months agoEnsure stack is in consistent state while restoring SAVEt_HINTS
Paul "LeoNerd" Evans [Sat, 27 Jun 2020 15:09:49 +0000 (16:09 +0100)]
Ensure stack is in consistent state while restoring SAVEt_HINTS

SAVEt_HINTS has a non-constant savestack structure. If the
HINT_LOCALIZE_HH flag was set it pushes an additional pointer. In some
complex code scenarios it is possible reënter Perl code while destroying
nested PL_hintgv hashes (for example, if any stored objects contain
`free` magic). Because of this, it is important that we pop the extra
value from the save stack before any other code can be invoked, so if
they need to inspect or alter the save stack, they can do so in a
consistent manner.

See also

  https://github.com/Perl/perl5/issues/17895

8 months agoUse static asserts when comparing sizeof() to a constant
Dagfinn Ilmari Mannsåker [Mon, 6 Jul 2020 15:24:33 +0000 (16:24 +0100)]
Use static asserts when comparing sizeof() to a constant

8 months agoRemove accidentally-reintroduced WinCE workaround
Dagfinn Ilmari Mannsåker [Sat, 18 Jul 2020 23:22:13 +0000 (00:22 +0100)]
Remove accidentally-reintroduced WinCE workaround

This was removed when Windows CE was support was removed in commit
79c32fc2889bdbdf21cb378e1628a84867a3ffcc but was accidentally
reintroduced in d2c9cb5392e8c58c3bb1935fc3c098737224567c.

8 months agoUse UINTMAX_C() in nBIT_MASK() definition
Dagfinn Ilmari Mannsåker [Mon, 20 Jul 2020 10:36:51 +0000 (11:36 +0100)]
Use UINTMAX_C() in nBIT_MASK() definition

We already have a macro for constants of the largest available type,
use that instead of HAS_LONG_LONG, which is (erroneously?) not defined
under MSVC.

8 months agot/TEST: Unset PERL_UNICODE
Karl Williamson [Mon, 6 Apr 2020 17:52:02 +0000 (11:52 -0600)]
t/TEST: Unset PERL_UNICODE

This commit adds this environment variable to the list of the ones that
are generally unset during the test suite execution.  Tests shouldn't
have to consider, for example, if PERL5OPT has something set like -w,
and the same for PERL_UNICODE, as its being set causes all filehandles
to have :utf8 set by default.

This should fix test suite smoke faiures we are getting in IO::Socket

8 months agoB/Deparse.pm: White-space only
Karl Williamson [Fri, 10 Apr 2020 14:43:14 +0000 (08:43 -0600)]
B/Deparse.pm: White-space only

8 months agoB/Deparse.t: Add tests for UTF-8 tr///
Karl Williamson [Thu, 9 Apr 2020 16:32:03 +0000 (10:32 -0600)]
B/Deparse.t: Add tests for UTF-8 tr///

This has not previously been tested

8 months agoB/Deparse.pm: Rework deparsing of UTF-8 tr///
Karl Williamson [Thu, 9 Apr 2020 20:06:41 +0000 (14:06 -0600)]
B/Deparse.pm: Rework deparsing of UTF-8 tr///

This fixes a bunch of issues with deparsing of tr/// when the operands
require the inversion map implementation instead of the table one.

8 months agoB/Deparse.pm: Simplify fcn
Karl Williamson [Wed, 8 Apr 2020 02:54:53 +0000 (20:54 -0600)]
B/Deparse.pm: Simplify fcn

This function can be made more perlish and half as many lines

8 months agoB/Deparse.pm: combine 2 fcns into one
Karl Williamson [Wed, 8 Apr 2020 02:49:56 +0000 (20:49 -0600)]
B/Deparse.pm: combine 2 fcns into one

A single line addition to one function allows it to absorb all the
functionality of another.  Doing this keeps the deparsing results in
sync.

8 months agoB::Deparse.pm: Extract code into a function
Karl Williamson [Mon, 6 Apr 2020 23:41:08 +0000 (17:41 -0600)]
B::Deparse.pm: Extract code into a function

This debugging code may be needed in multiple places

8 months agoB/Deparse.pm: Use mnemonics
Karl Williamson [Mon, 6 Apr 2020 23:43:14 +0000 (17:43 -0600)]
B/Deparse.pm: Use mnemonics

8 months agoregen/op_private: Add comment
Karl Williamson [Sun, 5 Apr 2020 17:33:56 +0000 (11:33 -0600)]
regen/op_private: Add comment

8 months agodoop.c: Remove unnecessary cautiousness
Karl Williamson [Wed, 1 Apr 2020 14:12:33 +0000 (08:12 -0600)]
doop.c: Remove unnecessary cautiousness

The code this commit removes was used to make sure there was enough
space allocated.  It actually isn't necessary to be so cautious.  The
computed value, rounded up, is sufficient.

8 months agot/re/re_tests: Fix misspelling in comment
Karl Williamson [Thu, 11 Jun 2020 02:16:20 +0000 (20:16 -0600)]
t/re/re_tests: Fix misspelling in comment

8 months agoregexec.c: Fix comment
Karl Williamson [Sat, 6 Jun 2020 14:25:20 +0000 (08:25 -0600)]
regexec.c: Fix comment

8 months agoutf8.h: Add some branch predictions
Karl Williamson [Fri, 29 May 2020 19:35:52 +0000 (13:35 -0600)]
utf8.h: Add some branch predictions

It is likely that the data will be well-formed Unicode, and not one of
its special characters, like surrogates or non-characters, nor NUL.

8 months agoregcomp.c: Add some comments
Karl Williamson [Fri, 29 May 2020 20:48:35 +0000 (14:48 -0600)]
regcomp.c: Add some comments

8 months agohandy.h: Add comments
Karl Williamson [Sun, 31 May 2020 01:52:51 +0000 (19:52 -0600)]
handy.h: Add comments

8 months agoembed.fnc: reentr not public, so remove from perlapi
Karl Williamson [Wed, 11 Mar 2020 21:07:12 +0000 (15:07 -0600)]
embed.fnc: reentr not public, so remove from perlapi

8 months agoINSTALL: Update comment
Karl Williamson [Tue, 30 Jun 2020 20:37:10 +0000 (14:37 -0600)]
INSTALL: Update comment

8 months agoop/pack.t: Skip ASCII-centric test on EBCDIC
Karl Williamson [Tue, 30 Jun 2020 19:59:53 +0000 (13:59 -0600)]
op/pack.t: Skip ASCII-centric test on EBCDIC

8 months agoext/XS-APItest/t/utf8_warn_base.pl: Fix a couple tests
Karl Williamson [Tue, 30 Jun 2020 19:58:50 +0000 (13:58 -0600)]
ext/XS-APItest/t/utf8_warn_base.pl: Fix a couple tests

These had invalid values, which didn't show up execpt on EBCDIC

8 months agoext/XS-APItest/t/utf8_warn_base.pl: Fix comment misstatement
Karl Williamson [Tue, 30 Jun 2020 19:55:51 +0000 (13:55 -0600)]
ext/XS-APItest/t/utf8_warn_base.pl: Fix comment misstatement

8 months agoext/XS-APItest/t/hv_macro.t: Generalize for EBCDIC
Karl Williamson [Tue, 30 Jun 2020 19:52:59 +0000 (13:52 -0600)]
ext/XS-APItest/t/hv_macro.t: Generalize for EBCDIC

The expected values are based on the ASCII bit patterns; the same
letters, such as 'a' have different values on EBCDIC, so would generate
different results.  Convert the EBCDIC 'a' (and everything else) to the
ASCII pattern, and the calculation should then result in the same
results.

8 months agohandy.h: Create nBIT_UMAX() macro
Karl Williamson [Fri, 29 May 2020 20:38:36 +0000 (14:38 -0600)]
handy.h: Create nBIT_UMAX() macro

This encapsulates a common paradigm