This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perl5.git
17 months agoop.c, doop.c Use mnemonics instead of numeric values
Karl Williamson [Wed, 2 Oct 2019 20:47:24 +0000 (14:47 -0600)]
op.c, doop.c Use mnemonics instead of numeric values

For legibility and maintainability

17 months agodoop.c: Add a parameter to a few fcns
Karl Williamson [Wed, 2 Oct 2019 18:33:01 +0000 (12:33 -0600)]
doop.c: Add a parameter to a few fcns

instead of deriving it each time from inside the function.  This is in
preparation for future commits.

17 months agoChange macro name in tr/// code
Karl Williamson [Wed, 2 Oct 2019 15:38:53 +0000 (09:38 -0600)]
Change macro name in tr/// code

This makes it more mnemonic.  Also add an explanation in toke.c

17 months agoop.c: Comments only
Karl Williamson [Wed, 27 Feb 2019 21:05:18 +0000 (14:05 -0700)]
op.c: Comments only

Indent for clarity, and add a comment

17 months agodoop.c, op.c: White-space only
Karl Williamson [Wed, 27 Feb 2019 20:56:00 +0000 (13:56 -0700)]
doop.c, op.c: White-space only

Remove trailing blanks and outdent a doubly indented block

17 months agoop.c: Indent some code
Karl Williamson [Wed, 27 Feb 2019 20:26:53 +0000 (13:26 -0700)]
op.c: Indent some code

This is in preparation for a future commit which will surround this with
an 'if'.

17 months agotoke.c: comment, White-space only
Karl Williamson [Sat, 2 Nov 2019 20:45:23 +0000 (14:45 -0600)]
toke.c: comment, White-space only

Wrap a too-long line

17 months agoAllow core to work with code points above IV_MAX
Karl Williamson [Wed, 2 Oct 2019 21:29:05 +0000 (15:29 -0600)]
Allow core to work with code points above IV_MAX

Higher has been reserved for core use, and a future commit will want to
finally do this.

17 months agoMove some static fcns from regcomp.c to invlist_inline.h
Karl Williamson [Tue, 19 Feb 2019 02:37:53 +0000 (19:37 -0700)]
Move some static fcns from regcomp.c to invlist_inline.h

They are still only accessible from regcomp.c, but this is in
preparation for them to be usable from other core files as well.

17 months agoregcomp.c: Change name of static function.
Karl Williamson [Wed, 2 Oct 2019 03:57:59 +0000 (21:57 -0600)]
regcomp.c: Change name of static function.

This removes an unnecessary leading underscore

17 months agoinvlist_inline.h: White space only
Karl Williamson [Tue, 19 Feb 2019 02:31:25 +0000 (19:31 -0700)]
invlist_inline.h: White space only

Fold a too-long line

17 months agoinvlist_inline.h: Restrict files symbols are in
Karl Williamson [Tue, 19 Feb 2019 02:30:31 +0000 (19:30 -0700)]
invlist_inline.h: Restrict files symbols are in

These are only needed in regcomp.c, so restrict them to that file

17 months agoUpdate IO-Compress to CPAN version 2.089
Chris 'BinGOs' Williams [Wed, 6 Nov 2019 22:06:58 +0000 (22:06 +0000)]
Update IO-Compress to CPAN version 2.089

  [DELTA]

  2.089 3 November 2019

      * bin/streamzip
        Add zipstream to EXE_FILES
        https://github.com/pmqs/IO-Compress/issues/5
        7f5ed78e5652125c9ba78aab720e18d384d59c00
        fb8cd6480af6303f58fd2e12d4999cd1830f0c5f

  2.088 31 October 2019

      * t/105oneshot-zip-only.t
        Fix reset of CompSize
        6034da95f1dc5a594edc0d26e6add8d86990ad56

      * Add Support Details
        ad66b6ec4cf175a70e53f74572eed5f403648f11

      * Update site for Bzip2 to sourceware
        77497aeb2a234889a2b2c4ac7ea2f620895b16a9

      * Fix number of tests
        bc4e234449a82fb00f66af752dfc4c96097b2a4d

      * Add streamzip script to bin
        76d2795d0587bafb0cc398e97142740acba82a42

      * zipdetails

        * Update zipdetails to version 1.11
         8958cb3aa90745a4b3369479846846fdca6b4f76

        * Zip64 extra field typo
          f186380d701fe5257f9fc92d69160dc6382cfc24

      * t/105oneshot-zip-only.t
        test with deflated directory
        16bfffcf5089af67cb7f68685cc61d06409cba73

      * t/105oneshot-zip-only.t
        Add test for encrypted Zip files
        5ad813115aed000f88d7df28261b43c00ae56525
        2c64e255feb5a1ee33d033f7eccb6feca12ebe97

      * Documentation Updates
        https://github.com/pmqs/IO-Compress/issues/2
        e1fd0d4eda0a8496981cbd83ad06906f4ae586a5

      * Mention xz, lzma etc
        https://github.com/pmqs/IO-Compress/issues/4
        126f7b9da97b572d0fb89a9bdcc190c5405c72b8

