This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perl5.git
10 years agoperl.h: Don't pollute global namespace
Karl Williamson [Thu, 15 Aug 2013 16:36:29 +0000 (10:36 -0600)]
perl.h: Don't pollute global namespace

These structures are used internally in the regular expression files,
and are declared here only because of #include ordering issues.  Wrap
them in an #ifdef so only visible to the correct files.

10 years agoMake typedef fully typedef
Karl Williamson [Thu, 15 Aug 2013 03:13:52 +0000 (21:13 -0600)]
Make typedef fully typedef

The regcomp.c struct RExC_state_t has not been usable fully as a
typedef, requiring the 'struct' at times.  This has caused me, and I
presume others, wasted time when we forget to use it under those
circumstances when it should be used, but it's never been a big enough
issue to cause me to spend tuits on it.  But, working on something else,
I finally came to the realization of what the problem is.  It is because
proto.h is #included before regcomp.h is, and so functions that are
declared in proto.h that have something that is a RExC_state_t as a
parameter don't know that it is a typedef because that is defined in
regcomp.h.  A way around this is already used for other similar
structures, and that is to declare them in perl.h which is always read
in before proto.h, leaving the definitions to regcomp.h.  Thus proto.h
knows enough to compile.

The structure was already declared in perl.h; just not typedef'd.
Otherwise proto.h would not know about it at all.  This patch moves two
regcomp.c related declarations in perl.h to the same section as the
others, and changes the one for RExC_state_t to be a typedef.  All the
'struct' uses are removed.

10 years agoregcomp.h: Create new typedef synonym for clarity
Karl Williamson [Wed, 14 Aug 2013 17:39:38 +0000 (11:39 -0600)]
regcomp.h: Create new typedef synonym for clarity

This commit finishes (at least for now) removing some of the overloading
of the term class.  A 'regnode_charclass_class' node contains space for
storing the posix classes it matches that are never defined until the
moment of matching because they are subject to the current run-time
locale.  This commit creates a typedef 'regnode_charclass_posixl'
synonym that doesn't re-use the term 'class' for two different purposes.

10 years agoregcomp.h: Parenthesize macro formal parameter
Karl Williamson [Fri, 9 Aug 2013 18:21:53 +0000 (12:21 -0600)]
regcomp.h: Parenthesize macro formal parameter

Not doing so can cause problems, so it is standard procedure to
parenthesize all parameters within a macro definition.

10 years agoregcomp.h: Add better named synonyms
Karl Williamson [Fri, 9 Aug 2013 17:51:09 +0000 (11:51 -0600)]
regcomp.h: Add better named synonyms

This continues the process started two commits ago of removing some of
the overloading of the term 'class'.

In this case, this commit adds some #defines referring to the portions
of the regnode associated with bracketed character classes, the ANYOF
node.  Specifically those portions that deal with the Posix character
classes, like \w and [:punct:] under /l (locale) matching are renamed
substituting POSIXL for CLASS.  POSIXL is already used for POSIX-related
things under /l.  I remember being terribly confused when I started
reading this code about this.  One had a class within a class.  This
should clarify things somewhat.

The old names are retained in case files outside the core #include and
use it (there are a few such in cpan).

10 years agoregcomp.c: Clarify comment
Karl Williamson [Sun, 15 Sep 2013 00:57:26 +0000 (18:57 -0600)]
regcomp.c: Clarify comment

This continues the process of removing some overloading of the word
'class', by changing this comment to use 'bracketed class', and
re-wrapping

10 years agoregcomp.h: Move #define
Karl Williamson [Wed, 7 Aug 2013 03:41:53 +0000 (21:41 -0600)]
regcomp.h: Move #define

This moves it to be adjacent to similar #defines

10 years agoregcomp.c: Change names of some static functions
Karl Williamson [Wed, 14 Aug 2013 17:19:18 +0000 (11:19 -0600)]
regcomp.c: Change names of some static functions

The term 'class' is very overloaded in regex code and documentation.
perlrecharclass.pod calls the dot (matching any char) a class, and
calls the [] form "bracketed character classes".  There are other
meanings as well.  This is the first commit in a short series that
removes some of those overloadings.

One instance of class is the "synthetic start class", generated by the
regex optimizer to be a list of all the code points a sucessful match
could possibly start with.  This is useful in more quickly finding where
to start looking in matching against a target string.  Prior to this
commit, the routines that referred to this began with 'cl_', and the
formal parameters were 'cl', which could mean any class.  This commit
changes those instances of 'cl' to 'ssc' to indicate this is the only
type of class that is being handled.

10 years agoregcomp.c: Rework static function call; comments
Karl Williamson [Wed, 14 Aug 2013 16:01:53 +0000 (10:01 -0600)]
regcomp.c: Rework static function call; comments

The previous commit just extracted out code into a function.  This
commit renames a parameter for clarity, combines two parameters to make
the interface cleaner, and adds and moves comments around.

10 years agoregcomp.c: Extract code into separate function
Karl Williamson [Wed, 14 Aug 2013 17:09:58 +0000 (11:09 -0600)]
regcomp.c: Extract code into separate function

