This is a live mirror of the Perl 5 development currently hosted at
2 months agoRevert "av_create_and_push/unshift_one: faster create via newAV_alloc_xz"
Karl Williamson [Sat, 31 Jul 2021 23:32:51 +0000 (17:32 -0600)]
Revert "av_create_and_push/unshift_one: faster create via newAV_alloc_xz"

This reverts commit 71ca71bc8b733c80f8f8099bb4673ee629da1353.

It does not compile with C++:

g++ -c -DPERL_CORE -D_REENTRANT -D_GNU_SOURCE -Wno-deprecated -fwrapv -DDEBUGGING -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -ansi -O0 -ggdb3 -Wall -Werror=pointer-arith -Werror=vla -Wextra -Wwrite-strings av.c
av.c: In function ‘SV** Perl_av_create_and_unshift_one(PerlInterpreter*, AV**, SV*)’:
av.c:735:16: error: cannot convert ‘SV* const’ {aka ‘sv* const’} to ‘SV**’ {aka ‘sv**’} in return
  735 |         return val;
      |                ^~~

2 months agoperlop: Fix a few nits
積丹尼 Dan Jacobson [Sun, 25 Jul 2021 22:38:30 +0000 (06:38 +0800)]
perlop: Fix a few nits

Hope I didn't break anything.

2 months agoav_create_and_push/unshift_one: faster create via newAV_alloc_xz
Richard Leach [Mon, 7 Jun 2021 00:05:55 +0000 (01:05 +0100)]
av_create_and_push/unshift_one: faster create via newAV_alloc_xz

2 months agoav_create_and_push/unshift_one: remove experimental flag
Richard Leach [Sun, 6 Jun 2021 23:35:38 +0000 (00:35 +0100)]
av_create_and_push/unshift_one: remove experimental flag

2 months agoRemove the flags OPpSORT_STABLE and OPpSORT_UNSTABLE.
Nicholas Clark [Tue, 15 Jun 2021 12:34:22 +0000 (12:34 +0000)]

Remove the code in Perl_ck_sort() that reads from PL_hintgv that sets these,
and the code in pp_sort that reads them and sets SORTf_STABLE and
SORTf_UNSTABLE (which were no longer read. Remove these too.)

2 months agoThe sort pragma is now a no-op. It no longer sets or clears any hints bits.
Nicholas Clark [Tue, 15 Jun 2021 12:03:55 +0000 (12:03 +0000)]
The sort pragma is now a no-op. It no longer sets or clears any hints bits.

sort::current() now issues a deprecation warning and always returns "stable".

2 months agoregen/charset Use revised UTF-8 macros
Karl Williamson [Sat, 29 May 2021 20:31:47 +0000 (14:31 -0600)]
regen/charset Use revised UTF-8 macros

I realized that two base level utf8.h macros for UTF-8 could be
refactored to eliminate the conditionals in each.  Those macros have
equivalents in the pure perl code changed by this commit, which I
changed before the utf8.h versions to verify that everything worked, by
verifying there was no difference in the generated tables.

2 months agoregcharclass.h: Remove 2 EBCDIC dependencies
Karl Williamson [Fri, 30 Jul 2021 19:57:01 +0000 (13:57 -0600)]
regcharclass.h: Remove 2 EBCDIC dependencies

This commit makes is_HANGUL_ED_utf8_safe() return 0 unconditionally on
EBCDIC platforms.  This means its callers don't have to care what
platform is running.  Change the two callers to take advantage of this

The commit also changes the description of the macro to be slightly more

2 months agoregcharclass.h: #defines for non-chars by UTF8 length
Karl Williamson [Mon, 28 Jun 2021 21:31:39 +0000 (15:31 -0600)]
regcharclass.h: #defines for non-chars by UTF8 length

This creates macros for the non-character code points so that, given the
length of the UTF-8 sequence, only those ones that have that length
match.  This makes for more efficient processing, to be used in a future

The place where the length changes depends on the platform type, and
these macros will keep the code from having to worry about that.

2 months agoUnicode-Normalize: Save '&' instrs by casting to U8
Karl Williamson [Sat, 24 Jul 2021 13:19:38 +0000 (07:19 -0600)]
Unicode-Normalize: Save '&' instrs by casting to U8