17 months agoUpdate Compress-Raw-Bzip2 to CPAN version 2.089
Chris 'BinGOs' Williams [Wed, 6 Nov 2019 22:00:47 +0000 (22:00 +0000)]
Update Compress-Raw-Bzip2 to CPAN version 2.089

  [Delta]

  2.089 3 November 2019

      * No Changes

  2.088 31 October 2019

      * Add Support Details
        37e04fb3dc50287a3512b004282425c6eedb8af6

      * upgrade to Bzip2 1.0.8
        027a30848ee57731b435d2ea7af09e532bf6fbfd

17 months agoUpdate Compress-Raw-Zlib to CPAN version 2.089
Chris 'BinGOs' Williams [Wed, 6 Nov 2019 21:59:15 +0000 (21:59 +0000)]
Update Compress-Raw-Zlib to CPAN version 2.089

  [DELTA]

  2.089 3 November 2019

      * No Changes

  2.088 31 October 2019

      * Add SUPPORT section
        d348ad76c2073a2973d094891fbd0c2e24bf397d

      * 000prereq.t: dump Perl version
        e1afe502818cb1ccf5bad917b14b029b408f47f1

17 months agoprevent a race between name-based stat and an open modifying atime
Tony Cook [Sun, 3 Nov 2019 22:52:22 +0000 (09:52 +1100)]
prevent a race between name-based stat and an open modifying atime

Most linux systems rarely update atime, so it's very unlikely
for this issue to trigger there, but on a system with classic atime
behaviour this was a race between open modifying atime and time()
ticking over.

gh #17234

17 months agoadd defensive parens
Yves Orton [Tue, 5 Nov 2019 23:32:06 +0000 (00:32 +0100)]
add defensive parens

17 months agorework U8TOxx_LE macros to force unsigned access
Yves Orton [Tue, 5 Nov 2019 23:05:17 +0000 (00:05 +0100)]
rework U8TOxx_LE macros to force unsigned access

This introduces a _shifted_octet() utility macro to make things
more clear, it also adds support for USE_UNALIGNED_PTR_DEREF for
little-endian platforms that allow unaligned access. This must
be manually defined and ONLY affects little endian builds currently,
and is there primarily for -g builds on x86 (eg for perl developers
themselves).

17 months agoFix the UTO*_LE macros
Matt Turner [Tue, 5 Nov 2019 18:22:58 +0000 (10:22 -0800)]
Fix the UTO*_LE macros

Embarrassingly I got confused and swapped them (BYTEORDER == 0x1234 etc
is not great...). Somehow the perl test suite still passes with this,
but fortunately the test suite for modules like
Algorithm-MinPerfHashTwoLevel caught the problem.

Fixes: https://github.com/Perl/perl5/issues/17244
Fixes: https://github.com/Perl/perl5/issues/17247
Fixes: https://rt.cpan.org/Ticket/Display.html?id=130890

17 months agoRemove compiler in .travis.yml
Steve Peters [Tue, 5 Nov 2019 17:08:13 +0000 (11:08 -0600)]
Remove compiler  in .travis.yml

SInce `clang` was removed as a compiler option in the previous change to `.travis.yml`, no need to exclude Linux from using it.  Also, no need for the excludes for OS X since was removed.

17 months agoperlop.pod: Slight clarification
Karl Williamson [Sat, 2 Nov 2019 20:41:49 +0000 (14:41 -0600)]
perlop.pod: Slight clarification

17 months agotoke.c: comment changes
Karl Williamson [Tue, 5 Nov 2019 04:55:53 +0000 (21:55 -0700)]
toke.c: comment changes