A future commit will use this functionality from a second place.  For
now, just cut and paste, and do the minimal ancillary work to get it to
compile and pass.

10 years agoregcomp.c: Use PL_sv_undef instead of NULL in an AV
Karl Williamson [Fri, 2 Aug 2013 18:33:07 +0000 (12:33 -0600)]
regcomp.c: Use PL_sv_undef instead of NULL in an AV

The NULL gets turned into an SVt_NULL anyway.  This array is read only
by S_core_regclass_swash() in regexec.c.  That uses an SvROK, so it
doesn't have to change.

This commit also beefs up the comments around this operation

10 years agoAdd regnode struct for synthetic start class
Karl Williamson [Thu, 1 Aug 2013 20:49:29 +0000 (14:49 -0600)]
Add regnode struct for synthetic start class

As part of extending the regular expression optimizer to properly handle
above Latin1 code points, I need an inversion list to contain which code
points the synthetic start class (ssc) matches.

The ssc currently is the same as a locale-aware ANYOF node, which uses
the struct of a regular ANYOF node, plus some extra fields at the end.

This commit creates a new typedef for ssc use, which is the locale-aware
ANYOF node, plus an extra SV* at the end to hold the inversion list.

10 years agoregcomp.c: Move a #define, add a similar one
Karl Williamson [Thu, 25 Jul 2013 01:56:24 +0000 (19:56 -0600)]
regcomp.c: Move a #define, add a similar one

Future commits will use this #define (and the new one) earlier in the
file than currently defined.

10 years agoAdd inversion list for U+80 - U+FF
Karl Williamson [Tue, 23 Jul 2013 16:01:29 +0000 (10:01 -0600)]
Add inversion list for U+80 - U+FF

This is the upper half of the Latin1 range.  This simplifies some code
very slightly, but will be of use in future commits.

10 years agoregcomp.c: Extract code into separate function
Karl Williamson [Mon, 22 Jul 2013 03:13:38 +0000 (21:13 -0600)]
regcomp.c: Extract code into separate function

This is in preparation for it to be called from more than one place, in
a future commit.

10 years agoregcomp.c: Remove redundant matching possibilities
Karl Williamson [Sun, 21 Jul 2013 16:10:56 +0000 (10:10 -0600)]
regcomp.c: Remove redundant matching possibilities

The flag ANYOF_UNICODE_ALL is for performance.  It is set when the
inversion list for the ANYOF node includes every code point above
Latin1, and avoids runtime searching through the list.  We don't need
both, as the flag being set short-circuits even looking at the other
list.  By removing the code points from the list, we perhaps will get
rid of the list entirely, thus saving some operations, or will shorten
it so that later binary searches run faster.

10 years agoregcomp.c: Centralize assignment
Karl Williamson [Sun, 21 Jul 2013 14:21:34 +0000 (08:21 -0600)]
regcomp.c: Centralize assignment

It's better to do something in one common place than two.  This properly
initializes the regex opcode for the synthetic start class when it is
created, rather than at the end where the code has to be repeated to get
all instances.

10 years agoperlreguts: Bring up-to-date
Karl Williamson [Fri, 13 Sep 2013 01:42:51 +0000 (19:42 -0600)]
perlreguts: Bring up-to-date

Various changes have been made to regcomp.c that didn't make it into
perlreguts until now.

10 years agoperlreguts.pod: Nits
Karl Williamson [Fri, 13 Sep 2013 00:03:19 +0000 (18:03 -0600)]
perlreguts.pod: Nits

10 years agoregcomp.c: Convert another I32 to SSize_t
Karl Williamson [Sat, 14 Sep 2013 19:17:21 +0000 (13:17 -0600)]
regcomp.c: Convert another I32 to SSize_t

This code is normally #ifdef'd out, and so was missed in the earlier
conversions, commit ed56dbcb51c55e631d5f4931f88efe008e5349c4.

10 years agoConsistently use __sun to identify SunOS
Brian Fraser [Wed, 11 Sep 2013 19:57:57 +0000 (16:57 -0300)]
Consistently use __sun to identify SunOS

The core mostly used __sun already, but '__sun__' and 'sun' were
also present.

10 years agoperl.h: Comment was mistakenly passed to the preprocessor
Brian Fraser [Wed, 11 Sep 2013 19:51:01 +0000 (16:51 -0300)]
perl.h: Comment was mistakenly passed to the preprocessor

This was a typo introduced in 27da23d5

10 years agoperl.h: STMT_START/END don't need a special case for suncc anymore
Brian Fraser [Wed, 11 Sep 2013 19:49:37 +0000 (16:49 -0300)]
perl.h: STMT_START/END don't need a special case for suncc anymore

10 years agoRemoved the define for FCALL
Brian Fraser [Mon, 9 Sep 2013 23:37:24 +0000 (20:37 -0300)]
Removed the define for FCALL

This is a leftover from the PERL_OBJECT days; These days it was only
used on one spot and did nothing useful.