2 months agoStorable: Save a '&' instr by casting to U8
Karl Williamson [Sat, 24 Jul 2021 13:18:07 +0000 (07:18 -0600)]
Storable: Save a '&' instr by casting to U8

2 months agoPOSIX: Save a '&' instr by casting to U8
Karl Williamson [Sat, 24 Jul 2021 13:22:25 +0000 (07:22 -0600)]
POSIX: Save a '&' instr by casting to U8

2 months agoOpcode: Save a '&' instr by casting to U8
Karl Williamson [Sat, 24 Jul 2021 13:21:56 +0000 (07:21 -0600)]
Opcode: Save a '&' instr by casting to U8

2 months agosv_vcatpvfn(): Simplify print format
Karl Williamson [Sat, 24 Jul 2021 13:39:30 +0000 (07:39 -0600)]
sv_vcatpvfn(): Simplify print format

The print took a character, cast it to UV and then printed it as an
octal UV.  But why not just print it as an unsigned octal character?
The code that did this was part of a sweeping commit of a bunch of
things, so no explanation there.

2 months agoSTATUS_UNIX_EXIT_SET(): Save a '&' instr by casting to U8
Karl Williamson [Sat, 24 Jul 2021 13:38:04 +0000 (07:38 -0600)]
STATUS_UNIX_EXIT_SET(): Save a '&' instr by casting to U8

2 months agowin32.c: Save a '&' instr by casting to U8
Karl Williamson [Sat, 24 Jul 2021 13:14:20 +0000 (07:14 -0600)]
win32.c: Save a '&' instr by casting to U8

2 months agovms.c: Save '&' instrs by casting to U8
Karl Williamson [Sat, 24 Jul 2021 13:31:12 +0000 (07:31 -0600)]
vms.c: Save '&' instrs by casting to U8

2 months agoutil.h: Save a '&' instr by casting to U8
Karl Williamson [Sat, 24 Jul 2021 13:30:53 +0000 (07:30 -0600)]
util.h: Save a '&' instr by casting to U8

2 months agoutf8.c: Remove redundant '&' instruction
Karl Williamson [Sat, 24 Jul 2021 13:29:28 +0000 (07:29 -0600)]
utf8.c: Remove redundant '&' instruction

The cast does this with out extra instruction

2 months agotoke.c: Save a '&' instr by casting to U8
Karl Williamson [Sat, 24 Jul 2021 13:28:35 +0000 (07:28 -0600)]
toke.c: Save a '&' instr by casting to U8

2 months agosv.c: Save a '&' instr by casting to U8
Karl Williamson [Sat, 24 Jul 2021 13:27:13 +0000 (07:27 -0600)]
sv.c: Save a '&' instr by casting to U8

2 months agoregcomp: Save '&' instrs by casting to U8
Karl Williamson [Sat, 24 Jul 2021 13:26:05 +0000 (07:26 -0600)]
regcomp: Save '&' instrs by casting to U8

2 months agopp_pack: Save '&' instrs by casting to U8
Karl Williamson [Sat, 24 Jul 2021 13:25:05 +0000 (07:25 -0600)]
pp_pack: Save '&' instrs by casting to U8

2 months agoperlio.c: Save '&' instrs by casting to U8
Karl Williamson [Sat, 24 Jul 2021 13:23:19 +0000 (07:23 -0600)]
perlio.c: Save '&' instrs by casting to U8

2 months agodump.c: Save a '&' instr by casting to U8
Karl Williamson [Sat, 24 Jul 2021 13:20:18 +0000 (07:20 -0600)]
dump.c: Save a '&' instr by casting to U8

2 months agoCxLVAL(): Save a '&' instr by casting to U8
Karl Williamson [Sat, 24 Jul 2021 13:16:53 +0000 (07:16 -0600)]
CxLVAL(): Save a '&' instr by casting to U8

2 months agowarnings.h: Use cast instead of bitwise &
Karl Williamson [Sat, 24 Jul 2021 12:41:40 +0000 (06:41 -0600)]
warnings.h: Use cast instead of bitwise &

This saves that instruction

2 months agodoop.c: Rmv redundant '&' instrs
Karl Williamson [Sun, 18 Jul 2021 18:26:13 +0000 (12:26 -0600)]
doop.c: Rmv redundant '&' instrs