These should have been included in
0c311b7c345769239f38d0139ea7738feec5ca4d

17 months agogv.c: SVf needs to be surrounded by spaces
Karl Williamson [Mon, 4 Nov 2019 20:54:41 +0000 (13:54 -0700)]
gv.c: SVf needs to be surrounded by spaces

perl can be compiled with C++, and this is illegal there.

17 months agoRemove unused `key` and `orig_keyword` parameters from `yyl_key_core`
Dagfinn Ilmari Mannsåker [Tue, 5 Nov 2019 12:31:28 +0000 (12:31 +0000)]
Remove unused `key` and `orig_keyword` parameters from `yyl_key_core`

They were only ever passed as zeros, so just make them local to the
function.

17 months agoRename `tmp` local to `key` in `yyl_keylookup`
Dagfinn Ilmari Mannsåker [Tue, 5 Nov 2019 12:29:39 +0000 (12:29 +0000)]
Rename `tmp` local to `key` in `yyl_keylookup`

Also only initialise it just before it's actually used.

17 months agoRemove unused `key` parameter from `yyl_just_a_word`
Dagfinn Ilmari Mannsåker [Tue, 5 Nov 2019 12:25:14 +0000 (12:25 +0000)]
Remove unused `key` parameter from `yyl_just_a_word`

17 months agot/re/speed.t: increase timeout
David Mitchell [Tue, 5 Nov 2019 11:43:57 +0000 (11:43 +0000)]
t/re/speed.t: increase timeout

Test 58 is supposed to finish in milliseconds, or take 10s of seconds
if it hits the bug. It currently tests for <= 1s and is failing
occasionally in smokes. Increase the timeout to 2s and see if the issue
goes away. Also add a diag() to display the elapsed time on failure.

17 months agoenforce strict for barewords in multiconcat
Tony Cook [Mon, 4 Nov 2019 21:00:25 +0000 (08:00 +1100)]
enforce strict for barewords in multiconcat

gh #17254

17 months agoDoc: fix sv_setsv_cow reference
Sergey Aleynikov [Mon, 4 Nov 2019 17:58:32 +0000 (20:58 +0300)]
Doc: fix sv_setsv_cow reference

It's no more present in pp_hot.c

17 months agoS_gv_fetchmeth_internal fix STRLEN warning
Nicolas R [Mon, 4 Nov 2019 19:03:54 +0000 (13:03 -0600)]
S_gv_fetchmeth_internal fix STRLEN warning

Fixes #17250

cast STRLEN to int

Fix warnings from recent change GH #17222
We could also consider casting it using '
x & PERL_INT_MAX'

17 months ago[MERGE] Even smaller toke
Aaron Crane [Mon, 4 Nov 2019 11:00:14 +0000 (11:00 +0000)]
[MERGE] Even smaller toke

This continues the work merged in 5015bd0bb5ee7e0fa1ede1669bdfcd7bb5f10ebd,
factoring code out of Perl_yylex() and its callees, in the hope of making
the lexer easier to understand locally.

The work in the previous branch used unbounded tail recursion in some
places. Some compilers may have been able to compile the tail-recursive
calls as jumps under some optimisation modes, but we cannot rely on that. So
this further work replaces the unbounded recursion with gotos or other
control structures. It's a little annoying not to have been able to
eliminate those gotos, but these remaining gotos all occur within a function
that's considerably smaller and easier to understand, and they merely jump
all the way back to the top of that function.

After these changes, the largest remaining piece of Perl_yylex() is just
over 900 lines (down from originally >4100), and consists of a single switch
statement, all of whose case groups are independent.

This branch also contains a note in perldelta that this major refactoring
has taken place.

Closes #17220

17 months agoperldelta for recent toke.c refactoring 17241/head
Aaron Crane [Fri, 25 Oct 2019 10:21:51 +0000 (11:21 +0100)]
perldelta for recent toke.c refactoring

17 months agotoke.c: const-ify formbrack parameters
Aaron Crane [Fri, 1 Nov 2019 15:29:03 +0000 (15:29 +0000)]
toke.c: const-ify formbrack parameters

17 months agotoke.c: replace recursive calls to yyl_try() with goto
Aaron Crane [Fri, 1 Nov 2019 15:10:14 +0000 (15:10 +0000)]
toke.c: replace recursive calls to yyl_try() with goto