10 years ago[PATCH] Fixed bug where is_core assumed linear release sequence
Neil Bowers [Mon, 23 Sep 2013 22:35:18 +0000 (23:35 +0100)]
[PATCH] Fixed bug where is_core assumed linear release sequence

If you specified a version of the module, is_core has to track through
releases, as the %delta data structure only records where a module
version number changes in core, not every module version number in every release.
I was naively trawling the releases in numerical order, but %delta includes
information that let's you construct the release tree.

This fix only traverses the branch of the overall release tree that leads
to the specified Perl release. Further explanation and example in blog post:

    http://neilb.org/2013/09/21/adding-is-core.html

Signed-off-by: Chris 'BinGOs' Williams <chris@bingosnet.co.uk>
10 years agoUpdate ExtUtils-MakeMaker to CPAN version 6.78
Chris 'BinGOs' Williams [Mon, 23 Sep 2013 17:27:33 +0000 (18:27 +0100)]
Update ExtUtils-MakeMaker to CPAN version 6.78

  [DELTA]

6.78 Mon Sep 23 13:44:39 BST 2013

    No changes from 6.77_08

6.77_08 Sun Sep 22 18:43:23 BST 2013
    New feature:
    * Made UNINST an attribute, so removing shadowed modules
      can be set 'perl Makefile.PL UNINST=1'

6.77_07 Sat Sep 21 09:44:19 BST 2013
    Bug fixes:
    * do not set default switches in Test::Harness; not even -w

6.77_06 Thu Sep 19 15:36:59 BST 2013
    Dist fixes:
    * Previous tarball was corrupted

6.77_05 Thu Sep 19 14:09:00 BST 2013
    Bug fixes:
    * Fix 3 more tests to work in parallel. Now works with HARNESS_OPTIONS=j64

6.77_04 Wed Sep 18 19:23:38 BST 2013
    Bug fixes:
    * Fixed PERL_SRC for core tests after parallelisation
      enhancements were made in 6.77_01

6.77_03 Mon Sep 16 12:20:25 BST 2013
    VMS fixes:
    * CCFLAGS may have appendages not from PERL_MM_OPT

6.77_02 Thu Sep 12 21:21:12 BST 2013
    Bug fixes:
    * Support 'perl' as a PREREQ_PM target
    * RT#77029 Support linefeeds in abstract parsing
    * Skip some tests when cross-compiling core

6.77_01 Tue Sep 10 15:20:42 BST 2013
    Bug fixes:
    * RT#7248 warn if NAME is not valid package name
    * Perl#36539 reverse search order for finding perl
    * parse_version() should work with taint mode now
    * RT#69590 enable tests to be run in parallel

10 years agodocument fixing of #119927 (localizing $\) in 5.18.0
Ricardo Signes [Mon, 23 Sep 2013 15:52:47 +0000 (11:52 -0400)]
document fixing of #119927 (localizing $\) in 5.18.0

10 years agoUpgrade podlators from 2.5.1 to 2.5.2
Steve Hay [Mon, 23 Sep 2013 08:10:11 +0000 (09:10 +0100)]
Upgrade podlators from 2.5.1 to 2.5.2

This incorporates CPAN RT #87440.

10 years agoAnother faulty padrange assumption
Father Chrysostomos [Sat, 21 Sep 2013 21:03:38 +0000 (14:03 -0700)]
Another faulty padrange assumption

Commit 7601007 was not sufficient.  There are two places where the
padrange optimisation tries to combine multiple padranges.

When a padrange op is created in rpeep, the code first checks whether
the previous op is already a padrange, so the two can be combined, as
in this case:

    my ($a,$b,$c);
    my ($d,$e,$f);

Then the code checks whether it can swallow up any singletons follow-
ing it, optimising cases like this:

    my ($v,$w,$x);
    my $y;

Commit 7601007 fixed the latter, which was assuming that $x and $y
would have contiguous pad offsets.

This commit fixes the former code, which assumed $c and $d would have
contiguous offsets.

This was causing assertion failures or crashes for Devel::CallParser
0.001 (0.002 works around it), because Devel::CallParser creates new
pad entries when the second ‘my’ keyword is encountered, causing the
pad offsets not to be contiguous.

10 years agoperl5200delta: Remove Data::Alias from Known Problems
Father Chrysostomos [Sat, 21 Sep 2013 15:46:09 +0000 (08:46 -0700)]
perl5200delta: Remove Data::Alias from Known Problems

1.18 has just been released and works with bleadperl.

10 years agoRemove bad assertion in gv.c:newGP
Father Chrysostomos [Sat, 21 Sep 2013 14:43:12 +0000 (07:43 -0700)]
Remove bad assertion in gv.c:newGP

See the thread starting at
<20130805090753.12203.qmail@lists-nntp.develooper.com>.

Under the assumption that PL_curcop could never be null in newGP (even
when set to null by S_cop_free in op.c), I added an assertion to
newGP, which still leaving the null checks in place.  The idea was
that, if PL_curcop is ever null there, we want to know about it, since
it is probably a bug.

