This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perl5.git
13 years agoremove removed file dist/Cwd/Changes from the MANIFEST
Tony Cook [Sun, 5 Sep 2010 13:10:57 +0000 (23:10 +1000)]
remove removed file dist/Cwd/Changes from the MANIFEST

13 years agoDo not ship the PathTools Changes
Steffen Mueller [Sun, 5 Sep 2010 10:21:40 +0000 (12:21 +0200)]
Do not ship the PathTools Changes

There is no reason (I can think of) to track and ship the PathTools CPAN
change log in core perl.

13 years agoFix core-cpan-diff for dists that extract weirdly
Florian Ragwitz [Sun, 5 Sep 2010 00:08:52 +0000 (02:08 +0200)]
Fix core-cpan-diff for dists that extract weirdly

The recent "Foo-Bar-1.23-withoutworldwriteables.tar.gz" dists are an example of
that. They'll extract to Foo-Bar-1.23/.

Caching of the untarred dists probably doesn't work for those dists, but at
least it works at all.

13 years agoUpdate base.pm's META.yml
Florian Ragwitz [Sat, 4 Sep 2010 23:11:00 +0000 (01:11 +0200)]
Update base.pm's META.yml

It's there for Rafael's convenience when doing CPAN releases, as there's no
separate base repository.

13 years agoSynchronize with bignum 0.24
Florian Ragwitz [Sat, 4 Sep 2010 13:03:47 +0000 (15:03 +0200)]
Synchronize with bignum 0.24

13 years agoSynchronize with Math::BigInt::FastCalc 0.21
Florian Ragwitz [Fri, 3 Sep 2010 21:32:23 +0000 (23:32 +0200)]
Synchronize with Math::BigInt::FastCalc 0.21

13 years agoUpstream for Math::BigRat is CPAN
Florian Ragwitz [Fri, 3 Sep 2010 18:14:11 +0000 (20:14 +0200)]
Upstream for Math::BigRat is CPAN

13 years agoMath::BigInt 1.90 just shipped to CPAN
Florian Ragwitz [Fri, 3 Sep 2010 15:34:20 +0000 (17:34 +0200)]
Math::BigInt 1.90 just shipped to CPAN

13 years agoperldelta up to 45b279e
Florian Ragwitz [Fri, 3 Sep 2010 15:02:31 +0000 (17:02 +0200)]
perldelta up to 45b279e

13 years agoBump $Errno::VERSION after change be54382
Florian Ragwitz [Fri, 3 Sep 2010 14:45:47 +0000 (16:45 +0200)]
Bump $Errno::VERSION after change be54382

13 years agoIn uudmap.h rule, nothing is different from the absence of anything.
Craig A. Berry [Fri, 3 Sep 2010 02:44:57 +0000 (21:44 -0500)]
In uudmap.h rule, nothing is different from the absence of anything.

Follow-up to 6999193ba9069e620831bed0f85efa43ff6e283a, which broke
the build on VMS because the rule to build uudmap.h was unknown.

13 years agoBump Math::BigInt{,::Calc}::VERSION for bnok fixes
Florian Ragwitz [Fri, 3 Sep 2010 01:44:11 +0000 (03:44 +0200)]
Bump Math::BigInt{,::Calc}::VERSION for bnok fixes

13 years agoFix Math::BigInt's bnok($k) for $k==0 and $k==$n-1
Piotr Fusik [Fri, 3 Sep 2010 00:41:00 +0000 (02:41 +0200)]
Fix Math::BigInt's bnok($k) for $k==0 and $k==$n-1

Signed-off-by: Florian Ragwitz <rafl@debian.org>
[rafl@debian.org: fixed bigflt tests and test plans]

13 years agoblead is upstream for bignum
Florian Ragwitz [Thu, 2 Sep 2010 23:12:17 +0000 (01:12 +0200)]
blead is upstream for bignum

13 years agoblead is upstream for Math-BigInt-FastCalc
Florian Ragwitz [Thu, 2 Sep 2010 22:12:22 +0000 (00:12 +0200)]
blead is upstream for Math-BigInt-FastCalc

13 years agoblead is upstream for Math-BigInt
Florian Ragwitz [Thu, 2 Sep 2010 21:11:26 +0000 (23:11 +0200)]
blead is upstream for Math-BigInt

13 years agoIn XS_VERSION_BOOTCHECK, correct the flags argument of get_sv() to 0.
Nicholas Clark [Thu, 2 Sep 2010 15:21:43 +0000 (16:21 +0100)]
In XS_VERSION_BOOTCHECK, correct the flags argument of get_sv() to 0.