The downside of writing these calls recursively is that not all compilers
will compile the tail-position calls as jumps; that's especially true in
earlier versions of this refactoring process (where yyl_try() took a large
number of arguments), but it's not in general something we can expect to
happen — especially in the presence of `-O0` or similar compiler options.
This can lead to call-stack overflow in some circumstances.

Most recursive calls to yyl_try() occur within yyl_try() itself, so we can
easily replace them with an explicit `goto` (which is what most compilers
would use for the recursive calls anyway, now that yyl_try() takes ≤3
parameters).

There are only two other recursive-call cases. One is yyl_fake_eof(), which
as far as I can tell is never called repeatedly within a single file; this
seems safe.

The other is yyl_eol(). It has exactly two distinct return paths, so this
commit moves the retry logic into its yyl_try() caller.

With this change, we no longer seem to trigger call-stack overflow.

Closes #17220

17 months agotoke.c: delete unused bof parameters
Aaron Crane [Fri, 25 Oct 2019 14:43:00 +0000 (15:43 +0100)]
toke.c: delete unused bof parameters

17 months agotoke.c: don't pass around a copy of PL_parser->saw_infix_sigil
Aaron Crane [Fri, 25 Oct 2019 10:18:39 +0000 (11:18 +0100)]
toke.c: don't pass around a copy of PL_parser->saw_infix_sigil

There's exactly one place where we need to consult it (and that only for
producing good error messages in a specific group of term-after-term
situations).

The reason for passing it around was so that it could be reset to false
early on in the process of lexing a token, while then allowing the three
separate cases that might need to set it true to do so independently.

Instead, centralise the logic of determining when it needs to be true.

17 months agotoke.c: remove some spurious orig_keyword uses
Aaron Crane [Wed, 23 Oct 2019 21:00:47 +0000 (22:00 +0100)]
toke.c: remove some spurious orig_keyword uses

17 months agotoke.c: remove formbrack argument from yyl_try()
Aaron Crane [Wed, 23 Oct 2019 20:50:28 +0000 (21:50 +0100)]
toke.c: remove formbrack argument from yyl_try()

With this commit, yyl_try() has few enough arguments that the RETRY()
macro no longer serves any useful purpose; delete it too.

17 months agotoke.c: delete weird initial_state arg to yyl_try()
Aaron Crane [Wed, 23 Oct 2019 20:32:51 +0000 (21:32 +0100)]
toke.c: delete weird initial_state arg to yyl_try()

I thought I was going to end up using this for more stuff, but I've
found better approaches.

This commit also removes two more goto targets.

17 months agotoke.c: factor out static yyl_keylookup()
Aaron Crane [Wed, 23 Oct 2019 16:14:16 +0000 (17:14 +0100)]
toke.c: factor out static yyl_keylookup()

17 months agotoke.c: factor out static yyl_key_core() and yyl_word_or_keyword()
Aaron Crane [Wed, 23 Oct 2019 15:51:58 +0000 (16:51 +0100)]
toke.c: factor out static yyl_key_core() and yyl_word_or_keyword()

17 months agotoke.c: bundle some yyl_just_a_word() params into a struct
Aaron Crane [Wed, 23 Oct 2019 12:11:02 +0000 (13:11 +0100)]
toke.c: bundle some yyl_just_a_word() params into a struct

This makes calls to it much easier to understand.

17 months agotoke.c: factor out static yyl_just_a_word()
Aaron Crane [Wed, 23 Oct 2019 11:21:53 +0000 (12:21 +0100)]
toke.c: factor out static yyl_just_a_word()

17 months agotoke.c: stop passing around several needless local variables
Aaron Crane [Tue, 22 Oct 2019 21:49:00 +0000 (22:49 +0100)]
toke.c: stop passing around several needless local variables

I introduced these parameters as part of mechanically refactoring goto-heavy
logic into subroutines. However, they aren't actually needed through most of
the code. Even in the recursive case (in which yyl_try() or one of its
callees will call itself), we can reset the variables to zero.

17 months agotoke.c: factor out static yyl_strictwarn_bareword()
Aaron Crane [Mon, 21 Oct 2019 15:51:54 +0000 (17:51 +0200)]
toke.c: factor out static yyl_strictwarn_bareword()

17 months agotoke.c: remove the really_sub goto label
Aaron Crane [Mon, 21 Oct 2019 12:12:16 +0000 (14:12 +0200)]
toke.c: remove the really_sub goto label