Casting to U8 has the same effect as ANDing with 0xFF.  Remove the
redundant '&'

2 months agohandy.h: Refactor FITS_IN_8_BITS()
Karl Williamson [Sun, 18 Jul 2021 18:58:02 +0000 (12:58 -0600)]
handy.h: Refactor FITS_IN_8_BITS()

By using a cast to U8, the '&' operation can be elminated, and the macro
easier to read.

2 months agomsb_pos(): Bit twiddle a subtraction into an xor
Karl Williamson [Tue, 20 Jul 2021 19:43:39 +0000 (13:43 -0600)]
msb_pos(): Bit twiddle a subtraction into an xor

Experiments by Tomasz Konojacki indicated that gcc, for one, doesn't
optimally optimize a subtraction from 2**n-1.  This commit tells the
compiler the optimization.

2 months agoAlways use any fast available msb/lsb method
Karl Williamson [Tue, 20 Jul 2021 18:14:35 +0000 (12:14 -0600)]
Always use any fast available msb/lsb method

Some platforms have a fast way to get the msb but not the lsb; others,
more rarely, have the reverse.  But using a few shift and the like
instructions allows us to reduce either instance to terms of the other.

This commit causes any available fast method to be used by turning the
non-available case into the available one

2 months agoComment why ffs() isn't used for lsbit_pos()
Karl Williamson [Tue, 20 Jul 2021 16:41:39 +0000 (10:41 -0600)]
Comment why ffs() isn't used for lsbit_pos()

2 months agoUse windows builtins for msb_pos, lsb_pos, if avail
Karl Williamson [Tue, 20 Jul 2021 16:22:37 +0000 (10:22 -0600)]
Use windows builtins for msb_pos, lsb_pos, if avail

Windows has different intrinsics than the previous commit added, with a
different API for counting leading/trailing zeros

2 months agoUse clz, ctz for msb_pos, lsb_pos, if available
Karl Williamson [Tue, 20 Jul 2021 16:07:42 +0000 (10:07 -0600)]
Use clz, ctz for msb_pos, lsb_pos, if available

On many modern platforms these functions can be replaced by a single
machine instruction or two.  This commit looks for this possibility and
uses it if possible.

2 months agoCreate and use 32 and 64 bit msbit_pos() fcns
Karl Williamson [Tue, 20 Jul 2021 17:57:39 +0000 (11:57 -0600)]
Create and use 32 and 64 bit msbit_pos() fcns

The existing code to determine the position of the most significant 1
bit in a word is extracted from variant_byte_number(), and generalized
to use the deBruijn method previously added that works on any bit in the
word, rather than the existing method which looks just at the msb of
each byte.  The code is moved to a new function in preparation for being
called from other places.

A U32 version is created, and on 64 bit platforms, a second, parallel,
version taking a U64 argument is also created.  This is because future
commits may care about the word size differences.

2 months agoregexec.c: Use lsbit_pos32() to avoid iterations
Karl Williamson [Sun, 6 Jun 2021 02:43:17 +0000 (20:43 -0600)]
regexec.c: Use lsbit_pos32() to avoid iterations

Before this commit, the code looped through a bitmap looking for a set
bit.  Now that we have a fast way to find where a set bit is, use it,
and avoid the fruitless iterations.

2 months agoregcomp.h: Add internal macro
Karl Williamson [Tue, 20 Jul 2021 12:03:16 +0000 (06:03 -0600)]
regcomp.h: Add internal macro

This returns the locale bitmap field from an ANYOF node.

In this commit, it just tidies up the code, omitting lengthy casts.  But
a future commit will use it on its own.

2 months agoCreate and use 32 and 64 bit lsbit_pos() fcns
Karl Williamson [Tue, 20 Jul 2021 17:51:59 +0000 (11:51 -0600)]
Create and use 32 and 64 bit lsbit_pos() fcns

The existing code to determine the position of the least significant 1
bit in a word is extracted from variant_byte_number() and moved to a new
function in preparation for being called from other places.

A U32 version is created, and on 64 bit platforms, a second, parallel,
version taking a U64 argument is also created.  This is because future
commits may care about the word size differences.

2 months agoPerl_variant_byte_number: Move assert()
Karl Williamson [Sat, 5 Jun 2021 14:57:37 +0000 (08:57 -0600)]
Perl_variant_byte_number: Move assert()

