This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perl5.git
4 years agoUpdate p5p list archive links
Max Maischein [Sun, 13 Oct 2019 07:38:55 +0000 (09:38 +0200)]
Update p5p list archive links

xray.mpe.mpg.de does not serve archives anymore, archive.develooper.com redirects to www.nntp.perl.org

4 years agoSwitch from http://search.cpan.org/ as entry URL to https://metacpan.org/
Max Maischein [Wed, 9 Oct 2019 19:42:01 +0000 (21:42 +0200)]
Switch from search.cpan.org/ as entry URL to https://metacpan.org/

4 years agoAvoid gratuitous warning from -Wundef
Peter Eisentraut [Sat, 12 Oct 2019 19:32:13 +0000 (21:32 +0200)]
Avoid gratuitous warning from -Wundef

Use #ifdef instead of #if to avoid warning if a user of this header
file uses the gcc -Wundef option.

Committer: Peter Eisentraut is now a Perl author.

For: RT 134494

4 years agoDumpvalue: handle one more potential warning
James E Keenan [Sat, 12 Oct 2019 00:01:26 +0000 (20:01 -0400)]
Dumpvalue:  handle one more potential warning

While working on adding tests to this module, the following warning
sometimes appeared:

        Use of each() on hash after insertion without resetting hash
        iterator results in undefined behavior

Per perldiag, instead use 'keys' function to iterate over hash.

4 years agoUse warnings in Dumpvalue.pm; fix those found
James E Keenan [Wed, 9 Oct 2019 19:45:41 +0000 (15:45 -0400)]
Use warnings in Dumpvalue.pm; fix those found

Activating warnings showed many fixable warnings.  The suppression of
some of those warnings was obscuring other problems.

4 years agoFix libperl.t 'no symbols' warning on darwin
Nicolas R [Fri, 11 Oct 2019 21:38:53 +0000 (15:38 -0600)]
Fix libperl.t 'no symbols' warning on darwin

darwin can compile perlapi.o without any symbols.
libperl.t is running  'mm -m ./libperl.a' and is
is viewing the 'no symbols' stderr output from perlapi.o
then fail.

'nm -g perlapi.o'

We can either add a dummy symbol to libperl via
regen/embed.pl or simply ignore that error in a generic way,
or avoid compiling that file when not needed.

Notice the error with nm 11.0.0
Apple LLVM version 11.0.0 (clang-1100.0.33.8)

The older version of nm does not raise a warning for empty .o
files.

Steps to reproduce:
    echo '' > test.c; gcc -o test.o -c test.c; nm -g test.o

4 years agoFix p5-Text-Xslate on Perl 5.8.5
Nicolas R [Tue, 1 Oct 2019 15:01:30 +0000 (09:01 -0600)]
Fix p5-Text-Xslate on Perl 5.8.5

Fixes #140

This is a patch from @pali, to fix the
failure seen by @skaji on p5-Text-Xslate.

(cherry picked from commit 923705f8512cc1f17b01de6008d52f865f63b856)
Signed-off-by: Nicolas R <atoomic@cpan.org>
4 years agoAdd a comment to point to the value used for __MAX_PERL__
Nicolas R [Tue, 1 Oct 2019 14:58:27 +0000 (08:58 -0600)]
Add a comment to point to the value used for __MAX_PERL__

(cherry picked from commit 3ffaa936e47410a206f29ab391151a4c0a729c0d)
Signed-off-by: Nicolas R <atoomic@cpan.org>
4 years agoUpdate bugtracker and repository URLs
Nicolas R [Tue, 1 Oct 2019 14:46:01 +0000 (08:46 -0600)]
Update bugtracker and repository URLs

(cherry picked from commit 0d853a6437ac479adece3251b9873ddc8d33c14d)
Signed-off-by: Nicolas R <atoomic@cpan.org>
4 years agoAdjust Makefile.PL for devel versions
Nicolas R [Tue, 1 Oct 2019 14:44:15 +0000 (08:44 -0600)]
Adjust Makefile.PL for devel versions

(cherry picked from commit 494fc7f6c6b46dd46315bb4d5f8a11d8783e19c6)
Signed-off-by: Nicolas R <atoomic@cpan.org>
4 years agoparts/inc/misc: Fix EBCDIC build problem
Karl Williamson [Sun, 29 Sep 2019 18:00:59 +0000 (12:00 -0600)]
parts/inc/misc: Fix EBCDIC build problem

An extra paren got in there.

(cherry picked from commit 6e7177508616091a7424141d698ed1be7c6b123e)
Signed-off-by: Nicolas R <atoomic@cpan.org>
4 years agoutf8_to_uvchr_buf: Fix error checking on early EBCDICs
Karl Williamson [Fri, 27 Sep 2019 17:02:43 +0000 (11:02 -0600)]
utf8_to_uvchr_buf: Fix error checking on early EBCDICs