This permits some additional pleasing simplifications.

17 months agotoke.c: factor out static yyl_constant_op()
Aaron Crane [Mon, 21 Oct 2019 11:55:22 +0000 (13:55 +0200)]
toke.c: factor out static yyl_constant_op()

With the removal of another goto label!

17 months agotoke.c: factor out static yyl_safe_bareword()
Aaron Crane [Mon, 21 Oct 2019 11:39:10 +0000 (13:39 +0200)]
toke.c: factor out static yyl_safe_bareword()

17 months agotoke.c: fold some initialisations into the corresponding declarations
Aaron Crane [Mon, 21 Oct 2019 11:34:33 +0000 (13:34 +0200)]
toke.c: fold some initialisations into the corresponding declarations

17 months agotoke.c: factor out static yyl_fatcomma()
Aaron Crane [Mon, 21 Oct 2019 10:43:17 +0000 (12:43 +0200)]
toke.c: factor out static yyl_fatcomma()

This removes a goto label.

17 months agotoke.c: factor out static yyl_fake_eof()
Aaron Crane [Mon, 21 Oct 2019 10:17:40 +0000 (12:17 +0200)]
toke.c: factor out static yyl_fake_eof()

17 months agoFix copy-and-paste mistake in U8TO64_LE
Matt Turner [Mon, 4 Nov 2019 00:13:48 +0000 (16:13 -0800)]
Fix copy-and-paste mistake in U8TO64_LE

Fixes: https://github.com/Perl/perl5/issues/17244
Fixes: https://github.com/Perl/perl5/issues/17247
Fixes: https://rt.cpan.org/Ticket/Display.html?id=130890

17 months agoFactor out common code from sv_derived_from_* subs family
Sergey Aleynikov [Tue, 29 Oct 2019 20:40:03 +0000 (23:40 +0300)]
Factor out common code from sv_derived_from_* subs family
into one that takes both SV*/char*+len arguments, like hv_common,
to be able to use speedups from SV* stash lookup API.

17 months agoCorrections: one grammatical; one POD formatting
James E Keenan [Sun, 3 Nov 2019 20:24:36 +0000 (15:24 -0500)]
Corrections: one grammatical; one POD formatting

17 months agoop.h: Remove obsolete #define
Karl Williamson [Sat, 2 Nov 2019 21:02:19 +0000 (15:02 -0600)]
op.h: Remove obsolete #define

This is no longer used.

17 months agotoke.c: Fix bug tr/// upgrading to UTF-8 in middle
Karl Williamson [Sat, 2 Nov 2019 19:59:38 +0000 (13:59 -0600)]
toke.c: Fix bug tr/// upgrading to UTF-8 in middle

Consider tr/\x{ff}-\x{100}/AB/.

While parsing, the code keeps an offset from the beginning of the output
to the beginning of the second number in the range.  This is purely for
speed so that it wouldn't have to re-find the beginning of that value,
when it already knew it.

But the example above shows the folly of this shortcut.  The second
number in the range causes the output to be upgraded to UTF-8, which
makes that offset invalid in general.  Change to re-find the beginning.

17 months agomathoms.c,utf8.c: Update to use UTF8_CHK_SKIP
Karl Williamson [Sun, 3 Nov 2019 17:23:05 +0000 (10:23 -0700)]
mathoms.c,utf8.c: Update to use UTF8_CHK_SKIP

This new macro expands to what these did.  Update to use the common
code.

17 months agoPATCH: Character class code broke MSWin32 compilation
Karl Williamson [Sun, 3 Nov 2019 16:50:56 +0000 (09:50 -0700)]
PATCH: Character class code broke MSWin32 compilation

I'm not sure why this didn't show up elsewhere, but we have embed.fnc
entries for non-existent functions that should have been removed in
dd1a3ba7882ca70c1e85b0fd6c03d07856672075.

In addition, I see several more functions that should have been removed,
and this commit removes them.

17 months agoFix typo
Max Maischein [Sun, 3 Nov 2019 19:44:44 +0000 (20:44 +0100)]
Fix typo

As noted by @bulk88 in #12898

17 months agoAnd silence some silly examples.
Max Maischein [Fri, 25 Oct 2019 18:20:56 +0000 (20:20 +0200)]
And silence some silly examples.