It turns out this code (reduced from DBIx::Class’s test suite), can
fail that assertion:

INIT {
  bless {} and exit;
}

exit() calls leave_scope, which frees the INIT block.  Since PL_curcop
(the statement inside INIT) would end up pointing to free memory, it
is set to null.  When it exits, call_sv does FREETMPS:

case 2:
    /* my_exit() was called */
    SET_CURSTASH(PL_defstash);
    FREETMPS;
    JMPENV_POP;
    my_exit_jump();
    assert(0); /* NOTREACHED */

FREETMPS ends up freeing the object (bless {}), which results
in a DESTROY method lookup.  For the sake of caching methods,
*main::DESTROY is autovivified.  GV creation trips on the assertion in
newGP that makes sure PL_curcop is null.

So this proves that we really do need to check for a null
PL_curcop in newGP.

While we could avoid having DESTROY lookup vivify *main::DESTROY
(since the cache there would only be used for explicit ->DESTROY
calls, the usual DESTROY cache being stuffed into SvSTASH(stash)),
that would complicate things for no gain.

10 years agoperl5194delta: Link to % slice docs in perldata
Father Chrysostomos [Sat, 21 Sep 2013 14:12:10 +0000 (07:12 -0700)]
perl5194delta: Link to % slice docs in perldata

10 years agoTest that ${foo{bar}} and ${\nfoo{bar}} mean the same thing.
Brian Fraser [Sat, 21 Sep 2013 13:30:48 +0000 (10:30 -0300)]
Test that ${foo{bar}} and ${\nfoo{bar}} mean the same thing.

This was changed to consistently parse as $foo{bar} in a49b10d0a8.
Previously, it would parse to either that or ${(foo {bar})},
depending on the presence of newlines, and the existence of a
sub foo with prototype (&).

10 years agoUp the version of File::Spec from 3.44 to 3.45
Brian Fraser [Sat, 21 Sep 2013 12:24:20 +0000 (09:24 -0300)]
Up the version of File::Spec from 3.44 to 3.45

Commit adf4621acac did this for Cwd.pm. but not for File::Spec and
family, which belong to the same distribution.

10 years agoUpgrade autodie from version 2.21 to 2.22
Steve Hay [Sat, 21 Sep 2013 12:09:54 +0000 (13:09 +0100)]
Upgrade autodie from version 2.21 to 2.22

This has no installed code changes, but incorporates CPAN RT#88444 (but not
yet CPAN RT #87237).

10 years agoRemoved the ifdefs for INCOMPLETE_TAINTS
Brian Fraser [Fri, 6 Sep 2013 01:05:38 +0000 (22:05 -0300)]
Removed the ifdefs for INCOMPLETE_TAINTS

This was added in 5.5/5.6 as a backwards-compatibility measure
when taint was extended to happen in more places.

10 years agoRemoved the define for ISHISH
Brian Fraser [Sat, 21 Sep 2013 08:06:59 +0000 (05:06 -0300)]
Removed the define for ISHISH

Each platform defined their own name in ISHISH. However, nothing
used it, and the list of platforms was severely lacking.

10 years agoRemoved an ifdef for IS_UTF8_CHAR in utf8.c
Brian Fraser [Sat, 7 Sep 2013 03:31:36 +0000 (00:31 -0300)]
Removed an ifdef for IS_UTF8_CHAR in utf8.c

IS_UTF8_CHAR is defined by utf8.h, so this is always defined.
In fact, later in utf8.c we use it again, this time without the
ifdef.

10 years agoRemoved HAS_SOCKET__bad_code_maybe
Brian Fraser [Fri, 6 Sep 2013 17:34:56 +0000 (14:34 -0300)]
Removed HAS_SOCKET__bad_code_maybe

10 years agoRemoved the use of SPARC64_GCC_WORKAROUND
Brian Fraser [Fri, 6 Sep 2013 13:50:25 +0000 (10:50 -0300)]
Removed the use of SPARC64_GCC_WORKAROUND

As the name implies, this worked around a bug in gcc, particularly,
gcc 2.x, in SPARC64.  No longer relevant.

10 years agoReplaced the last use of HAS_GNULIBC with __GLIBC__
Brian Fraser [Fri, 6 Sep 2013 13:38:08 +0000 (10:38 -0300)]
Replaced the last use of HAS_GNULIBC with __GLIBC__

10 years agoRemoved DUMP_FDS and dump_fds()
Brian Fraser [Fri, 6 Sep 2013 01:32:05 +0000 (22:32 -0300)]
Removed DUMP_FDS and dump_fds()

If perl was compiled with -DDUMP_FDS, it would define dump_fds
and add it to the API, although even then nothing used it.
dump_fds() itself was buggy, only checking for fds 0 through 32.

10 years agoRemoved the ifdefs for BUGGY_MSC and BUGGY_MSC6
Brian Fraser [Fri, 6 Sep 2013 01:29:02 +0000 (22:29 -0300)]
Removed the ifdefs for BUGGY_MSC and BUGGY_MSC6