This code assumed ASCII platforms.  It only gets executed in the face of
malformed UTF-8.

(cherry picked from commit b54c9ed809465200054ed546da72925d185992ca)
Signed-off-by: Nicolas R <atoomic@cpan.org>
4 years agoUpdate Changes for 3.54 release
Nicolas R [Sat, 28 Sep 2019 00:33:43 +0000 (18:33 -0600)]
Update Changes for 3.54 release

(cherry picked from commit 14cac67ed47533fa116c6e1c26a839a8ca0a5edc)
Signed-off-by: Nicolas R <atoomic@cpan.org>
4 years agoChangelog for for 3.53
Nicolas R [Sat, 28 Sep 2019 00:23:44 +0000 (18:23 -0600)]
Changelog for for 3.53

(cherry picked from commit 9e59620bb324c50de0c8c379b126f1fc23172d06)
Signed-off-by: Nicolas R <atoomic@cpan.org>
4 years agoPerldelta entry for the updated links
Max Maischein [Fri, 11 Oct 2019 11:56:01 +0000 (13:56 +0200)]
Perldelta entry for the updated links

4 years agoChange bug URL from http://rt.perl.org to https://rt.perl.org
Max Maischein [Fri, 11 Oct 2019 09:10:28 +0000 (11:10 +0200)]
Change bug URL from rt.perl.org to https://rt.perl.org

This updates the bug tracker URL from http://rt.perl.org
to https://rt.perl.org.

There is a place in the code, in corelist.pl, that is sensitive
to the URL of the bug tracker. This now understands both
versions of the bug tracker URL. Ideally, this will be
consolidated once the dust settles.

This patch also updates ExtUtils::CBuilder, Safe, threads
and threads::shared to point to the new bug tracker URL.

4 years agoMore documentation links http -> https
Max Maischein [Fri, 11 Oct 2019 11:15:12 +0000 (13:15 +0200)]
More documentation links http -> https

O'Reilly conferences and yapc.org have https

4 years agoMove Unicode.org URLs to https:// in source code
Max Maischein [Fri, 11 Oct 2019 08:39:07 +0000 (10:39 +0200)]
Move Unicode.org URLs to https:// in source code

This URL is outdated, but the link forwards to the correct
section in a PDF.

4 years agoMove http:// URLs to https:// URLs in source code
Max Maischein [Fri, 11 Oct 2019 10:08:06 +0000 (12:08 +0200)]
Move http:// URLs to https:// URLs in source code