From RT88754

Adapted to the current Perl by Max Maischein

Created from https://github.com/Perl/perl5/issues/11259

17 months agoAdd explicit list of supported Perl versions and URL where to find it
Max Maischein [Sun, 3 Nov 2019 18:15:29 +0000 (19:15 +0100)]
Add explicit list of supported Perl versions and URL where to find it

This addresses the comments of @bulk88 made in #12898

17 months agoa template for vulnerability announcements
Tony Cook [Tue, 10 Dec 2013 04:42:30 +0000 (15:42 +1100)]
a template for vulnerability announcements

not that we ever make mistakes

17 months agoInversion lists are SvPOK
Karl Williamson [Sat, 2 Nov 2019 16:06:33 +0000 (10:06 -0600)]
Inversion lists are SvPOK

They always have a string, and making them this allows B to access it.

17 months agoOn OP_READLINE, OPf_SPECIAL is set for <<>>, clear for <>.
Nicholas Clark [Sat, 2 Nov 2019 21:08:48 +0000 (22:08 +0100)]
On OP_READLINE, OPf_SPECIAL is set for <<>>, clear for <>.

17 months agoUpdate perlfaq to CPAN version 5.20191102
Karen Etheridge [Sat, 2 Nov 2019 05:39:50 +0000 (22:39 -0700)]
Update perlfaq to CPAN version 5.20191102

  [DELTA]