It should not be FALSE, because it's a bitmap, not a boolean.

13 years agoChange the first argument of Perl_fetch_cop_label() to COP *
Nicholas Clark [Thu, 2 Sep 2010 14:57:24 +0000 (15:57 +0100)]
Change the first argument of Perl_fetch_cop_label() to COP *

From a suggestion from Ben Morrow.

The first argument used to be struct refcounted_he *, which exposed an
implementation detail - that the COP's labels are (now) stored in this way.

Google Code Search and an unpacked CPAN both fail to find any users of this
API, so the impact should be minimal.

13 years agoFor the generated XSLoader.pm, avoid a runtime lexical which is constant.
Nicholas Clark [Thu, 2 Sep 2010 10:44:51 +0000 (11:44 +0100)]
For the generated XSLoader.pm, avoid a runtime lexical which is constant.

XSLoader_pm.PL had been resolving $Config::Config{dlext}, and writing it as
the constant initialiser for a lexical variable in XSLoader.pm. In turn,
that lexical was used only once, in string interpolation. So the interpolation
can be done instead at build time.

13 years agoFix test (see <20100901161607.GB2892@iabyn.com>)
Abigail [Thu, 2 Sep 2010 09:55:07 +0000 (11:55 +0200)]
Fix test (see <20100901161607.GB2892@iabyn.com>)

13 years agoSanity check on Errno values.
Curtis Jewell [Tue, 24 Aug 2010 20:07:51 +0000 (14:07 -0600)]
Sanity check on Errno values.

On a few machines (Win32/gcc using mingw64 headers) Errno.pm
will find a value that is not numeric for a proposed error
key. This change adds a sanity check to discard such keys.

13 years agot/lib/common.pl must convert $^X to an absolute path before changing directory.
Nicholas Clark [Wed, 1 Sep 2010 20:24:54 +0000 (21:24 +0100)]
t/lib/common.pl must convert $^X to an absolute path before changing directory.

Not every operating system has /proc/self/exe

13 years agoTests using t/lib/common.pl need to run in separate directories.
Nicholas Clark [Wed, 1 Sep 2010 18:05:52 +0000 (19:05 +0100)]
Tests using t/lib/common.pl need to run in separate directories.

Commit 8f776eae73090661 turned out to be a bit optimistic with
"should be capable of running in parallel", as the temporary files and
modules written out by the various test scripts have clashing names.
Hence run each test a private subdirectory.

13 years agoRT 74444 - install_lib.pl emits warnings when installperl is run with destdir
Todd Rinaldo [Wed, 1 Sep 2010 16:18:43 +0000 (11:18 -0500)]
RT 74444 - install_lib.pl emits warnings when installperl is run with destdir

running the following produces 7 warnings like this on my system:
'LD_LIBRARY_PATH=/usr/home/build/perl-5.12.0  ./perl installperl --destdir=/var/local/tmp/perl-root'

Use of uninitialized value $dev2 in numeric eq (==) at ./install_lib.pl line 123.

replacing == with ~~ (the smart match operator) seems to be the best DWIM fix.

13 years agoAdd alternate email address for Todd
Florian Ragwitz [Wed, 1 Sep 2010 16:41:58 +0000 (18:41 +0200)]
Add alternate email address for Todd

13 years agoIgnore droppings from lib/h2ph.t
Florian Ragwitz [Wed, 1 Sep 2010 16:14:18 +0000 (18:14 +0200)]
Ignore droppings from lib/h2ph.t

13 years agoAdd test for deprecation warnings from h2ph
Florian Ragwitz [Wed, 1 Sep 2010 14:54:38 +0000 (16:54 +0200)]
Add test for deprecation warnings from h2ph

This makes sure the fix for RT#74404 is working.

13 years agoRT 74404 - h2ph using deprecated goto
Todd Rinaldo [Wed, 1 Sep 2010 16:05:26 +0000 (11:05 -0500)]
RT 74404 - h2ph using deprecated goto

It looks like h2ph makes copious use of global variables. As a result, I can
commit this evil for a minimal patch. No code was changed moving it into the
sub other than passing $proto, which is the only non-global used (but not
modified).

I tried a 5.12.0 build with this patch and it seems to be passing tests.
There is a lib/h2ph.t file but I don't know what it tests exactly.