This commit moves more URLs from http to https. This time it
affects some source code, that's why it is not bunched up
with the commits affecting pod/*

4 years agoMention 7-zip as alternative to WinZip
Max Maischein [Wed, 9 Oct 2019 20:04:08 +0000 (22:04 +0200)]
Mention 7-zip as alternative to WinZip

4 years agoMailling list archaeology, restoring old content
Max Maischein [Fri, 11 Oct 2019 10:46:26 +0000 (12:46 +0200)]
Mailling list archaeology, restoring old content

http://xray.mpe.mpg.de does not serve the mailing list archives anymore
and is not available via the Wayback machine either.

This patch restores the content of a link to an URL "we" hopefully control
better. The message ID correlates to a message mentioned in the git blame
patch that introduced the URL.

4 years agoMailling list archaeology, restoring old content
Max Maischein [Fri, 11 Oct 2019 10:34:36 +0000 (12:34 +0200)]
Mailling list archaeology, restoring old content

http://xray.mpe.mpg.de does not serve the mailing list archives anymore
and is not available via the Wayback machine either.

This patch restores the content of a link to an URL "we" hopefully control
better. The message ID correlates to a patch that git blame
identified as being replaced by the current state in the time range.

4 years agoMailling list archaeology, restoring old content
Max Maischein [Fri, 11 Oct 2019 09:57:32 +0000 (11:57 +0200)]
Mailling list archaeology, restoring old content

http://xray.mpe.mpg.de does not serve the mailing list archives anymore
and is not available via the Wayback machine either.

This patch restores the content of a link to an URL "we" hopefully control
better. The message ID is likely 20040713143217.GB1424@plum.flirble.org ,
to help future searches.

4 years agoPerl5 git is on https
Max Maischein [Fri, 11 Oct 2019 08:39:15 +0000 (10:39 +0200)]
Perl5 git is on https

4 years agoUpdate URLs in META.* to https://
Max Maischein [Fri, 11 Oct 2019 08:50:18 +0000 (10:50 +0200)]
Update URLs in META.* to https://

4 years agoRemove stray "either" now that there's only one site to get EMX from
Dagfinn Ilmari Mannsåker [Fri, 11 Oct 2019 09:41:01 +0000 (10:41 +0100)]
Remove stray "either" now that there's only one site to get EMX from

4 years agoRetrieve AnnoCPAN links from archive.org / Wayback machine
Max Maischein [Fri, 11 Oct 2019 07:45:00 +0000 (09:45 +0200)]
Retrieve AnnoCPAN links from archive.org / Wayback machine

4 years agoChange Microsoft URLs to their current location
Max Maischein [Fri, 11 Oct 2019 07:32:27 +0000 (09:32 +0200)]
Change Microsoft URLs to their current location

4 years agoUpdate the installation URL for Cygwin
Max Maischein [Wed, 9 Oct 2019 20:33:34 +0000 (22:33 +0200)]
Update the installation URL for Cygwin

4 years agoFix link to Apple 64-bit Transition Guide
Max Maischein [Wed, 9 Oct 2019 20:26:34 +0000 (22:26 +0200)]
Fix link to Apple 64-bit Transition Guide

4 years agoFix Address-Sanitizer wiki link
Max Maischein [Wed, 9 Oct 2019 20:26:06 +0000 (22:26 +0200)]
Fix Address-Sanitizer wiki link

4 years agoFix link to OS/2 EMX site
Max Maischein [Wed, 9 Oct 2019 20:04:26 +0000 (22:04 +0200)]
Fix link to OS/2 EMX site

4 years agoFix link to CPAN.pm
Max Maischein [Wed, 9 Oct 2019 20:03:49 +0000 (22:03 +0200)]
Fix link to CPAN.pm

4 years agoFix broken ExtUtils::Embed URL
Max Maischein [Wed, 9 Oct 2019 19:41:37 +0000 (21:41 +0200)]
Fix broken ExtUtils::Embed URL

This only fixes the link. Maybe the whole paragraph
should be removed, as 5.004 is now almost 20 years
in the past and ExtUtils::Embed has been in core
for all that time. This is out of scope for this
series of commits.

4 years agoUnicode.org is https, except for http://cldr.unicode.org
Max Maischein [Fri, 11 Oct 2019 07:45:09 +0000 (09:45 +0200)]
Unicode.org is https, except for cldr.unicode.org

4 years agoFix maximum line length
Max Maischein [Fri, 11 Oct 2019 08:14:14 +0000 (10:14 +0200)]
Fix maximum line length

4 years agoMove more URLs from http:// to https://
Max Maischein [Wed, 9 Oct 2019 19:41:08 +0000 (21:41 +0200)]
Move more URLs from http:// to https://

4 years agoDon't test for 16-bit inputs in inRANGE()
Karl Williamson [Fri, 11 Oct 2019 00:32:53 +0000 (18:32 -0600)]
Don't test for 16-bit inputs in inRANGE()

This macro has been expanding to overflow some assertion strings on
Windows and HP.  This commit omits handling one unlikely scenario,
namely that the input is a short, 16-bits.  And that is enough to get it
to compile on Windows.  HP isn't smoked on branches, so I don't know if
this will fix it.

More discussion may be needed, but this is all I have time for at the
moment.

4 years agoregexec.c: Fix Win32 compilation
Tony Cook [Wed, 9 Oct 2019 17:12:09 +0000 (11:12 -0600)]
regexec.c: Fix Win32 compilation

The macro being called here had a parameter that was a function call and
was used multiple times in the macro, exceeding some limits on Win32,
and potentially being actually called multiple times.

4 years agoHandle undefined values correctly
James E Keenan [Fri, 20 Sep 2019 03:02:54 +0000 (23:02 -0400)]
Handle undefined values correctly

As reported by Henrik Pauli in RT 134441, the documentation's claim that

        $dv->dumpValue([$x, $y]);

and

        $dv->dumpValues($x, $y);

was not being sustained in the case where one of the elements in the
array (or array ref) was undefined.  This was due to an insufficiently
precise specification within the dumpValues() method for determining
when the value "undef\n" should be printed.

Tests for previously untested cases have been provided in
t/rt-134441-dumpvalue.t.  They were not appended to t/Dumpvalue.t (as
would normally have been the case) because the tests in that file have
accreted over the years in a sub-optimal manner:  changes in attributes
of the Dumpvalue object are tested but those changes are not zeroed-out
(by, e.g., use of 'local $self->{attribute} = undef')
before additional attributes are modified and tested.  As a consequence,
it's difficult to determine the state of the Dumpvalue object at any
particular point and interactions between attributes cannot be ruled
out.

Package TieOut, used to capture STDOUT during testing, has been
extracted to its own file so that it can be used by all test files.

4 years agoMove Perl community web links to https:// where applicable
Max Maischein [Wed, 9 Oct 2019 16:30:50 +0000 (18:30 +0200)]
Move Perl community web links to https:// where applicable

4 years agot/op/tr_latin1.t: Skip ASCII-centric tests on EBCDIC
Karl Williamson [Thu, 3 Oct 2019 02:54:57 +0000 (20:54 -0600)]
t/op/tr_latin1.t: Skip ASCII-centric tests on EBCDIC

4 years agodist/Data-Dumper/t/dumper.t: Skip ASCII-centric tests on EBCDIC
Karl Williamson [Thu, 3 Oct 2019 02:54:12 +0000 (20:54 -0600)]
dist/Data-Dumper/t/dumper.t: Skip ASCII-centric tests on EBCDIC

4 years agolib/ExtUtils/t/Embed.t: Skip on EBCDIC
Karl Williamson [Thu, 3 Oct 2019 03:17:23 +0000 (21:17 -0600)]
lib/ExtUtils/t/Embed.t: Skip on EBCDIC

This is not currently implemented for EBCDIC

4 years agodist/Storable/t/regexp.t: Mark some tests as ASCII-only
Karl Williamson [Thu, 3 Oct 2019 03:12:24 +0000 (21:12 -0600)]
dist/Storable/t/regexp.t: Mark some tests as ASCII-only

These tests are ASCII centric

4 years agot/op/qr.t: Don't use fancy apostrophe
Karl Williamson [Thu, 3 Oct 2019 03:08:46 +0000 (21:08 -0600)]
t/op/qr.t: Don't use fancy apostrophe

when the ASCII one will do.

4 years agot/op/threads-dirh.t: Add ability to skip on memory constrained
Karl Williamson [Thu, 3 Oct 2019 03:07:50 +0000 (21:07 -0600)]
t/op/threads-dirh.t: Add ability to skip on memory constrained

This ran out of memory on a very limited smoker; add a check for
environment variable PERL_SKIP_BIG_MEM_TESTS being non-zero to skip
it.

4 years agot/re/bigfuzzy_not_utf8.t: Add ability to skip on memory constrained
Karl Williamson [Thu, 3 Oct 2019 03:06:50 +0000 (21:06 -0600)]
t/re/bigfuzzy_not_utf8.t: Add ability to skip on memory constrained

This test blew the memory on a very limited smoker; add a check
for environment variable PERL_SKIP_BIG_MEM_TESTS being non-zero to skip
these.

4 years agot/re/pat.t: Add ability to skip on memory constrained
Karl Williamson [Thu, 3 Oct 2019 03:05:02 +0000 (21:05 -0600)]
t/re/pat.t: Add ability to skip on memory constrained

A few tests were blowin the memory on a very limited smoker; add a check
for environment variable PERL_SKIP_BIG_MEM_TESTS being non-zero to skip
these.

4 years agot/re/re_tests: Skip ASCII-centric test for EBCDIC
Karl Williamson [Thu, 3 Oct 2019 03:03:54 +0000 (21:03 -0600)]
t/re/re_tests: Skip ASCII-centric test for EBCDIC

Add a similar one for EBCDIC

4 years agol1_char_class_tab.h: Remove some special EBCDIC cases
Karl Williamson [Thu, 3 Oct 2019 02:43:49 +0000 (20:43 -0600)]
l1_char_class_tab.h: Remove some special EBCDIC cases

These are no longer needed.

4 years agoutfebcdic.h: Move some #defines
Karl Williamson [Thu, 3 Oct 2019 02:42:19 +0000 (20:42 -0600)]
utfebcdic.h: Move some #defines

4 years agoAdd UTF8_CHK_SKIP() macro
Karl Williamson [Wed, 9 Oct 2019 16:02:31 +0000 (10:02 -0600)]
Add UTF8_CHK_SKIP() macro

This is a safer version of UTF8SKIP for use when the input could be
possibly malformed.  It uses strnlen() to not read past a NUL in the
input.  Since Perl adds NULs to the end of SV's, this will likely
prevent reading beyond the end of a buffer.

A still safer version could be written that doesn't look for just a NUL,
but any unexpected byte, and stops just before that.  I suspect that is
overkill, and since strnlen() can be very fast, I went with this
approach instead.  Nothing precludes adding another version that does
this full checking

4 years agoDocument UTF8_SKIP()
Karl Williamson [Wed, 9 Oct 2019 16:01:32 +0000 (10:01 -0600)]
Document UTF8_SKIP()

4 years agoFix pod entry for toLOWER_utf8
Karl Williamson [Wed, 9 Oct 2019 15:39:27 +0000 (09:39 -0600)]
Fix pod entry for toLOWER_utf8

It was missing a parameter

4 years agoperldelta for merge commit b8c77730539d8
Tony Cook [Tue, 8 Oct 2019 05:10:59 +0000 (16:10 +1100)]
perldelta for merge commit b8c77730539d8

4 years agoDisable use of U32_ALIGNMENT_REQUIRED
Tony Cook [Tue, 8 Oct 2019 04:55:36 +0000 (15:55 +1100)]
Disable use of U32_ALIGNMENT_REQUIRED

Always assume unaligned access is unsafe.

We now always define U32_ALIGNMENT_REQUIRED so that darkpan code
that depended on it will use the safer path.

4 years agoDigest::MD5 is customized origin/tonyc/133495-digest-md5
Tony Cook [Tue, 8 Oct 2019 00:18:43 +0000 (11:18 +1100)]
Digest::MD5 is customized

4 years agoMatt Turner is now a perl author
Tony Cook [Tue, 8 Oct 2019 00:10:04 +0000 (11:10 +1100)]
Matt Turner is now a perl author

4 years ago(perl #133495) remove probing for d_u32align
Tony Cook [Mon, 7 Oct 2019 23:41:46 +0000 (10:41 +1100)]
(perl #133495) remove probing for d_u32align

Compiler optimisation meant the could return the wrong result in some
cases.

This wasn't a problem on x86, but on platforms where alignment is
required it caused problems.

Strangely enough d_u32align is "define" in the win32 config files,
on any x64 system (the probe only checked on 32-bit systems), on
ARM and on the one i386 build I checked.

This should have little to no effect on performance, for example,
building:

typedef unsigned long U64;

U64 b64little(unsigned char *p) {
    return *p | ((U64)p[1] << 8) | ((U64)p[2] << 16) | ((U64)p[3] << 24)
         | ((U64)p[4] << 32) | ((U64)p[5] << 40) | ((U64)p[6] << 48) | ((U64)p[7] << 56);
}

U64 b64big(unsigned char *p) {
    return ((U64)*p << 56) | ((U64)p[1] << 48) | ((U64)p[2] << 40) | ((U64)p[3] << 32)
         | ((U64)p[4] << 24) | ((U64)p[5] << 16) | ((U64)p[6] << 8) | ((U64)p[7]);
}

unsigned b32little(unsigned char *p) {
    return *p | ((unsigned)p[1] << 8) | ((unsigned)p[2] << 16) | ((unsigned)p[3] << 24);
}

unsigned b32big(unsigned char *p) {
    return ((unsigned)p[0] << 24) | ((unsigned)p[1] << 16) | ((unsigned)p[2] << 8) | p[3];
}

with:

gcc -O2 -S test.c

produces:

.file "test.c"
.text
.p2align 4,,15
.globl b64little
.type b64little, @function
b64little:
.LFB0:
.cfi_startproc
movq (%rdi), %rax
ret
.cfi_endproc
.LFE0:
.size b64little, .-b64little
.p2align 4,,15
.globl b64big
.type b64big, @function
b64big:
.LFB1:
.cfi_startproc
movq (%rdi), %rax
bswap %rax
ret
.cfi_endproc
.LFE1:
.size b64big, .-b64big
.p2align 4,,15
.globl b32little
.type b32little, @function
b32little:
.LFB2:
.cfi_startproc
movl (%rdi), %eax
ret
.cfi_endproc
.LFE2:
.size b32little, .-b32little
.p2align 4,,15
.globl b32big
.type b32big, @function
b32big:
.LFB3:
.cfi_startproc
movl (%rdi), %eax
bswap %eax
ret
.cfi_endproc
.LFE3:
.size b32big, .-b32big
.ident "GCC: (Debian 6.3.0-18+deb9u1) 6.3.0 20170516"
.section .note.GNU-stack,"",@progbits

so the compiler is smart enough to recognize the unaligned access code
and optimize it on platforms that support it.

MSVC doesn't seem to optimize this, but since Win32 has been built
with d_u32align=define since 2005, this change will make no
difference.

4 years agoClean up U8TO*_LE macro implementations
Matt Turner [Thu, 5 Sep 2019 04:48:56 +0000 (21:48 -0700)]
Clean up U8TO*_LE macro implementations

The code guarded by #ifndef U32_ALIGNMENT_REQUIRED attempts to optimize
byte-swapping by doing unaligned loads, but accessing data through
unaligned pointers is undefined behavior in C. Moreover, compilers are
more than capable of recognizing these open-coded byte-swap patterns and
emitting a bswap instruction, or an unaligned load instruction, or a
combined load, etc. There's no need for multiple paths to attain the
desired result.

See https://rt.perl.org/Ticket/Display.html?id=133495

4 years agoDigest-MD5: Consolidate byte-swapping paths
Matt Turner [Thu, 5 Sep 2019 04:04:47 +0000 (21:04 -0700)]
Digest-MD5: Consolidate byte-swapping paths

The code guarded by #ifndef U32_ALIGNMENT_REQUIRED attempts to optimize
byte-swapping by doing unaligned loads, but accessing data through
unaligned pointers is undefined behavior in C. Moreover, compilers are
more than capable of recognizing these open-coded byte-swap patterns and
emitting a bswap instruction, or an unaligned load instruction, or a
combined load, etc. There's no need for multiple paths to attain the
desired result.

See https://rt.perl.org/Ticket/Display.html?id=133495

4 years agoMerge branch 'Remove EBCDCIC special handling' into blead
Karl Williamson [Sun, 6 Oct 2019 17:08:40 +0000 (11:08 -0600)]
Merge branch 'Remove EBCDCIC special handling' into blead

It turns out that only a single number is needed to distinguish between
basic UTF-8 and UTF-EBCDIC.  And that is the number of bits of
real information are in each continuation byte.  In UTF-8 it is 6 (2
bits reserved for syntax); In UTF-EBCDIC it is 5.

Everything else stems from reasonable decisions based on this
fundamental difference.  So all the other constants can be common
between the two systems, using compile-time shifts and masks.

For Perl's extended UTF-8-like encoding, another constant is needed,
which is the number of continuation bytes appended when the start byte
is 8 bits.  For both systems, that number is the minimum required to be
able to encode a 64-bit integer. (There are other ways to extend the
encoding, including some that are infinitely so.  But Perl chose to just
append a fixed number of bytes, so it isn't extensible.  But it has the
advantage of needing to rely only on the first byte to know how many
more are coming.)

This commit consolidates various constants that differed between the
two systems, but were unnecessarily so.  There are other constants that
remain that differ between the two files; these are for convenience .

4 years agoMake defn of UTF_IS_CONTINUED common
Karl Williamson [Sun, 6 Oct 2019 16:50:49 +0000 (10:50 -0600)]
Make defn of UTF_IS_CONTINUED common

This can be derived from other values, removing an EBCDIC dependency

4 years agoMake defn of UVCHR_IS_INVARIANT common
Karl Williamson [Thu, 3 Oct 2019 02:37:17 +0000 (20:37 -0600)]
Make defn of UVCHR_IS_INVARIANT common

This can be derived from other values, removing an EBCDIC dependency

4 years agoMake defn of OFFUNI_IS_INVARIANT common
Karl Williamson [Thu, 3 Oct 2019 00:08:32 +0000 (18:08 -0600)]
Make defn of OFFUNI_IS_INVARIANT common

This can be derived from other values, removing an EBCDIC dependency

4 years agoMake defn of UTF8_IS_DOWNGRADEABLE_START common
Karl Williamson [Thu, 3 Oct 2019 00:03:26 +0000 (18:03 -0600)]
Make defn of UTF8_IS_DOWNGRADEABLE_START common

This can be derived from other values, removing an EBCDIC dependency

4 years agoMake defn of UTF_IS_ABOVE_LATIN1 common
Karl Williamson [Wed, 2 Oct 2019 23:56:01 +0000 (17:56 -0600)]
Make defn of UTF_IS_ABOVE_LATIN1 common

This can be derived from other values, removing an EBCDIC dependency

4 years agoMake defn of UTF8_IS_START common
Karl Williamson [Sun, 6 Oct 2019 16:50:12 +0000 (10:50 -0600)]
Make defn of UTF8_IS_START common

This can be derived from other values, removing an EBCDIC dependency

4 years agoMake defn of UTF8_IS_CONTINUATION common
Karl Williamson [Wed, 2 Oct 2019 23:13:31 +0000 (17:13 -0600)]
Make defn of UTF8_IS_CONTINUATION common

This can be derived from other values, removing an EBCDIC dependency

4 years agoMake defn of UTF_CONTINUATION_MARK common
Karl Williamson [Wed, 2 Oct 2019 23:07:50 +0000 (17:07 -0600)]
Make defn of UTF_CONTINUATION_MARK common

This can be derived from other values, removing an EBCDIC dependency

4 years agoMake defn of UTF_IS_CONTINUATION_MASK common
Karl Williamson [Wed, 2 Oct 2019 22:48:38 +0000 (16:48 -0600)]
Make defn of UTF_IS_CONTINUATION_MASK common

This variable can be defined from the same base in both UTF-8 and
UTF-EBCDIC, and doing so eliminates an EBCDIC dependency.

4 years agoutf8.h: Add comment
Karl Williamson [Wed, 2 Oct 2019 22:43:50 +0000 (16:43 -0600)]
utf8.h: Add comment

4 years agoutf8.h: Remove redundant cast
Karl Williamson [Wed, 2 Oct 2019 22:40:44 +0000 (16:40 -0600)]
utf8.h: Remove redundant cast

The called macro does the cast already

4 years agoutf8.h: Make sure macros not called with a ptr
Karl Williamson [Wed, 2 Oct 2019 22:37:17 +0000 (16:37 -0600)]
utf8.h: Make sure macros not called with a ptr

By doing an '| 0' with a parameter in a macro expansion, a C syntax
error will be generated.  This is free protection.

4 years agot/TEST: Test most of CPAN on EBCDIC
Karl Williamson [Wed, 2 Oct 2019 22:23:39 +0000 (16:23 -0600)]
t/TEST: Test most of CPAN on EBCDIC

CPAN was mostly skipped before because so many distros raised errors,
but that is no longer true, so just skip about 10 that have big
problems, and test the rest

4 years agoSmall typo in README.os390 from 2001-01-08 09:53
H.Merijn Brand [Fri, 4 Oct 2019 06:58:59 +0000 (08:58 +0200)]
Small typo in README.os390 from 2001-01-08 09:53

0e06870bf080a38cda51c06c6612359afc2334e1

4 years agoRecent os390 experiences reflected in docs and hints
H.Merijn Brand [Thu, 3 Oct 2019 12:52:24 +0000 (14:52 +0200)]
Recent os390 experiences reflected in docs and hints

4 years agofix some signed/unsigned warnings
David Mitchell [Thu, 3 Oct 2019 13:13:14 +0000 (14:13 +0100)]
fix some signed/unsigned warnings

Note that utf8_distance returns IV, while STR_LEN is an unsigned value
of varying sizes.

4 years agoregen charclass_invlists.h
David Mitchell [Thu, 3 Oct 2019 12:24:39 +0000 (13:24 +0100)]
regen charclass_invlists.h

this was missed from the previous commit

Also, fix typo in regen/regcharclass.pl It was still referring to itself
as Porting/regcharclass.pl

4 years agoUse balanced delimiters for multi-line s///gxe
Dagfinn Ilmari Mannsåker [Thu, 3 Oct 2019 10:29:30 +0000 (11:29 +0100)]
Use balanced delimiters for multi-line s///gxe

4 years agolib/charnames.t: Fix Named Sequence test for EBCDIC
Karl Williamson [Wed, 2 Oct 2019 22:19:49 +0000 (16:19 -0600)]
lib/charnames.t: Fix Named Sequence test for EBCDIC

The file from Unicode needs to be translated to native

4 years agomktables: Fix Named Sequences for EBCDIC
Karl Williamson [Wed, 2 Oct 2019 22:13:31 +0000 (16:13 -0600)]
mktables: Fix Named Sequences for EBCDIC

This table wasn't being translated into native code points

4 years agoperldelta for 30fc7a2809e5
Tony Cook [Wed, 2 Oct 2019 05:42:00 +0000 (15:42 +1000)]
perldelta for 30fc7a2809e5

4 years agoEliminate modifiable variables in constants
James E Keenan [Sun, 26 May 2019 01:40:00 +0000 (21:40 -0400)]
Eliminate modifiable variables in constants

Transform previously deprecated cases into exceptions.

Update diagnostic; change D to F

remove now irrelevant code (TonyC)

For: RT 134138

4 years agoDocument the various stacks in perlguts.pod
Paul "LeoNerd" Evans [Wed, 18 Sep 2019 15:18:10 +0000 (16:18 +0100)]
Document the various stacks in perlguts.pod

4 years agomathoms: Restore fcns accidentally deleted
Karl Williamson [Mon, 30 Sep 2019 23:47:21 +0000 (17:47 -0600)]
mathoms: Restore fcns accidentally deleted

Commit x059703b088f44d5665f67fba0b9d80cad89085fd removed more code than
was intended.  This commit restores the missing functions.

This showed up in MSWin32 builds, I presume VMS as well.

Spotted by Tony Cook

4 years agoregcomp.c: Fix MSWin32 compilation error
Karl Williamson [Tue, 1 Oct 2019 03:50:09 +0000 (21:50 -0600)]
regcomp.c: Fix MSWin32 compilation error

On DEBUGGING builds, the asserts in the expansion of this macro build up
too large of literal strings for the Win32 compiler.  Solve this by
storing to an intermediary.

4 years agoRemove deprecated character classification/case changing macros
Karl Williamson [Sun, 29 Sep 2019 21:16:24 +0000 (15:16 -0600)]
Remove deprecated character classification/case changing macros

It has been deprecated since 5.26 to use various macros that deal with
UTF-8 inputs but don't have a parameter indicating the maximum length
beyond which we should not look.  This commit changes all such macros,
as threatened in existing documentation and warning messages, to have an
extra parameter giving the length.

This was originally scheduled to happen in 5.30, but was delayed because
it broke some CPAN modules, and there wasn't really a good way around
it.  But now that Devel::PPPort 3.54 is out, ppport.h has new facilities
for getting modules making these changes to work with older Perl
releases.

4 years agoAPItest: Remove use of macros about to be removed
Karl Williamson [Sun, 20 May 2018 19:11:02 +0000 (13:11 -0600)]
APItest: Remove use of macros about to be removed

The next commit removes some macros that this uses.  They have been
deprecated, and the uses here were to test those deprecations.

4 years agoperl.h: Silence warning when compiled with C++
Karl Williamson [Sat, 28 Sep 2019 20:01:41 +0000 (14:01 -0600)]
perl.h: Silence warning when compiled with C++

This silences a warning that the pragma it surrounds is not valid on
C++.  We don't need to know that, and it clutters the compilation
output.

4 years agoregex: Add LEXACT_ONLY8 node type
Karl Williamson [Sat, 28 Sep 2019 17:58:59 +0000 (11:58 -0600)]
regex: Add LEXACT_ONLY8 node type

This is like LEXACT, but it is known that only strings encoded in UTF-8
will match it, so don't even have to try if that condition isn't met.

4 years agoregex: Create and handle LEXACT nodes
Karl Williamson [Fri, 27 Sep 2019 03:38:46 +0000 (21:38 -0600)]
regex: Create and handle LEXACT nodes

See the previous commit for info on these.

I am not changing trie code to recognize these at this time.

4 years agoAdd regnode LEXACT, for long strings
Karl Williamson [Wed, 25 Sep 2019 16:12:32 +0000 (10:12 -0600)]
Add regnode LEXACT, for long strings

This commit adds a new regnode for strings that don't fit in a regular
one, and adds a structure for that regnode to use.  Actually using them
is deferred to the next commit.

This new regnode structure is needed because the previous structure only
allows for an 8 bit length field, 255 max bytes.  This commit puts the
length instead in a new field, the same place single-argument regnodes
put their argument.  Hence this long string is an extra 32 bits of
overhead, but at no string length is this node ever bigger than the
combination of the smaller nodes it replaces.

I also considered simply combining the original 8 bit length field
(which is now unused) with the first byte of the string field to get a
16 bit length, and have the actual string be offset by 1.  But I
rejected that because it would mean the string would usually not be
aligned, slowing down memory accesses.

This new LEXACT regnode can hold up to what 1024 regular EXACT ones hold,
using 4K fewer overhead bytes to do so.  That means it can handle
strings containing 262000 bytes.  The comments give ideas for expanding
that should it become necessary or desirable.

Besides the space advantage, any hardware acceleration in memcmp
can be done in much bigger chunks, and otherwise the memcmp inner loop
(often written in assembly) will run many more times in a row, and our
outer loop that calls it, correspondingly fewer.

4 years agoregcomp.c: Change handling of filled EXACT nodes
Karl Williamson [Sun, 22 Sep 2019 22:12:07 +0000 (16:12 -0600)]
regcomp.c: Change handling of filled EXACT nodes

This changes the detection mechanism to check just before writing to see
if if would be out of bounds, and if so, instead break out of the loop,
and go close out the node.  Prior to this commit space for a worst-case
scenario was reserved, and we didn't start a new character if we were in
that danger zone.  This left nodes left fully packed than they could
have been.

Thus this improves the packing of nodes, especially under /i, from the
previous mechanism.  But more importantly, it set things up so that we
can potentially increase the node size as we go along.

This also changes the handling of avoiding splitting a multi-character
fold across nodes under /i.  For example, take the sequence 'ffi',  We
wouldn't want to end a node with 'ff', when the first character in the
next node is an 'i', as U+FB03 folds to that sequence, and the code that
does pattern matching can't currently match across node boundaries.
Previously we backed off filling the node until the final character
wasn't one that could potentially cause such a break.  That is we didn't
look at the next character and see if it was an 'i' (or some other
potential multi-char fold.)  Now we do look at that next
character(s), and only back off if this actually would split a real
multi-char fold.

4 years agoregcomp.h: Add comments
Karl Williamson [Sun, 22 Sep 2019 21:26:03 +0000 (15:26 -0600)]
regcomp.h: Add comments

4 years agoregcomp.h: Remove obsolete macro
Karl Williamson [Sun, 22 Sep 2019 21:25:23 +0000 (15:25 -0600)]
regcomp.h: Remove obsolete macro

This is no longer used

4 years agoregcomp.c: Rename three variables
Karl Williamson [Sat, 21 Sep 2019 20:34:20 +0000 (14:34 -0600)]
regcomp.c: Rename three variables

One of the variables is misnamed,  the upper_fill indicates that the
node has to be left not completely filled.  Comments will be added in a
later commit.

The other two are renamed in preparation for future changes to more
accurately describe their new purposes.

4 years agoregcomp.c: White-space only, comments
Karl Williamson [Sat, 21 Sep 2019 19:31:37 +0000 (13:31 -0600)]
regcomp.c: White-space only, comments

Outdent a block that was doubly indented.  Change some other white space
and fix grammar in a comment

4 years agoregcomp: Use new set macro to store a value
Karl Williamson [Sat, 21 Sep 2019 19:24:33 +0000 (13:24 -0600)]
regcomp: Use new set macro to store a value

This is in preparation for the current mechanism in a later commit to
become a not legal lhs