These are leftovers from the perl 4 era config.h.

10 years agoReplaced an ifdef for sv_dup with USE_ITHREADS
Brian Fraser [Fri, 6 Sep 2013 01:25:25 +0000 (22:25 -0300)]
Replaced an ifdef for sv_dup with USE_ITHREADS

10 years agoperl.h: Always unconditionally include sys/types.h
Brian Fraser [Fri, 6 Sep 2013 01:24:46 +0000 (22:24 -0300)]
perl.h: Always unconditionally include sys/types.h

10 years agoRemoved OP_IN_REGISTER and related defines.
Brian Fraser [Fri, 6 Sep 2013 01:16:50 +0000 (22:16 -0300)]
Removed OP_IN_REGISTER and related defines.

Added as an experiment in 462e5cf6, it never quite worked, and
recently wasn't even using registers.

10 years agoRemoved the ifdefs for __SC__ in toke.c
Brian Fraser [Fri, 6 Sep 2013 00:59:19 +0000 (21:59 -0300)]
Removed the ifdefs for __SC__ in toke.c

10 years agoRemoved the ifdef & define for VDf
Brian Fraser [Fri, 6 Sep 2013 00:58:06 +0000 (21:58 -0300)]
Removed the ifdef & define for VDf

This remained only for compatibility with CPAN, but nothing there
uses it.

10 years agoRemoved the ifdef for FPUTS_BOTCH
Brian Fraser [Sat, 31 Aug 2013 01:47:31 +0000 (22:47 -0300)]
Removed the ifdef for FPUTS_BOTCH

This enabled a workaround for fputs on SunOS 4.0.1 and 4.0.2,
SunOS 4.1.x and later do not have the problem.

10 years agoRemove the ifdefs for ULTRIX_STDIO_BOTCH
Brian Fraser [Sat, 31 Aug 2013 01:40:46 +0000 (22:40 -0300)]
Remove the ifdefs for ULTRIX_STDIO_BOTCH

Not only has Ultrix been long out of support, this ifdef was
working around a bug particular to Ultrix 1.2.

10 years agoRemove an ifdef for the Harris HCX-9 froms sv.c
Brian Fraser [Fri, 30 Aug 2013 23:52:21 +0000 (20:52 -0300)]
Remove an ifdef for the Harris HCX-9 froms sv.c

Historical cruft.

10 years agoRemove HAS_64K_LIMIT
Brian Fraser [Fri, 30 Aug 2013 23:25:12 +0000 (20:25 -0300)]
Remove HAS_64K_LIMIT

This was only defined for MSDOS if not using DJGPP.  We've long
since dropped support for that, so this define and related code
can go.

10 years agoRemoved an '#ifdef COMMENTARY' in toke.c
Brian Fraser [Sat, 7 Sep 2013 03:37:19 +0000 (00:37 -0300)]
Removed an '#ifdef COMMENTARY' in toke.c

This was added as a micro-optimiaztion twenty years ago.

10 years agotoke.c: Remove a cargo-culted #undef CLINE
Brian Fraser [Fri, 30 Aug 2013 21:38:05 +0000 (18:38 -0300)]
toke.c: Remove a cargo-culted #undef CLINE

10 years agoRemove a '#undef ff_next' remnant from ages past.
Brian Fraser [Fri, 30 Aug 2013 21:02:45 +0000 (18:02 -0300)]
Remove a '#undef ff_next' remnant from ages past.

This was discussed long ago on the list but never actually removed:
http://www.nntp.perl.org/group/perl.perl5.porters/2001/01/msg29492.html

10 years agoregcomp.c: Remove the last usage of NO_UNARY_PLUS
Brian Fraser [Fri, 30 Aug 2013 20:37:27 +0000 (17:37 -0300)]
regcomp.c: Remove the last usage of NO_UNARY_PLUS

This was set for some VMS variants in 5.005, but has since been
excised from vmsish.h.  The ifdef in regcomp was a leftover.

10 years agoregcomp.c: Remove a cargo-culted #undef SPSTART
Brian Fraser [Fri, 30 Aug 2013 20:36:46 +0000 (17:36 -0300)]
regcomp.c: Remove a cargo-culted #undef SPSTART

10 years agoregcomp.c: Remove a #undef op
Brian Fraser [Fri, 30 Aug 2013 20:25:10 +0000 (17:25 -0300)]
regcomp.c: Remove a #undef op

10 years agoregcomp.c: Remove a useless use of I_STDARG
Brian Fraser [Fri, 30 Aug 2013 17:42:40 +0000 (14:42 -0300)]
regcomp.c: Remove a useless use of I_STDARG

10 years agoModule::CoreList export %delta and document it
Chris 'BinGOs' Williams [Sat, 21 Sep 2013 10:35:07 +0000 (11:35 +0100)]
Module::CoreList export %delta and document it

10 years agotest that $\ is localized and restored even if it was undef
Ricardo Signes [Sat, 21 Sep 2013 05:51:36 +0000 (14:51 +0900)]
test that $\ is localized and restored even if it was undef