This should be called only when it is known there is a variant byte.
The assert() previously wasn't checking that precisely

2 months agoPerl_variant_byte_number: Generalize
Karl Williamson [Sat, 5 Jun 2021 07:15:37 +0000 (01:15 -0600)]
Perl_variant_byte_number: Generalize

The current mechanism doesn't work if the lowest bit is the one set.  At
the moment that doesn't matter as we aren't looking at that bit anyway.
But a future commit will refactor things so that bit will be looked at.
So prepare for that.  The new expression is simpler, besides.

2 months agoAdd 64bit single-1bit_pos()
Karl Williamson [Tue, 20 Jul 2021 13:22:00 +0000 (07:22 -0600)]
Add 64bit single-1bit_pos()

This will prove useful in future commits on platforms that have 64 bit

The deBruijn sequence used here, taken from the internet, differs
from the 32 bit one in how they treat a word with no set bits.  But this
is considered undefined behavior, so that difference is immaterial.

Apparently figuring this out uses brute force methods, and so I decided
to live with this difference, rather than to expend the time needed to
bring them into sync.

2 months agoCreate and use single_1bit_pos32()
Karl Williamson [Sat, 5 Jun 2021 16:22:42 +0000 (10:22 -0600)]
Create and use single_1bit_pos32()

This moves the code from regcomp.c to inline.h that calculates the
position of the lone set bit in a U32.  This is in preparation for use
by other call sites.

2 months agoav.h - document newAV_alloc_xz
Richard Leach [Wed, 28 Jul 2021 11:16:30 +0000 (12:16 +0100)]
av.h - document newAV_alloc_xz

2 months agowin32/GNUmakefile: Remove -s option from compiler flags
Biswapriyo Nath [Wed, 21 Jul 2021 06:07:08 +0000 (11:37 +0530)]
win32/GNUmakefile: Remove -s option from compiler flags

Binary stripping is done at linking time

2 months agowin32/GNUmakefile: Get CPU arch from target triplet
Biswapriyo Nath [Wed, 21 Jul 2021 06:07:01 +0000 (11:37 +0530)]
win32/GNUmakefile: Get CPU arch from target triplet

MinGW-w64 target triplet is different in GCC and Clang/llvm

2 months agowin32: Use -shared option instead of -mdll to create DLL
Biswapriyo Nath [Wed, 21 Jul 2021 06:06:44 +0000 (11:36 +0530)]
win32: Use -shared option instead of -mdll to create DLL

2 months agoAdd myself to AUTHORS
Biswapriyo Nath [Wed, 21 Jul 2021 06:06:04 +0000 (11:36 +0530)]
Add myself to AUTHORS

3 months agoDon't call av_fetch() with TRUE to create an SV that is immediately freed. 19007/head
Nicholas Clark [Wed, 28 Jul 2021 13:01:35 +0000 (13:01 +0000)]
Don't call av_fetch() with TRUE to create an SV that is immediately freed.

In Perl_my_pclose() the code as been calling av_fetch() with TRUE (lvalue;
create the SV if not found) since the Perl 4 -> Perl 5 migration. The
code *had* been assuming that the returned result was always a valid SvIV
until commit 25d9202327791097 in Jan 2001:
    Safe fix for Simon's pclose() doing SvIVX of undef -> core bug.

which fixes the bug reported in

That commit changed the code to default the IV result (the pid) to -1 if the
av_fetch() failed to return SVt_IV. However, that commit failed to notice
that the value -1 was *already* "in use" *only 4 lines later* as a flag for
OS/2 to indicate "Opened by popen."

Hence switch the OS/2 sentinel value to -2.

The that states that OS/2 has a my_pclose implementation in os2.c is wrong.
It was erroneously added by commit 5f05dabc4054964a in Dec 1996:
    [inseparable changes from patch from perl5.003_11 to perl5.003_12]

It appears to be a copy-paste error from the previous comment added about

I tested this fix with the 2001-era code of commit 25d9202327791097 - it
(also) solves the bug reported back then.

3 months agoUpdate Archive-Tar to CPAN version 2.40
Chris 'BinGOs' Williams [Tue, 27 Jul 2021 13:05:58 +0000 (14:05 +0100)]
Update Archive-Tar to CPAN version 2.40