5.20191102  2019-11-02 05:34:43Z
  * fix bad pod markup in perlfaq8 (PR #78; thanks, Joaquín Ferrero!)
  * remove stale section about lib.pm (PR #82, Dan Book)
  * update perlfaq9 to reference Email::Stuffer (PR #79, Dan Book)
  * update perlfaq9 to reference URL::Search (PR #80, Dan Book)
  * update perlfaq9 to use HTTP::Tiny (PR #81, Dan Book)
  * fix some broken links (issue #71, dctabuyz)

17 months agoignore $^H{feature/bits'} when deparsing
Tony Cook [Sat, 2 Nov 2019 03:37:29 +0000 (14:37 +1100)]
ignore $^H{feature/bits'} when deparsing

This hints hash member is used to pass the scope's feature bits to
eval, and was confusing deparse.

Since the bits are also represented as the feature_ prefixed members
of %^H, there's no need for Deparse to do anything else with them.

17 months agoRmv more deprecated characlassify/case change macros
Karl Williamson [Fri, 1 Nov 2019 01:23:09 +0000 (19:23 -0600)]
Rmv more deprecated characlassify/case change macros

These were missed by 059703b088f44d5665f67fba0b9d80cad89085fd.

17 months agoperl.c: Remove obsolete comment
Karl Williamson [Fri, 1 Nov 2019 01:42:23 +0000 (19:42 -0600)]
perl.c: Remove obsolete comment

17 months agoConsolidate uses of PERL_SMALL_MACRO_BUFFER
Karl Williamson [Fri, 1 Nov 2019 00:59:17 +0000 (18:59 -0600)]
Consolidate uses of PERL_SMALL_MACRO_BUFFER

At the moment the _ASSERT_() is the one which has been showing large
expansions.  Change so it doesn't do anything if PERL_SMALL_MACRO_BUFFER
is defined.  That means various other calls that use
PERL_SMALL_MACRO_BUFFER can be simplified to not use it.

17 months agoperldelta for removing experimental status
Karl Williamson [Fri, 1 Nov 2019 00:46:05 +0000 (18:46 -0600)]
perldelta for removing experimental status

For both script runs and alpha assertions.

17 months agoperlreref: alpha assertions are valid in (COND)
Karl Williamson [Sun, 27 Oct 2019 15:01:55 +0000 (09:01 -0600)]
perlreref: alpha assertions are valid in (COND)

17 months agoAccept experimental script_run feature
Karl Williamson [Sun, 27 Oct 2019 14:45:32 +0000 (08:45 -0600)]
Accept experimental script_run feature

17 months agoAccept experimental alpha_assertions feature
Karl Williamson [Sun, 27 Oct 2019 14:23:01 +0000 (08:23 -0600)]
Accept experimental alpha_assertions feature

17 months agoperlexperiment: Was missing vlb
Karl Williamson [Sun, 27 Oct 2019 14:17:19 +0000 (08:17 -0600)]
perlexperiment: Was missing vlb

This experimental feature didn't make it into this pod.

17 months agoperlexperiment: Remove Unicode in EBCDIC
Karl Williamson [Sun, 27 Oct 2019 14:14:10 +0000 (08:14 -0600)]
perlexperiment: Remove Unicode in EBCDIC

This looks like a stray line.  We have supported Unicode in EBCDIC for
many releases with no experimental warnings raised.

17 months agofix panic caused by printf with %n with utf8 length magic
Tony Cook [Wed, 30 Oct 2019 02:06:34 +0000 (13:06 +1100)]
fix panic caused by printf with %n with utf8 length magic

fix the reported issue with gh #17221

17 months agoadd ${^FEATURE_BITS} to perlvar.pod
Tony Cook [Mon, 28 Oct 2019 23:45:11 +0000 (10:45 +1100)]
add ${^FEATURE_BITS} to perlvar.pod

17 months agoremove now unneeded FEATURE_IS_ENABLED()
Tony Cook [Mon, 28 Oct 2019 19:57:29 +0000 (06:57 +1100)]
remove now unneeded FEATURE_IS_ENABLED()

17 months agoFaster feature checks
Tony Cook [Thu, 24 Oct 2019 18:26:53 +0000 (05:26 +1100)]
Faster feature checks

Perform only a bit check instead of a much more expensive hash
lookup to test features.

For now I've just added a U32 to the cop structure to store the bits,
if we need more we could either add more bits directly, or make it a
pointer.

We don't have the immediate need for a pointer that warning do since
we don't dynamically add new features during compilation/runtime.

The changes to %^H are retained so that caller() can be used from perl
code to check the features enabled at a given caller's scope.

17 months agoMake me as doing the business for 20th November
Chris 'BinGOs' Williams [Wed, 30 Oct 2019 17:38:02 +0000 (17:38 +0000)]
Make me as doing the business for 20th November

17 months agoMention Termux in README.android
Richard Leach [Mon, 20 May 2019 01:37:04 +0000 (01:37 +0000)]
Mention Termux in README.android

17 months agoremove CONSERVATIVE and LIBERAL
Tomasz Konojacki [Tue, 29 Oct 2019 16:33:00 +0000 (17:33 +0100)]
remove CONSERVATIVE and LIBERAL

These constants were undocumented and don't do anything useful.
Saving a few kilobytes of memory doesn't justify the complexity
caused by adding a new build flag.

All platforms except 64-bit Windows were using LIBERAL. It's not
clear why win64 was using -DCONSERVATIVE, but removing it doesn't
break anything.

[gh #17232]

17 months agouse PTR2nat() instead of casting pointers to unsigned long
Tomasz Konojacki [Tue, 29 Oct 2019 15:31:19 +0000 (16:31 +0100)]
use PTR2nat() instead of casting pointers to unsigned long

Casting a pointer to unsigned long will result in truncation when
sizeof(void*) > sizeof(unsigned long)

[gh #17232]

17 months agoChange the names of some regnodes
Karl Williamson [Mon, 30 Sep 2019 02:55:45 +0000 (20:55 -0600)]
Change the names of some regnodes

The new name is shorter and I believe, clearer.

17 months agoregcomp.c: Comments, white-space only
Karl Williamson [Mon, 30 Sep 2019 02:47:46 +0000 (20:47 -0600)]
regcomp.c: Comments, white-space only

17 months agoregcomp.c: Avoid reparsing a node
Karl Williamson [Mon, 30 Sep 2019 02:41:10 +0000 (20:41 -0600)]
regcomp.c: Avoid reparsing a node

When it's determined that the final character of a node really should
be in the next node to avoid splitting a multi-character fold, the node
is refilled from scratch, setting an upper limit of how far to go just
before that character.

This commit changes to avoid that reparsing and refilling if just the
final character has to be omitted.  If the node has to be backed up two
or more characters, the reparsing is still done.  The technique in this
commit could be extended to avoid those, but doing it generally is
complicated, and doing it the way this commit does gets more and more
cumbersome, and the odds rapidly get smaller of needing to do more than
what I've done here.

17 months agoDummy commit to test perl5-changes notifications
Todd Rinaldo [Tue, 29 Oct 2019 20:34:46 +0000 (15:34 -0500)]
Dummy commit to test perl5-changes notifications

17 months agoTie::StdHandle::BINMODE: handle layer argument
Hauke D [Mon, 20 Nov 2017 14:31:57 +0000 (15:31 +0100)]
Tie::StdHandle::BINMODE: handle layer argument

Fixes #16262

BINMODE was not handling the LAYER argument.
Also bump the version number.

(cherry picked from commit 479d04b98e5b747e5c9ead7368d3e132f524a2b7)
Signed-off-by: Nicolas R <atoomic@cpan.org>
17 months agofix the type of orig_keyword to match the only caller
Tony Cook [Mon, 28 Oct 2019 23:30:31 +0000 (10:30 +1100)]
fix the type of orig_keyword to match the only caller

fixes gh #17226

17 months agoreinstate the [perl #129069] fix reverted by f190a1be6aa
Tony Cook [Mon, 28 Oct 2019 21:29:41 +0000 (08:29 +1100)]
reinstate the [perl #129069] fix reverted by f190a1be6aa

fixes gh #17223

17 months agoUpgrade Scalar-List-Utils from version 1.52 to 1.53
Steve Hay [Mon, 28 Oct 2019 13:14:36 +0000 (13:14 +0000)]
Upgrade Scalar-List-Utils from version 1.52 to 1.53

17 months agoUpgrade Pod::Simple from version 3.39 to 3.40
Steve Hay [Mon, 28 Oct 2019 08:23:46 +0000 (08:23 +0000)]
Upgrade Pod::Simple from version 3.39 to 3.40

17 months agoUpgrade Math::BigInt from version 1.999817 to 1.999818
Steve Hay [Mon, 28 Oct 2019 08:13:21 +0000 (08:13 +0000)]
Upgrade Math::BigInt from version 1.999817 to 1.999818

17 months agowin32: separate $Config{ccflags} and $Config{optimize}
Tomasz Konojacki [Sat, 26 Oct 2019 21:17:18 +0000 (23:17 +0200)]
win32: separate $Config{ccflags} and $Config{optimize}

Optimization flags don't belong in $Config{ccflags}, while
defines and CRT flags don't belong in $Config{optimize}.

This change makes overriding optimization flags in Makefile.PL
and Build.PL on win32 just as easy as on unix-likes.

Additionally, don't define NDEBUG, perl.h already takes care of
that.

(gh #17156)

17 months agoAdd epigraph for 5.30.1-RC1
Steve Hay [Sun, 27 Oct 2019 16:42:53 +0000 (16:42 +0000)]
Add epigraph for 5.30.1-RC1

17 months ago5.30.1-RC1 today
Steve Hay [Sun, 27 Oct 2019 11:53:54 +0000 (11:53 +0000)]
5.30.1-RC1 today

17 months agoUpdate release schedule
Steve Hay [Sun, 27 Oct 2019 11:53:40 +0000 (11:53 +0000)]
Update release schedule

Aim for a fortnight's time for 5.30.1 after RC1 today
Aim for 5.30.2 RC1 in late February, releasing in early March

17 months agoPATCH: [perl 134335], gh115,Assert fail in regmatch
Karl Williamson [Fri, 23 Aug 2019 19:00:49 +0000 (13:00 -0600)]
PATCH: [perl 134335], gh115,Assert fail in regmatch

This happens when the regular expression pattern, compiling under /il,
ends up with a node attempting to match one of 17 Unicode characters
that fold (/i) to multiple characters in the 0-FF range, and the match
is run when a UTF-8 locale is in effect that makes such a match legal.
The node was being marked as SIMPLE, but only nodes that match a single
character should be SIMPLE.

This ticket was originally filed as a security issue, but I don't think
it is.  If I remove the assertion, the match fails, without an
out-of-bounds access.  And we do not consider the interpreter crashing
on a DEBUGGING build a security issue.

17 months agoperlguts: Fix up UTF8fARG docs
Karl Williamson [Sat, 26 Oct 2019 17:02:36 +0000 (11:02 -0600)]
perlguts: Fix up UTF8fARG docs

The example was missing a percent, and note that in order to
successfully output UTF-8, the filehandle must be expecting it.

17 months agoFix up apidoc entries for isFOO_utf8()
Karl Williamson [Sat, 26 Oct 2019 16:49:22 +0000 (10:49 -0600)]
Fix up apidoc entries for isFOO_utf8()

These were recently changed to take a second parameter, but the docs did
not change to correspond.