This was broken before 4bac9ae47b5ad7845a24e26b0e95609805de688a
but there is no test, and it is not clear that we knew about
the bug or the fix.

10 years agoRMG - Add a note about merging the release branch back into blead
Steve Hay [Sat, 21 Sep 2013 00:05:11 +0000 (01:05 +0100)]
RMG - Add a note about merging the release branch back into blead

I was momentarily confused and almost did the wrong thing when I saw that
"git merge release-5.19.4" had produced a merge commit (71d5a36340),
whereas the merge of 5.19.3 a month ago did not (see f865d60069).

The cause was simply that a change (ac239e1c3e) had been pushed to blead
since I'd created the release branch, which had not happened when merging
the 5.19.3 release branch last month.

10 years agoOptimise if/unless wrt OP_AND/OP_OR/OP_DOR. Also optimise OP_OR/OP_DOR chains.
Matthew Horsfall (alh) [Thu, 19 Sep 2013 23:18:48 +0000 (19:18 -0400)]
Optimise if/unless wrt OP_AND/OP_OR/OP_DOR. Also optimise OP_OR/OP_DOR chains.

An OP_AND/OP_OR/OP_DOR in void context provides a short circuit
through ->op_other that can be used if AND/OR/DOR ops contained
within it jump out early. Use that short circuit.