2.40  27/07/2021 (KHW && ATOOMIC)
- Generalize for EBCDIC
- Update GitHub workflow with deprecated add-path

3 months agoAdd PERL_GCC_VERSION_GE and kin
Karl Williamson [Fri, 16 Jul 2021 18:07:50 +0000 (12:07 -0600)]

This saves typing and potential mistakes

The idea and implementation are from Tomasz Konojacki

3 months agoS_clear_placeholders() should call HvHASKFLAGS_off() if no keys remain. 19004/head
Nicholas Clark [Sat, 24 Jul 2021 16:20:56 +0000 (16:20 +0000)]
S_clear_placeholders() should call HvHASKFLAGS_off() if no keys remain.

This isn't essential - HvHASKFLAGS() set when there are no keys with flags
merely disables some potential optimisations. (The other way round - not
being set when keys have flags would be a bug).

This is a regression I introduced in Feb 2004 with commit d36773897a6f30fc:
    hv_clear_placeholders now manipulates the linked lists directly, rather
    than using the iterator interface and calling hv_delete
    This will allow hv_delete to be simplified to remove most of the
    special casing related to placeholders.

However several people have looked at the code since then and no-one has
realised that with the logic as-was, this call had to be unreachable.

Also avoid calling  HvPLACEHOLDERS_get() twice - each caller has already
done this, so pass the value in.

3 months agoS_mro_gather_and_rename() can use HvTOTALKEYS(), as placeholders don't matter.
Nicholas Clark [Fri, 23 Jul 2021 10:07:05 +0000 (10:07 +0000)]
S_mro_gather_and_rename() can use HvTOTALKEYS(), as placeholders don't matter.

Stashes *shouldn't* have placeholders, but even if they did, the loop skips
if !isGV(val) is true, which will hold for placeholders.

Also move the call to hv_fetchhek() after the check for main::main::main::...
The C compiler can't optimise that call away because it doesn't know whether
it has has side effects. We know that it doesn't, so we can move it.

3 months agoConvert code in mro_core.c to use hv_*hek() APIs where possible.
Nicholas Clark [Tue, 20 Jul 2021 20:05:44 +0000 (20:05 +0000)]
Convert code in mro_core.c to use hv_*hek() APIs where possible.

Add a macro hv_existshek() to implement exists.

The HEK-based macros are more efficient wrappers of hv_common() than the
string/length/flags macros because they also pass in the pre-computed hash
value (from the HEK). This avoids hv_common() needing to recalculate it.

3 months agoWhere the key is an SV, replace some hv_* calls with hv_*_ent equivalents.
Nicholas Clark [Tue, 20 Jul 2021 14:11:13 +0000 (14:11 +0000)]
Where the key is an SV, replace some hv_* calls with hv_*_ent equivalents.

This avoids the SvUTF8(tmpstr) ? -(I32)SvCUR(tmpstr) : (I32)SvCUR(tmpstr)
code dance.

3 months agoIn Perl_gv_check() set and clear HvAUXf_SCAN_STASH just once.
Nicholas Clark [Wed, 21 Jul 2021 07:05:47 +0000 (07:05 +0000)]
In Perl_gv_check() set and clear HvAUXf_SCAN_STASH just once.

Previously the flag bit was set and cleared for each iteration of the outer
loop. The compiler *might* have made this optimisation that this commit makes
for us, but might not.

3 months agoSimplify some logic in S_find_hash_subscript().
Nicholas Clark [Tue, 20 Jul 2021 20:24:41 +0000 (20:24 +0000)]
Simplify some logic in S_find_hash_subscript().

The code is looping to look for the hash key whose value is the SV at the
address given in val. Previously the code in the loop would ignore hash
entries which were &PL_sv_undef or &PL_sv_placeholder. Given that this check
was *after* the equality check for val, but the the only way for the
function to return success ("found") was to continue beyond this check.
Hence, as-written it meant that the function would always return NULL
("not found") if val had either of these values, but would loop through the
entire hash *first* before doing so.

Hence move the check before the loop, to generate the same result, but with
less work.

Also, HeKEY(entry) can never be NULL, so this check was dead code and can be
removed. (The C compiler probably already spotted this)