13 years agoStop Tie::Hash->TIEHASH() looping forever.
Nicholas Clark [Wed, 1 Sep 2010 15:54:56 +0000 (16:54 +0100)]
Stop Tie::Hash->TIEHASH() looping forever.

This change is analogous to bc3707112523ba7a in Tie::Scalar, but with far fewer
tests.

13 years agopp_match: fix confusing layout in an if()
David Mitchell [Wed, 1 Sep 2010 16:05:22 +0000 (17:05 +0100)]
pp_match: fix confusing layout in an if()

The
    if ((    !global
rather than
    if (    (!global
made it hard to follow the precedence.
Tidy up the rest of the expression while I'm at it.

13 years agoCopy RE capture buf on overload as well as TEMP
David Mitchell [Wed, 1 Sep 2010 15:59:03 +0000 (16:59 +0100)]
Copy RE capture buf on overload as well as TEMP

Partial fix for [perl #77084]. Sometimes pp_match makes a copy of the
original SV's string for the later use of $1 et al; in particular if the
SV is TEMP (so will soon go away).

Make it do the same if the SV is overloaded, as the string return is most
certainly temporary!

(Also tweak the tests to make them more likely to fail on badness by
creating new stings that will likely reallocate freed buffer).

13 years agoperldelta up to 137127d
Florian Ragwitz [Wed, 1 Sep 2010 15:27:46 +0000 (17:27 +0200)]
perldelta up to 137127d

13 years agot/harness can run the tests lib/*.t in parallel with each other.
Nicholas Clark [Wed, 1 Sep 2010 13:32:47 +0000 (14:32 +0100)]
t/harness can run the tests lib/*.t in parallel with each other.

All these tests are for different modules, and should be capable of running
in parallel. Hopefully this will reduce the chance of seeing lib/warnings.t
running all alone on a multi-core machine.

13 years agoClarify CPU cache improvements entry in 5133delta
Florian Ragwitz [Wed, 1 Sep 2010 13:40:04 +0000 (15:40 +0200)]
Clarify CPU cache improvements entry in 5133delta

13 years agoPL_my_cxt_list is only available with PERL_IMPLICIT_CONTEXT
Tony Cook [Wed, 1 Sep 2010 13:14:51 +0000 (23:14 +1000)]
PL_my_cxt_list is only available with PERL_IMPLICIT_CONTEXT

13 years agofix some 64-bit casts under DEBUG_LEAKING_SCALARS
David Mitchell [Wed, 1 Sep 2010 11:52:32 +0000 (12:52 +0100)]
fix some 64-bit casts under DEBUG_LEAKING_SCALARS

13 years agofix indentation of MY_CXT #defines
David Mitchell [Wed, 1 Sep 2010 11:07:32 +0000 (12:07 +0100)]
fix indentation of MY_CXT #defines

Only whitespace changes

13 years agomerge two similar MY_CXT code branches
David Mitchell [Wed, 1 Sep 2010 10:59:01 +0000 (11:59 +0100)]
merge two similar MY_CXT code branches

No functional changes

13 years agoMY_CXT macros: make the two sets of defs similar
David Mitchell [Wed, 1 Sep 2010 10:49:02 +0000 (11:49 +0100)]
MY_CXT macros: make the two sets of defs similar

Three years ago there was a cut and paste of all the MY_CXT macros
into a second #ifdef PERL_GLOBAL_STRUCT_PRIVATE branch with minor
modifications (Bad programmer! No cookie!). Make the two branches more
similar in preparation for a partial merge. No functional changes.

13 years agoPL_my_cxt_list leaks
Jirka Hruška [Wed, 1 Sep 2010 10:18:43 +0000 (11:18 +0100)]
PL_my_cxt_list leaks

[perl #77352]

PL_my_cxt_list was never freed

13 years agoMemory leak cloning PVGVs
Jirka Hruška [Wed, 1 Sep 2010 09:59:35 +0000 (10:59 +0100)]
Memory leak cloning PVGVs

[perl #77352]

In S_sv_dup_common, Perl_rvpv_dup was called twice on a non-GP PVGV value,
causing the first duped value to be leaked

13 years agoMove the call to Perl_cv_clone() into S_doform(), from its two callers.
Nicholas Clark [Wed, 1 Sep 2010 09:56:47 +0000 (10:56 +0100)]
Move the call to Perl_cv_clone() into S_doform(), from its two callers.

This reduces code duplication slightly, and reduces the object code size.

13 years agoRefactor Perl_store_cop_label() to avoid exposing struct refcounted_he *.
Nicholas Clark [Wed, 1 Sep 2010 06:24:59 +0000 (07:24 +0100)]
Refactor Perl_store_cop_label() to avoid exposing struct refcounted_he *.

Instead pass in a COP, as suggested by Ben Morrow. Also add length and flags
parameters, and remove the comment suggesting this change. The underlying
storage mechanism can honour length and UTF8/not, so there is no harm in
exposing this one level higher.

13 years agoBump blib::VERSION after 3f9bb6b
Florian Ragwitz [Wed, 1 Sep 2010 02:41:39 +0000 (04:41 +0200)]
Bump blib::VERSION after 3f9bb6b

13 years ago[perl #77492] open $fh, ">", \*glob causes SEGV
Father Chrysostomos [Wed, 1 Sep 2010 01:00:38 +0000 (03:00 +0200)]
[perl #77492] open $fh, ">", \*glob causes SEGV

PerlIO_layer_from_ref must not treat a real glob as a scalar. This
function was not updated when SVt_PVGV was moved before SVt_PVLV.

13 years agoCorrect errors in the use of multiple targets for bitcount.h and uudmap.h
Nicholas Clark [Tue, 24 Aug 2010 14:25:36 +0000 (15:25 +0100)]
Correct errors in the use of multiple targets for bitcount.h and uudmap.h

The fixes of Makefile.SH in 0f13ebd5d71f8177 also need to be applied on Win32
and VMS.

13 years agoMerge the two 5134delta entries for uniary functions
Florian Ragwitz [Tue, 31 Aug 2010 20:16:29 +0000 (22:16 +0200)]
Merge the two 5134delta entries for uniary functions

13 years ago[perl #77234] Change 649d02de (unary prototypes) changes precedence
Father Chrysostomos [Tue, 31 Aug 2010 20:13:06 +0000 (22:13 +0200)]
[perl #77234] Change 649d02de (unary prototypes) changes precedence

This patch retroactively adds a description of the breakage to
perl5134delta so it will be copied eventually into perl5140delta.

13 years agoremove dead listexprcom production from grammar
Zefram [Mon, 23 Aug 2010 19:49:45 +0000 (20:49 +0100)]
remove dead listexprcom production from grammar

The third production of <listexprcom>, "expr ','", could never be invoked,
because <expr> can already end with arbitrarily many commas.

13 years agobetter silencing of APItest deprecation warning
David Mitchell [Tue, 31 Aug 2010 18:04:18 +0000 (19:04 +0100)]
better silencing of APItest deprecation warning

Commit 95ddc6755c1ff41d06e5afc2212c85f918ebcd28 attempted to add
-Wno-deprecated-declarations' to the ccflags for APItest.xs;
however it ended up deleting existing flags rather than appending.

Under -DDEBUG_LEAKING_SCALARS this caused the PerlInterpreter structure
to have different field alignments in core and APItest.xs. Ouch!

13 years agoAdd Zefram as our release manager victim for 20 December
Jesse Vincent [Tue, 31 Aug 2010 18:11:23 +0000 (14:11 -0400)]
Add Zefram as our release manager victim for 20 December

13 years agoAdd two missing break in Perl_magic_set's big switch
Vincent Pit [Tue, 31 Aug 2010 11:10:26 +0000 (13:10 +0200)]
Add two missing break in Perl_magic_set's big switch

This fixes $^A being reset when $1..$2 are localized before any regexp match
happened.

13 years agoRemove unneeded use of INT2PTR() in the XS for Tie::Hash::NamedCapture.
Nicholas Clark [Mon, 30 Aug 2010 17:51:25 +0000 (18:51 +0100)]
Remove unneeded use of INT2PTR() in the XS for Tie::Hash::NamedCapture.

13 years agoStart perl5135delta
Florian Ragwitz [Tue, 31 Aug 2010 01:59:10 +0000 (03:59 +0200)]
Start perl5135delta

13 years agoModule::CoreList updates for 5.12.2
Jesse Vincent [Tue, 31 Aug 2010 01:43:01 +0000 (21:43 -0400)]
Module::CoreList updates for 5.12.2

13 years agoAvoid needless use of UTF8=1 format [RT#56336]
Eric Brine [Sun, 22 Aug 2010 05:17:26 +0000 (22:17 -0700)]
Avoid needless use of UTF8=1 format [RT#56336]

Some literals (e.g. q'abc') don't set the UTF8 flag for pure ASCII literals.
Others (e.g. -abc) do. This should be consistent.

13 years agoTODO tests for avoid needless use of UTF8=1 format [RT#56336]
Eric Brine [Sun, 22 Aug 2010 03:14:08 +0000 (20:14 -0700)]
TODO tests for avoid needless use of UTF8=1 format [RT#56336]

Some literals (e.g. q'abc') don't set the UTF8 flag for pure ASCII literals.
Others (e.g. -abc) do. This should be consistent.

13 years agoadd more tests to lib/mauve.t so it tests also that mauve::reftype can return "LVALUE"
Zsbán Ambrus [Mon, 30 Aug 2010 17:24:18 +0000 (19:24 +0200)]
add more tests to lib/mauve.t so it tests also that mauve::reftype can return "LVALUE"

13 years agouse more efficient sv_reftype_len() interface
Yves Orton [Mon, 30 Aug 2010 17:05:27 +0000 (19:05 +0200)]
use more efficient sv_reftype_len() interface

13 years agofix the AIX skip to only skip on AIX
Tony Cook [Mon, 30 Aug 2010 14:43:20 +0000 (00:43 +1000)]
fix the AIX skip to only skip on AIX

13 years agort77432: sigaction would crash/assert with a replaced %SIG
Tony Cook [Mon, 30 Aug 2010 14:34:19 +0000 (00:34 +1000)]
rt77432: sigaction would crash/assert with a replaced %SIG

13 years agomauve.t needs access to %Config, make sure it's available
Tony Cook [Mon, 30 Aug 2010 04:59:34 +0000 (14:59 +1000)]
mauve.t needs access to %Config, make sure it's available

13 years agocreate the "mauve" temporary namespace for things like reftype
Yves Orton [Sun, 29 Aug 2010 22:41:09 +0000 (00:41 +0200)]
create the "mauve" temporary namespace for things like reftype

Scalar::Util::reftype(), refaddr() and blessed() are all a bit
less useful than they could be as they all return C<undef> when
their argument is not a reference. While this is logical, it also
means that using these routines has to be guarded, and normally
guarded in such a way that the internal logic is called twice.

Additionally these routines are quite commonly used and having to
load an additional DLL and XS code every program is inefficient.

Therefore we introduce the "mauve" namespace for to hold the "fixed"
equivalents, this namespace is /always/ loaded (like the 're' or 'utf8'
namespaces), and thus these routines can be accessed easily at any time.
We also provide a new module wrapper in t/lib which allows these
routines to be exported into other namespaces if the user so chooses.

At Jesse's request I have included weaken() and as it seemed logical to
do so I have also added isweak().

Once we have a good name for the namespace we can s/mauve/whatever/g

13 years agoadd sv_reftype_len() and make sv_reftype() be a wrapper for it
Yves Orton [Sun, 29 Aug 2010 18:47:16 +0000 (20:47 +0200)]
add sv_reftype_len() and make sv_reftype() be a wrapper for it

sv_reftype() mostly returns strings whose length is known at compile
time, so we can avoid a strlen() call if we return the length.

Additionally, the non-length interface is potentially buggy in the
face of class names which contain "\0", therefore providing a way
to obtain the true length allows us to avoid any trickyness.

13 years agowhen building under git, test that MANIFEST and git ls-files match up properly
Yves Orton [Sun, 29 Aug 2010 18:45:26 +0000 (20:45 +0200)]
when building under git, test that MANIFEST and git ls-files match up properly

13 years agoUpdate Unicode-Collate to CPAN version 0.58
Chris 'BinGOs' Williams [Sun, 29 Aug 2010 21:55:52 +0000 (22:55 +0100)]
Update Unicode-Collate to CPAN version 0.58

  [DELTA]

  0.58  Sun Aug 29 19:56:50 2010
    - U::C::Locale newly supports locales: af, cy, da, fo, haw, is, kl, sw.

13 years agoFix a typo in the PL_keyword_plugin docs
Florian Ragwitz [Sat, 28 Aug 2010 20:47:46 +0000 (22:47 +0200)]
Fix a typo in the PL_keyword_plugin docs

13 years agoMake PerlIOUnix_open honor default permissions on VMS.
Craig A. Berry [Sat, 28 Aug 2010 16:37:33 +0000 (11:37 -0500)]
Make PerlIOUnix_open honor default permissions on VMS.

When perlio became the default and unixio became the default bottom
layer, the most common path for creating files from Perl became
PerlIOUnix_open, which has always explicitly used 0666 as the
permission mask.  This has the following undesireable effects on
VMS:

1.) The execute bit is lost regardless of whether it's in the default
    permissions.

2.) Delete permission (which doesn't exist in the Unix permission mask) is
    copied from write permission, so granting write permission also grants
    delete even if it's not in the default permission mask.  This can result
    in an inadvertent widening of permissions.

3.) System permissions (which don't exist in the Unix permission mask) are
    copied from owner permissions, so any distinction between system and
    owner is lost.

4.) ACLs are not inherited.  For example, setting a default_protection ACE
    on a directory such that all world access is disallowed will be ignored;
    world will have the intersection of RWD (the final 6 in 0666) and whatever
    the default permissions are regardless of what the ACL says.  Thus not
    inheriting ACLs can result in the inadvertent widening of permissions.

The way to avoid all of this is to pass 0777 as the permissions to open().
In the VMS CRTL, 0777 has a special meaning over and above intersecting
with the current umask; specifically, it allows Unix syscalls to preserve
native default permissions.  Details currently documented at:

http://h71000.www7.hp.com/doc/732final/5763/5763pro_060.html#umask_routine

13 years agoRemove OA_RETINTEGER, unused since 2002 (commit e7311069df54baa6)
Nicholas Clark [Sat, 28 Aug 2010 14:35:57 +0000 (15:35 +0100)]
Remove OA_RETINTEGER, unused since 2002 (commit e7311069df54baa6)

This returns us to 8 flag bits, and restores OCSHIFT and OASHIFT to 8 and 12
Previously these were 9 and 13, and effectively PL_opargs[] was using 33 of
32 bits, relying on the ugly hack that no 5 argument builtin had an optional
5th argument, hence the (13 + 5 * 4)th bit was always zero.
is effectively 33 bits.

13 years agosilence APItest deprecation warning
Robin Barker [Mon, 23 Aug 2010 14:32:45 +0000 (15:32 +0100)]
silence APItest deprecation warning

13 years agomktables: Silence common build warning
Karl Williamson [Mon, 23 Aug 2010 15:43:59 +0000 (09:43 -0600)]
mktables: Silence common build warning

The first time mktables is run on a clean directory, mktables.lst is
non-existent.  Rather than warn on this common occurrence, just assume
it is ok, and continue.  The point of the warning was to point out a
potential problem.  But it occurs so often that people have gotten
inured (habituated) to it, and it has lost all effectiveness.  Better to
not output it, and have any problems show up as repeated rebuilds that
will annoy enough to be dealt with.

13 years agoSilence g++ compatibility warning
Robin Barker [Tue, 3 Aug 2010 21:50:18 +0000 (22:50 +0100)]
Silence g++ compatibility warning

13 years agoremove much dead code from regen.pl
Zefram [Mon, 23 Aug 2010 20:36:59 +0000 (21:36 +0100)]
remove much dead code from regen.pl

13 years agoavoid unnecessarily changing timestamp on perly.h
Zefram [Mon, 23 Aug 2010 20:35:50 +0000 (21:35 +0100)]
avoid unnecessarily changing timestamp on perly.h

Make regen_perly.pl use rename_if_different() to avoid overwriting files
that aren't actually changing.

13 years agoPeephole optimise adjacent pairs of nextstate ops.
Nicholas Clark [Fri, 27 Aug 2010 20:48:55 +0000 (21:48 +0100)]
Peephole optimise adjacent pairs of nextstate ops.

Previously, in code such as

    use constant DEBUG=>0;

    sub GAK {
        warn if DEBUG;
        print "stuff\n";
    }

the ops for C<warn if DEBUG;> would be folded to a null op (ex-const), but
the nextstate op would remain, resulting in a runtime op dispatch of nextstate,
nextstate, ...

The execution of a sequence of nexstate ops is indistinguishable from just the
last nextstate op, so teach the peephole optimiser to eliminate the first of a
pair of nextstate ops. (Except where the first carries a label, as labels
mustn't be eliminated by the optimiser, and label usage isn't conclusively
known at compile time.)

13 years agoMerge branch 'blead' of ssh://stevep@perl5.git.perl.org/perl into blead
Steve Peters [Fri, 27 Aug 2010 12:40:51 +0000 (07:40 -0500)]
Merge branch 'blead' of ssh://stevep@perl5.git.perl.org/perl into blead

13 years agoTypo fix in perlfork
Steve Peters [Fri, 27 Aug 2010 12:40:03 +0000 (07:40 -0500)]
Typo fix in perlfork

13 years agoRemove a useless hardcoding of the current Perl version in README.AIX
Jesse Vincent [Thu, 26 Aug 2010 22:06:48 +0000 (18:06 -0400)]
Remove a useless hardcoding of the current Perl version in README.AIX

13 years agoFirst pass of CoreList update for 5.12.2
Jesse Vincent [Wed, 25 Aug 2010 18:12:17 +0000 (14:12 -0400)]
First pass of CoreList update for 5.12.2

13 years agoIn mktables, disable string overloading when de-duping lists.
Nicholas Clark [Thu, 26 Aug 2010 19:57:00 +0000 (21:57 +0200)]
In mktables, disable string overloading when de-duping lists.

As the unique() function is called with either a list of strings or a list of
objects, and all objects stringify to distinct values, there is no behaviour
difference between using object stringification and object address for a
"seen" hash. There is, however, an 8% run time difference :-)

Devel::NYTProf strikes again.

13 years agoConvert mktables to assign lexicals via do { no overloading; ... }; blocks.
Nicholas Clark [Thu, 26 Aug 2010 13:39:27 +0000 (15:39 +0200)]
Convert mktables to assign lexicals via do { no overloading; ... }; blocks.

This avoids repeating the lexical's name, whilst retaining the tight scope of
no overloading.

13 years agoChange mktables to use pack 'J', $addr; to key its inside-out objects.
Nicholas Clark [Thu, 26 Aug 2010 13:19:42 +0000 (15:19 +0200)]
Change mktables to use pack 'J', $addr; to key its inside-out objects.

Using pack 'J', $addr; instead of 0 + $addr; reduces run time by about 1%,
according to my benchmarking.

13 years agoIn lib/unicore/mktables tweaks to tidy the file writing code.
Nicholas Clark [Thu, 26 Aug 2010 12:56:08 +0000 (14:56 +0200)]
In lib/unicore/mktables tweaks to tidy the file writing code.

In write(), don't concatenate all the lines to one scalar to print them, as
it takes fewer ops and less memory to pass print a list of values.
die if the print or close return errors, and don't print the success message
until the file is successfully closed.

Refactor make_property_test_script() to use write().

13 years agoIn lib/unicore/mktables minor tidying of the numifciation code.
Nicholas Clark [Thu, 26 Aug 2010 12:16:43 +0000 (14:16 +0200)]
In lib/unicore/mktables minor tidying of the numifciation code.

In the inside-out object lookup code, strive for consistency, by always writing
0 + $ref with no spaces. No need to use 0+$ref as the arguments to == as it
will force numeric context.

13 years agomake recursive part of peephole optimiser hookable
Zefram [Mon, 16 Aug 2010 19:22:42 +0000 (20:22 +0100)]
make recursive part of peephole optimiser hookable

New variable PL_rpeepp makes it possible for extensions to hook
the per-op-chain part of the peephole optimiser (which recurses into
side chains).  The existing variable PL_peepp still allows hooking the
per-sub part of the peephole optimiser, maintaining perfect backward
compatibility.

13 years agoeliminate unneeded code, and explain why the code was not needed
Yves Orton [Thu, 26 Aug 2010 11:53:07 +0000 (13:53 +0200)]
eliminate unneeded code, and explain why the code was not needed

The commit message for v5.13.4-47-gd1c771f contained some misleading language
which I only noticed after I pushed. This change puts the comment in the
code and hopefully clarifies things properly.

In simple words: VERBS should *never* be included in the JUMPABLE condition.

13 years agoVERB nodes in the regex engine should NOT be marked as JUMPABLE.
Bram [Thu, 26 Aug 2010 11:27:24 +0000 (13:27 +0200)]
VERB nodes in the regex engine should NOT be marked as JUMPABLE.

JUMPABLE nodes can be ignored during certain phases of regex execution,
including ones where backtracking is affected. This change disables this
behviour so that the VERBS can perform their desired results.

Committer has taken the liberty of modifying the patch so that all
VERBS are jumped, thus making the JUMPABLE expression a little simpler.
I have left Bram's change to JUMPABLE intact, but inside of a comment
for now.

See discussion in thread for [perl #71942] *COMMIT bypasses optimisation
for futher details.

http://rt.perl.org/rt3/Ticket/Display.html?id=71942

There appears to be room for futher optimisation here
by moving the JUMPABLE logic to regex-compile time. Currently
it is arguable that the "optimisation" this patch seeks to avoid
is actually not an optimisation at all, as it happens OVER AND OVER
during execution of a match, thus the extra effort might actually
outweight the benefit, especially on large strings.

13 years agofix description of -DJ in perlrun
David Mitchell [Wed, 25 Aug 2010 19:55:30 +0000 (20:55 +0100)]
fix description of -DJ in perlrun

The description of the J debugging flag was logically the reverse of what
it should be; i.e. -DJ enables, rather than suppresses, output in debugger
packages

13 years agoprevent Devel::Peek::Dump from lieing to us about evil class names
Yves Orton [Wed, 25 Aug 2010 18:05:58 +0000 (20:05 +0200)]
prevent Devel::Peek::Dump from lieing to us about evil class names

While one certainly can argue the merits of using a class name like "\0", it is legal
so lets avoid it confusing our primary debugging tool.

13 years agoFix escaping in opcode.h generation
Dagfinn Ilmari Mannsåker (via RT) [Mon, 23 Aug 2010 23:05:48 +0000 (16:05 -0700)]
Fix escaping in opcode.h generation

The op list has no escapes, so there's no need check for already-escaped
characters, and the existing regex breaks any run of consecutive
backslashes, escaped or not.

13 years agoperlunicode.pod: Fix misleading info, expand
Karl Williamson [Wed, 25 Aug 2010 17:16:25 +0000 (18:16 +0100)]
perlunicode.pod: Fix misleading info, expand

There was some misleading, or uncharitably, wrong text in this pod about
user-defined casing.  And, it jumped the gun, presuming that 5.14 would
fix something for which there has not been a patch submitted yet.

And, I realized there was a way around having to figure out the utf8 for
a character.

13 years agomktables: Clarify comment output in files
Karl Williamson [Wed, 25 Aug 2010 17:15:34 +0000 (18:15 +0100)]
mktables: Clarify comment output in files

I never understood this comment until it bit me.  Based on my new-found
experience, I've expanded it.

13 years agoAdd tests for commit 1b0124a7c19a5499714e57a00a3d30b2f2647b1f
Bram (via RT) [Mon, 23 Aug 2010 19:22:28 +0000 (12:22 -0700)]
Add tests for commit 1b0124a7c19a5499714e57a00a3d30b2f2647b1f

[perl #77392]

Make sure that the stack is not popped when there is nothing on the stack.

13 years agoFix -Wwrite-string warnings in cygwin.c
Jerry D. Hedden" (via RT) [Mon, 23 Aug 2010 15:37:07 +0000 (08:37 -0700)]
Fix -Wwrite-string warnings in cygwin.c

[perl #77376]
Fix the following build warnings that are now being
generated because -Wwrite-string has been turned on:

cygwin.c: In function `do_aspawn':
cygwin.c:69: warning: assignment discards qualifiers from pointer target type
cygwin.c: In function `do_spawn':
cygwin.c:91: warning: initialization discards qualifiers from pointer
target type
cygwin.c: In function `init_os_extras':
cygwin.c:544: warning: initialization discards qualifiers from pointer
target type

13 years agoTests for bug 77414
Abigail [Wed, 25 Aug 2010 15:36:45 +0000 (17:36 +0200)]
Tests for bug 77414

13 years agoMark regcurly as experimental
karl williamson (via RT) [Wed, 18 Aug 2010 18:33:36 +0000 (11:33 -0700)]
Mark regcurly as experimental

Even though it isn't in the public API, some worry that we shouldn't
change it, as it's currently public, but may be made into an in-line
function known only to the two .c files that should call it.

13 years agoupdate AUTHORS
David Mitchell [Wed, 25 Aug 2010 13:20:46 +0000 (14:20 +0100)]
update AUTHORS

13 years agoConfig.pm: report perl path in version conflict.
alex [Wed, 25 Aug 2010 12:38:28 +0000 (13:38 +0100)]
Config.pm: report perl path in version conflict.

When Config.pm dies with a perl/library version mismatch error, include
the path of the perl executable in the error message.

This helps avoid confusion during perl build when a cc wrapper written in
perl is used (such as colorgcc)

13 years agoexclude autodoc.pl from pod checks
David Mitchell [Wed, 25 Aug 2010 13:16:26 +0000 (14:16 +0100)]
exclude autodoc.pl from pod checks

This script contains snippets of pod in here-doc sections which
gives false positives

13 years agoperlpod.api: improve the prose
David Mitchell [Wed, 25 Aug 2010 12:10:45 +0000 (13:10 +0100)]
perlpod.api: improve the prose

Tweak the text of the previous commit that describes the status of
undocumented functions in the public API.