Previously:

  $ ./perl -Ilib -MO=Concise -e 'if ($aa || $bb) {}'
  8  <@> leave[1 ref] vKP/REFC ->(end)
  1     <0> enter ->2
  2     <;> nextstate(main 3 -e:1) v:{ ->3
  -     <1> null vK/1 ->8
  6        <|> and(other->7) vK/1 ->8
  -           <1> null sK/1 ->6
  4              <|> or(other->5) sK/1 ->6              <-- Not optimised
  -                 <1> ex-rv2sv sK/1 ->4
  3                    <$> gvsv(*aa) s ->4
  -                 <1> ex-rv2sv sK/1 ->-
  5                    <$> gvsv(*bb) s ->6
  -           <@> scope vK ->-
  7              <0> stub v ->8

Now:

  $ ./perl -Ilib -MO=Concise -e 'if ($aa || $bb) {}'
  8  <@> leave[1 ref] vKP/REFC ->(end)
  1     <0> enter ->2
  2     <;> nextstate(main 3 -e:1) v:{ ->3
  -     <1> null vK/1 ->8
  6        <|> and(other->7) vK/1 ->8
  -           <1> null sK/1 ->6
  4              <|> or(other->5) sK/1 ->7               <-- Short circuited
  -                 <1> ex-rv2sv sK/1 ->4
  3                    <$> gvsv(*aa) s ->4
  -                 <1> ex-rv2sv sK/1 ->-
  5                    <$> gvsv(*bb) s ->6
  -           <@> scope vK ->-
  7              <0> stub v ->8

10 years ago[perl #3112] Stop last from returning values
Father Chrysostomos [Fri, 20 Sep 2013 08:34:31 +0000 (01:34 -0700)]
[perl #3112] Stop last from returning values

In push @a, last, it can try to return the @a, copying it like a sca-
lar in the process, resulting in Bizarre copy of ARRAY in last.

In do{{&{sub{"Just another Perl hacker,\n"}},last}}, it returns "Just
another Perl hacker,\n".

The former is clearly a bug.  The latter depends on a side-effect of
the same bug.

‘last’ really should not be trying to return the values that the same
statement has accumulated so far.

10 years agocorelist.pl - Fix the addition of a new perl release following 9f92b9bec5
Steve Hay [Fri, 20 Sep 2013 18:37:27 +0000 (19:37 +0100)]
corelist.pl - Fix the addition of a new perl release following 9f92b9bec5

Now that the check is working, it was working slightly too well and actually
picked up 5.019005 in the %delta because that had been added already and
thus didn't add it to %released when it should have done!

One simple fix is to move the processing of %released so that it's done
first, which makes sense since it appears first in the file anyway.

10 years agoPrepare Module::CoreList for 5.19.5 and bump its $VERSION
Steve Hay [Fri, 20 Sep 2013 18:14:58 +0000 (19:14 +0100)]
Prepare Module::CoreList for 5.19.5 and bump its $VERSION

10 years agoModule::CoreList 2.99 is now on CPAN
Steve Hay [Fri, 20 Sep 2013 17:47:20 +0000 (18:47 +0100)]
Module::CoreList 2.99 is now on CPAN

10 years agoBump version for 5.19.5
Steve Hay [Fri, 20 Sep 2013 16:55:41 +0000 (17:55 +0100)]
Bump version for 5.19.5

10 years agoAdd new perldelta for 5.19.5
Steve Hay [Fri, 20 Sep 2013 16:49:09 +0000 (17:49 +0100)]
Add new perldelta for 5.19.5

10 years agoAdd 5.19.4 epigraph
Steve Hay [Fri, 20 Sep 2013 16:37:04 +0000 (17:37 +0100)]
Add 5.19.4 epigraph

10 years agoMerge branch 'release-5.19.4' into blead
Steve Hay [Fri, 20 Sep 2013 16:08:18 +0000 (17:08 +0100)]
Merge branch 'release-5.19.4' into blead

10 years agoUse hv_fetch_ent() instead of hv_fetch() in S_finalize_op().
Nicholas Clark [Fri, 20 Sep 2013 13:16:09 +0000 (15:16 +0200)]
Use hv_fetch_ent() instead of hv_fetch() in S_finalize_op().

This makes the source code slightly shorter and clearer, and the object code
smaller.

10 years agoUpdate perlhist for Perl 5.19.4 v5.19.4
Steve Hay [Fri, 20 Sep 2013 08:54:22 +0000 (09:54 +0100)]
Update perlhist for Perl 5.19.4

10 years agoFinalize perldelta
Steve Hay [Fri, 20 Sep 2013 08:52:20 +0000 (09:52 +0100)]
Finalize perldelta

10 years agoUpdate Module::CoreList for Perl 5.19.4
Steve Hay [Fri, 20 Sep 2013 08:30:04 +0000 (09:30 +0100)]
Update Module::CoreList for Perl 5.19.4

10 years agoUpdate RMG - Bump Module::CoreList* $VERSIONs sooner
Steve Hay [Fri, 20 Sep 2013 08:29:07 +0000 (09:29 +0100)]
Update RMG - Bump Module::CoreList* $VERSIONs sooner

The corelist.pl program picks up the $VERSION bumps for you if you bump
them first.

10 years agoFix line nums when multiline ${expr} spans here-doc
Father Chrysostomos [Fri, 20 Sep 2013 07:50:54 +0000 (00:50 -0700)]
Fix line nums when multiline ${expr} spans here-doc

<<end . ${

end
"bar"};
warn __LINE__ # 3, not 5

This was caused by commit a49b10d0a, which make scan_ident in toke.c
reallocate the parser’s current line buffer (SvPVX(PL_linestr)) to
search for whitespace surrounding an identifier.

In case there is an arbitrary expression, it temporarily records the
line number and resets it at the end if that turns out to be the case.
However, it was not resetting PL_parser->herelines, which records how
many line numbers to skip when next incrementing it (to skip past
here-doc bodies).

So save and restore that value, too.

10 years agoFix parser buffer corruption with multiline *{...}
Father Chrysostomos [Fri, 20 Sep 2013 07:33:49 +0000 (00:33 -0700)]
Fix parser buffer corruption with multiline *{...}

Since commit a49b10d0a, it has been possible for scan_ident in toke.c
to reallocate the parser’s buffer (SvPVX(PL_linestr)) when scanning
for multiline whitespace.

For the sake of those cases where it finds an arbitrary expression,
not just an identifier, it records a pointer to the first opening
brace, which it returns to the parser after finding out that there is
indeed an expression.

That pointer was not being updated when the buffer was being
allocated.

The solution is to record an offset, rather than a pointer, of the
opening brace relative to the beginning of the current line of input.

This one-liner:

$ ./miniperl  -e '*{' -e '         XS::APItest::gv_fetchmeth_type()' -e '}'

was giving me:

Unrecognized character \x80; marked by <-- HERE after 2<-- HERE near column 24 at -e line 2.

(There were nine nulls before the 2, but git stripped them out.)

10 years agoperldelta - Wrap to 79 columns
Steve Hay [Fri, 20 Sep 2013 07:41:24 +0000 (08:41 +0100)]
perldelta - Wrap to 79 columns

10 years agoperldelta for the prev. commit
Father Chrysostomos [Fri, 20 Sep 2013 06:28:18 +0000 (23:28 -0700)]
perldelta for the prev. commit

10 years agoDon’t free initial src from @INC sub too early
Father Chrysostomos [Fri, 20 Sep 2013 05:33:54 +0000 (22:33 -0700)]
Don’t free initial src from @INC sub too early

As noted in <20130919225357.GA18474@mars.tony.develop-help.com>, com-
mit 839a0e5 introduces uninitialized warnings (and sometimes other
warnings) in inccode.t.

What actually is happening is that \PVBM is no longer being inlined
and returning the same reference each time, but is returning a new
mortal reference.  Commit 839a0e5 uncovers an existing bug.

A sub in @INC can return a reference to a scalar containing initial
source code.  That returned value would be freed prematurely if it was
not referenced elsewhere.

We have to increment its reference count before leaving the scope, and
then mortalise it afterwards.

10 years agoperldelta - A couple of corrections and tweaks
Steve Hay [Fri, 20 Sep 2013 00:29:56 +0000 (01:29 +0100)]
perldelta - A couple of corrections and tweaks

10 years agocorelist.pl - Update RMG to reflect recent changes
Steve Hay [Thu, 19 Sep 2013 23:24:30 +0000 (00:24 +0100)]
corelist.pl - Update RMG to reflect recent changes

10 years agocorelist.pl - Prefer more recent versions where many have the same delta
Steve Hay [Thu, 19 Sep 2013 23:16:26 +0000 (00:16 +0100)]
corelist.pl - Prefer more recent versions where many have the same delta

When adding a new section to %delta in CoreList.pm and Utils.pm if we find
several previous versions which we can take the delta from then prefer the
most recent version. This has the effect that when adding the 5.019004
section to Utils.pm we now choose 5.019003 rather than a random one of
5.019000 (or 5.019), 5.019001, 5.019002 or 5.019003.

10 years agocorelist.pl - Put the new utilities delta section in place
Steve Hay [Thu, 19 Sep 2013 22:45:18 +0000 (23:45 +0100)]
corelist.pl - Put the new utilities delta section in place

This includes removing any existing stub section for this $perl_vnum first.

10 years agocorelist.pl - Fix make_coreutils_delta()
Steve Hay [Thu, 19 Sep 2013 22:43:24 +0000 (23:43 +0100)]
corelist.pl - Fix make_coreutils_delta()

10 years agocorelist.pl - Various tidy-ups
Steve Hay [Thu, 19 Sep 2013 22:42:29 +0000 (23:42 +0100)]
corelist.pl - Various tidy-ups

10 years agocorelist.pl - Apply BinGOs's commit "Two" at updating Utils.pm
Steve Hay [Thu, 19 Sep 2013 22:39:38 +0000 (23:39 +0100)]
corelist.pl - Apply BinGOs's commit "Two" at updating Utils.pm

This is commit 402e920b67.

10 years agocorelist.pl - Apply BinGOs's "First stab" at updating Utils.pm
Steve Hay [Thu, 19 Sep 2013 22:37:31 +0000 (23:37 +0100)]
corelist.pl - Apply BinGOs's "First stab" at updating Utils.pm

This is commit bdb83d4b01.

10 years agocorelist.pl - Correct the indentation of %delta's 'removed' entries
Steve Hay [Thu, 19 Sep 2013 22:29:25 +0000 (23:29 +0100)]
corelist.pl - Correct the indentation of %delta's 'removed' entries

The indentation was only 11 characters instead of 12 to match the 'changed'
entries.

10 years agocorelist.pl - Improve the updating of %delta and %deprecated
Steve Hay [Thu, 19 Sep 2013 22:25:59 +0000 (23:25 +0100)]
corelist.pl - Improve the updating of %delta and %deprecated

Both of these hashes needed to have the existing stub sections for the new
$perl_vnum manually removed prior to running corelist.pl otherwise a second
section for $perl_vnum got added. The script now deletes any such existing
section itself before adding the new (real) one.

10 years agocorelist.pl - Fix the updating of %released
Steve Hay [Thu, 19 Sep 2013 22:22:40 +0000 (23:22 +0100)]
corelist.pl - Fix the updating of %released

The code to not update %released if $perl_vnum is already in it didn't work
correctly. Fix this.

10 years agoTeach configure.com about Perl_drand48 and friends.
Craig A. Berry [Thu, 19 Sep 2013 21:30:04 +0000 (16:30 -0500)]
Teach configure.com about Perl_drand48 and friends.

Follow-up to 890c2948b6847.

10 years agoAdd newline to new switchd test for VMS.
Craig A. Berry [Thu, 19 Sep 2013 21:17:00 +0000 (16:17 -0500)]
Add newline to new switchd test for VMS.

On VMS, you're going to get a newline at EOF willy nilly, which
was making the expected output fail to match the actual output.
The simplest solution is just to put an explicit newline on the
print statement, which yields the same result everywhere.

Follow-up to 261cbad16f5ed8.

10 years agoUpgrade CPAN::Meta from version 2.132510 to 2.132620
Steve Hay [Thu, 19 Sep 2013 15:47:45 +0000 (16:47 +0100)]
Upgrade CPAN::Meta from version 2.132510 to 2.132620

10 years agoperldelta - 'nonexistent' should be 'non-existent'
Steve Hay [Thu, 19 Sep 2013 15:27:46 +0000 (16:27 +0100)]
perldelta - 'nonexistent' should be 'non-existent'

10 years agoperldelta - Remove all but one XXX notices
Steve Hay [Thu, 19 Sep 2013 15:16:27 +0000 (16:16 +0100)]
perldelta - Remove all but one XXX notices

10 years agoperldelta - Fill in currently remaining TODO items
Steve Hay [Thu, 19 Sep 2013 15:10:36 +0000 (16:10 +0100)]
perldelta - Fill in currently remaining TODO items

9d32676e doesn't need one since it only fixes things that were added post
5.19.3, but [perl #117265] is worth mentioning somewhere so I've added that
to the warnings entry.

10 years agoperldelta - Update entry for b29f65fce6
Steve Hay [Thu, 19 Sep 2013 14:32:17 +0000 (15:32 +0100)]
perldelta - Update entry for b29f65fce6

10 years agoperldelta for 3428cdc0d3
Steve Hay [Thu, 19 Sep 2013 14:25:44 +0000 (15:25 +0100)]
perldelta for 3428cdc0d3