Also, the code had special-case handling for HEf_SVKEY. What it used to do
was actually identical to what sv_2mortal(newSVhek(...)) does, so just use
that for everything. (Hashes themselves should never contain keys with this
special flag length - it's only used in MAGIC structures, and for HE
structures created while iterating tied hashes.)

3 months agoTests for tied hashes in list context (keys, values and both).
Nicholas Clark [Wed, 21 Jul 2021 11:55:57 +0000 (11:55 +0000)]
Tests for tied hashes in list context (keys, values and both).

These weren't explicitly tested before.

3 months agoThe cases for SVt_PVAV and SVt_PVHV in pp_defined are unreachable.
Nicholas Clark [Mon, 19 Jul 2021 07:01:15 +0000 (07:01 +0000)]
The cases for SVt_PVAV and SVt_PVHV in pp_defined are unreachable.

Remove them, and hit to the C compiler that it's unlikely that someone used
`defined` on a subroutine.

These have been unreachable since `defined @array` and `defined %hash`
became syntax errors. Whilst the same PP code is used for // and //=,
expressions such as`@a // @b` put the left array (or hash) in scalar
context, meaning that it always returns a define value.
(Should we warn on these?)

3 months agoRemove some cruft from XS::APItest.
Nicholas Clark [Tue, 20 Jul 2021 19:34:39 +0000 (19:34 +0000)]
Remove some cruft from XS::APItest.

We no longer need the 5.9.x era work around for UNITCHECK.

The use 5.011001 can go too.  As XS::APItest is only in the core tree and
never installed, the only perl it will ever run with is the version that it
shipped with.

This line was added in Sep 2010 by commit 83f8bb564961ee8f:

    merge XS-APItest-KeywordRPN into XS-APItest

    XS-APItest-KeywordRPN has turned out to be less useful as an independent
    module than expected, and less strictly about RPN than it originally was.

It was previously in the source for XS::APItest::KeywordRPN, and it's unclear
why it was needed there.

3 months agoMerge branch 'switch-off' into blead
Ricardo Signes [Sun, 25 Jul 2021 19:38:20 +0000 (15:38 -0400)]
Merge branch 'switch-off' into blead

3 months bump version number to 1.67 18864/head
Ricardo Signes [Sun, 25 Jul 2021 19:23:32 +0000 (15:23 -0400)] bump version number to 1.67

3 months agoperlsyn: note that v5.36 will not enable "switch"
Ricardo Signes [Sun, 25 Jul 2021 19:13:37 +0000 (15:13 -0400)]
perlsyn: note that v5.36 will not enable "switch"

3 months agoB::Deparse tests: turn on "switch" to test break() behavior
Ricardo Signes [Sun, 6 Jun 2021 20:17:53 +0000 (16:17 -0400)]
B::Deparse tests: turn on "switch" to test break() behavior

3 months agoswitches.t: stop testing that -E turns on ~~
Ricardo Signes [Sun, 6 Jun 2021 20:07:39 +0000 (16:07 -0400)]
switches.t: stop testing that -E turns on ~~

~~ is not feature guarded to begin with!  I think this test was maybe a
mistake, or maybe became obsolete over time.

3 months agoswitches.t: stop testing that -E includes switch
Ricardo Signes [Sun, 6 Jun 2021 20:06:21 +0000 (16:06 -0400)]
switches.t: stop testing that -E includes switch

3 months drop "switch" from latest version bundle
Ricardo Signes [Sun, 6 Jun 2021 19:56:23 +0000 (15:56 -0400)] drop "switch" from latest version bundle

3 months agoperlexperiment: list ":win32 layer" as removed
Ricardo Signes [Sun, 25 Jul 2021 19:31:39 +0000 (15:31 -0400)]
perlexperiment: list ":win32 layer" as removed

3 months agoop/each.t: Improve EBCDIC handling
Karl Williamson [Fri, 9 Jul 2021 19:45:02 +0000 (13:45 -0600)]
op/each.t: Improve EBCDIC handling

This commit simplifies this file by using the EBCDIC tools now
available.  It turns out that it wasn't actually testing what it
purported to be doing on EBCDIC, where a key in UTF-8 and the bytes that
comprise that key are two different keys if their UTF8ness differs.

A set of kludgy tests for EBCDIC are now removed.

3 months agoop/each.t: Add strict/warnings
Karl Williamson [Fri, 9 Jul 2021 19:12:40 +0000 (13:12 -0600)]
op/each.t: Add strict/warnings

3 months agoperl.h: Add some comments
Karl Williamson [Wed, 30 Jun 2021 19:06:50 +0000 (13:06 -0600)]
perl.h: Add some comments

3 months agoregcomp.c: Use existing macro
Karl Williamson [Sun, 27 Jun 2021 07:30:13 +0000 (01:30 -0600)]
regcomp.c: Use existing macro

Don't reinvent the macro

3 months agoop/print.t: Generalize for EBCDIC
Karl Williamson [Thu, 8 Jul 2021 23:23:15 +0000 (17:23 -0600)]
op/print.t: Generalize for EBCDIC

This adds an EBCDIC-specific test corresponding to an ASCII-specific

3 months agocomp/require.t
Karl Williamson [Wed, 7 Jul 2021 22:48:50 +0000 (16:48 -0600)]

Remove obsolete EBCDIC references.  This no longer skips tests on
EBCDIC, working equally well on it as well as ASCII.

3 months agoop/length.t: Use modern tools for EBCDIC
Karl Williamson [Thu, 8 Jul 2021 23:55:22 +0000 (17:55 -0600)]
op/length.t: Use modern tools for EBCDIC

This uses the tools furnished in a test helper file instead of
hand-rolling our own code, greatly simplifying things.

3 months agopat_advanced.t: EBCDIC fix
Karl Williamson [Wed, 7 Jul 2021 12:50:45 +0000 (06:50 -0600)]
pat_advanced.t: EBCDIC fix

3 months agolib/ Generalize for EBCDIC
Karl Williamson [Thu, 8 Jul 2021 23:16:01 +0000 (17:16 -0600)]
lib/ Generalize for EBCDIC

3 months agoSafe: safeutf8.t: Generalize for EBCDIC
Karl Williamson [Sat, 10 Jul 2021 23:13:41 +0000 (17:13 -0600)]
Safe: safeutf8.t: Generalize for EBCDIC

Use a code point in the test that is equally valid on EBCDIC machines

3 months agonumeric.c: Silence compiler warning
Karl Williamson [Sun, 25 Jul 2021 13:26:15 +0000 (07:26 -0600)]
numeric.c: Silence compiler warning

'negative' is now only used when Perl_strtod() is not available.  Recent
commits e79f3c064561c5843af40cda89f98bb44f956729 and
7035863f5fa4306e58c8157b2a5893ba5e0f1eaf removed its other uses.

3 months agonumeric.c: White-space only
Karl Williamson [Sun, 25 Jul 2021 13:17:00 +0000 (07:17 -0600)]
numeric.c: White-space only

Properly indent some nested preprocessor directives in my_atof2()

3 months agoop.c: Remove leading tab
Karl Williamson [Sun, 25 Jul 2021 13:06:35 +0000 (07:06 -0600)]
op.c: Remove leading tab

This was the only remaining, non-generated base-level leading tab, and
so resolves GH #18792

3 months agot/op/numify.t: More tests to check if invalid Inf/NaNs are not numified
TAKAI Kousuke [Mon, 22 Feb 2021 16:22:26 +0000 (01:22 +0900)]
t/op/numify.t: More tests to check if invalid Inf/NaNs are not numified

3 months agoPerl_my_atof3: disallow double signs for Inf/NaN
TAKAI Kousuke [Mon, 22 Feb 2021 16:11:59 +0000 (01:11 +0900)]
Perl_my_atof3: disallow double signs for Inf/NaN

Perl_my_atof3 used to call S_my_atof_infnan after parsing sign character,
but this led Inf/NaN with double signs (e.g. "+-Inf") to be wrongly accepted
because S_my_atof_infnan will also parse sign itself.

Also improved comment per suggestion from @hvds.

3 months agoPerl_my_atof3: disallow double signs and spaces between a sign and number
TAKAI Kousuke [Thu, 18 Feb 2021 16:11:13 +0000 (01:11 +0900)]
Perl_my_atof3: disallow double signs and spaces between a sign and number

Perl_my_atof3 used to pass a substring after the first (optional) sign
to (S_)strtod, which causes wrong numifications for strings like "-+3"
or "+ 0x123" (for the latter case, while Perl_my_atof3 already had
the code to block "0x" prefixes, this string will slip through due to
the space character in it).

For GH #18584.

3 months agoRemove MI from FastCalc
Chris 'BinGOs' Williams [Sun, 25 Jul 2021 07:36:48 +0000 (08:36 +0100)]
Remove MI from FastCalc

3 months agoperlop - Invocant only needs to be an object or class name for method calls
Dan Book [Fri, 11 Jun 2021 20:02:31 +0000 (16:02 -0400)]
perlop - Invocant only needs to be an object or class name for method calls

3 months agoPOSIX: Make strtoul() return UV if possible
TAKAI Kousuke [Thu, 4 Feb 2021 14:10:55 +0000 (23:10 +0900)]
POSIX: Make strtoul() return UV if possible

POSIX::strtoul() used to return NV if return value does not fit in IV,
but this caused loss of precision if unsigned long and NV are both 64-bit.

3 months agoPOSIX: Bump version
Karl Williamson [Sat, 24 Jul 2021 19:58:41 +0000 (13:58 -0600)]
POSIX: Bump version

3 months agoPetar-Kaleychev is now a Perl author
Karl Williamson [Sat, 24 Jul 2021 18:55:17 +0000 (12:55 -0600)]
Petar-Kaleychev is now a Perl author

3 months agoSkip 501_ping_icmpv6.t when icmpv6 cannot be initialized. Credits to rurban
Thibault DUPONCHELLE [Mon, 12 Jul 2021 15:49:33 +0000 (17:49 +0200)]
Skip 501_ping_icmpv6.t when icmpv6 cannot be initialized. Credits to rurban

3 months agoFix perl5300delta.pod
Petar-Kaleychev [Sun, 18 Jul 2021 15:44:28 +0000 (18:44 +0300)]
Fix perl5300delta.pod

This is the correct CVE.

3 months agoBump the perl version in various places ready for 5.35.3
Neil Bowers [Fri, 23 Jul 2021 22:09:35 +0000 (23:09 +0100)]
Bump the perl version in various places ready for 5.35.3

3 months agonew perldelta for 5.35.3
Neil Bowers [Fri, 23 Jul 2021 22:00:47 +0000 (23:00 +0100)]
new perldelta for 5.35.3

3 months agoU:N: Generalize to work on EBCDIC
Karl Williamson [Sat, 10 Jul 2021 20:02:13 +0000 (14:02 -0600)]
U:N: Generalize to work on EBCDIC

3 months agoU::N: Improve ok() function
Karl Williamson [Sat, 10 Jul 2021 19:02:15 +0000 (13:02 -0600)]
U::N: Improve ok() function

This hand-rolled function can serve as an is() when called with a 2nd
argument.  And in this module much of the data is non-printable so
should be output escaped.

None of the calls have a name parameter, so this can work.

3 months agoUnicode::Normalize: Make ok() common to all .t files
Karl Williamson [Sat, 10 Jul 2021 19:48:15 +0000 (13:48 -0600)]
Unicode::Normalize: Make ok() common to all .t files

There are already two functions designed for the .t files to use whose
common definition is in

This commit moves the hand-rolled ok() there as well, so its definition
is only in one place.

3 months agoMerge branch 'release-5.35.2' into blead
Neil Bowers [Fri, 23 Jul 2021 15:57:05 +0000 (16:57 +0100)]
Merge branch 'release-5.35.2' into blead

3 months agoadd new release to perlhist v5.35.2
Neil Bowers [Fri, 23 Jul 2021 01:24:12 +0000 (02:24 +0100)]
add new release to perlhist

3 months agoUpdated with changed modules
Neil Bowers [Fri, 23 Jul 2021 01:21:48 +0000 (02:21 +0100)]
Updated with changed modules

3 months agoUpdate Module::CoreList for 5.35.2
Neil Bowers [Fri, 23 Jul 2021 00:43:07 +0000 (01:43 +0100)]
Update Module::CoreList for 5.35.2

3 months agofirst cut at perldelta
Neil Bowers [Fri, 23 Jul 2021 00:26:35 +0000 (01:26 +0100)]
first cut at perldelta