This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perl5.git
10 years agoRevert "regcomp.c: Add a constant 0 element before inversion lists"
Karl Williamson [Fri, 5 Jul 2013 04:01:05 +0000 (22:01 -0600)]
Revert "regcomp.c: Add a constant 0 element before inversion lists"

This reverts commit 533c4e2f08b42d977e5004e823d4849f7473d2d0.
This continues the backing out of this topic branch.  A bisect shows
that the first commit exhibiting an error is the first one in the
branch.

10 years agoRevert "regcomp.c: Make inversion lists SVt_PVLV"
Karl Williamson [Fri, 5 Jul 2013 04:00:58 +0000 (22:00 -0600)]
Revert "regcomp.c: Make inversion lists SVt_PVLV"

This reverts commit 2c3365de8c1168f115576a4976d067e3b911c490.
This continues the backing out of this topic branch.  A bisect shows
that the first commit exhibiting an error is the first one in the
branch.

10 years agoRevert "regcomp.c: Remove unused data structure field"
Karl Williamson [Fri, 5 Jul 2013 04:00:53 +0000 (22:00 -0600)]
Revert "regcomp.c: Remove unused data structure field"

This reverts commit 4b98096221966ea01c046f4f61b2dc4f60b534b9.
This continues the backing out of this topic branch.  A bisect shows
that the first commit exhibiting an error is the first one in the
branch.

10 years agoRevert "regcomp.c: Move 2 hdr inversion fields to SV hdr"
Karl Williamson [Fri, 5 Jul 2013 04:00:48 +0000 (22:00 -0600)]
Revert "regcomp.c: Move 2 hdr inversion fields to SV hdr"

This reverts commit 4fdeca7844470c929f35857f49078db1fd124dbc.
This continues the backing out of this topic branch.  A bisect shows
that the first commit exhibiting an error is the first one in the
branch.

10 years agoRevert "regcomp.c: Change, variable, fcn name"
Karl Williamson [Fri, 5 Jul 2013 04:00:43 +0000 (22:00 -0600)]
Revert "regcomp.c: Change, variable, fcn name"

This reverts commit 875c4e2c5193b5245da578b222e9c93aad31d93b.
This continues the backing out of this topic branch.  A bisect shows
that the first commit exhibiting an error is the first one in the
branch.

10 years agoRevert "regcomp.c: Move inversion list hdr field to SV hdr"
Karl Williamson [Fri, 5 Jul 2013 04:00:36 +0000 (22:00 -0600)]
Revert "regcomp.c: Move inversion list hdr field to SV hdr"

This reverts commit d913fb457b732da4c31d0d1b8c085989a7ecd12d.
This continues the backing out of this topic branch.  A bisect shows
that the first commit exhibiting an error is the first one in the
branch.

10 years agoRevert "regcomp.c: Make C-array inversion lists const"
Karl Williamson [Fri, 5 Jul 2013 03:59:03 +0000 (21:59 -0600)]
Revert "regcomp.c: Make C-array inversion lists const"

This reverts commit 241136e0ed70738cccd6c4b20ce12b26231f30e5.
This continues the backing out of this topic branch.  A bisect shows
that the first commit exhibiting an error is the first one in the
branch.

10 years agoConsistent spaces after dots in perlhack.pod
Father Chrysostomos [Fri, 5 Jul 2013 01:30:56 +0000 (18:30 -0700)]
Consistent spaces after dots in perlhack.pod

10 years agoUse tabs consistently in AUTHORS
Father Chrysostomos [Fri, 5 Jul 2013 01:25:30 +0000 (18:25 -0700)]
Use tabs consistently in AUTHORS

10 years agoREADME.ko: remove blank line
Father Chrysostomos [Fri, 5 Jul 2013 01:25:16 +0000 (18:25 -0700)]
README.ko: remove blank line

This fixes a completely bogus failure from podcheck.t, something about
a verbatim section under NAME.

10 years agoAdd Keedi Kim to AUTHORS
Father Chrysostomos [Thu, 4 Jul 2013 20:22:39 +0000 (13:22 -0700)]
Add Keedi Kim to AUTHORS

10 years agoUpdate brand-new README.ko
Keedi Kim [Thu, 4 Jul 2013 17:11:12 +0000 (02:11 +0900)]
Update brand-new README.ko

10 years agoRevert "regcomp.c: Move some #defines to only file that uses them"
Karl Williamson [Fri, 5 Jul 2013 00:57:55 +0000 (18:57 -0600)]
Revert "regcomp.c: Move some #defines to only file that uses them"

This reverts commit 05944450e0fc82eb8fc1fb5a4bf63f23785262a0.
Blead won't compile with address sanitizer;  commit
7cb47964955167736b2923b008cc8023a9b035e8 reverting an earlier commit
failed to fix that.  I'm trying two more reversions to get it back
working.  This is one of those

10 years agoRevert "Create SVt_INVLIST"
Karl Williamson [Fri, 5 Jul 2013 00:55:11 +0000 (18:55 -0600)]
Revert "Create SVt_INVLIST"

This reverts commit e045dbedc7da04e20cc8cfccec8a2e3ccc62cc8b.
Blead won't compile with address sanitizer;  commit
7cb47964955167736b2923b008cc8023a9b035e8 reverting an earlier commit
failed to fix that.  I'm trying two more reversions to get it back
working.  This is one of those

10 years agoop.c: White-space only
Karl Williamson [Thu, 4 Jul 2013 22:08:05 +0000 (16:08 -0600)]
op.c: White-space only

Outdent to correspond with removed block

10 years agoPATCH: [perl #114178] di/ds/ig exempt from warnings in void context
Karl Williamson [Thu, 4 Jul 2013 22:00:45 +0000 (16:00 -0600)]
PATCH: [perl #114178] di/ds/ig exempt from warnings in void context

10 years agoRevert "Use new Svt_INVLIST for inversion lists."
Karl Williamson [Thu, 4 Jul 2013 21:19:48 +0000 (15:19 -0600)]
Revert "Use new Svt_INVLIST for inversion lists."

This reverts commit e0ce103ae532f9576f54a5938a24d1ee98dfb928.
This commit is failing compilations with address sanitizer, and we don't
know why.  This reverts it while we work that out.

10 years agoAdd non-XS extensions to known_extensions in configure.com.
Craig A. Berry [Thu, 4 Jul 2013 17:25:55 +0000 (12:25 -0500)]
Add non-XS extensions to known_extensions in configure.com.

Follow-up to f7b3892b9e45c6994.

For now we're not re-sorting known_extensions after combining the
XS and non-XS extensions into one list.  It would be pretty arduous
to do that in DCL and probably doesn't matter.

We special-case VMS::Filespec because (at least on VMS) it's an XS
extension so clearly doesn't belong in nonxs_ext.  Technically it's
static because it's XS bits live in vms/vms.c, but it's not clear
that it belongs in static_ext as those would normally be things
that require an extra link step (if such static linking even
works, which we don't know as it hasn't been tested in a long
time.)

10 years agoFix ext/VMS-Filespec/t/filespec.t after move in 2d11a7e9678a88.
Craig A. Berry [Thu, 4 Jul 2013 17:17:39 +0000 (12:17 -0500)]
Fix ext/VMS-Filespec/t/filespec.t after move in 2d11a7e9678a88.

Moving it caused it to fail because it expected test.pl to exist
in the directory it's being run from, but that isn't the case
anymore.  We can now just depend on the test infrastructure to
control @INC and don't need any special handling of library
directories.

10 years agorarest is only used under -DDEBUGGING
Tony Cook [Thu, 4 Jul 2013 06:20:40 +0000 (16:20 +1000)]
rarest is only used under -DDEBUGGING

This was warning under gcc 4.7.2

10 years agot/lib/warnings/utf8: Fix improper TODO test
Karl Williamson [Wed, 3 Jul 2013 04:05:31 +0000 (22:05 -0600)]
t/lib/warnings/utf8: Fix improper TODO test

This had the wrong syntax, but it wasn't caught because it is TODO
anyway.

10 years agoFix perlguts and comments for how sv_chop() works
Karl Williamson [Fri, 14 Jun 2013 03:52:14 +0000 (21:52 -0600)]
Fix perlguts and comments for how sv_chop() works

There is no 'integer' part of a SVt_PV, contrary to what perlguts said.
I also added a couple of comments to sv_chop() as I learned how it
really works.

10 years agoAdd test for undefined first argument to fileparse().
James E Keenan [Wed, 3 Jul 2013 00:03:53 +0000 (02:03 +0200)]
Add test for undefined first argument to fileparse().

10 years agoMerge branch 'const_posix_invlists' into blead
Karl Williamson [Thu, 4 Jul 2013 01:51:45 +0000 (19:51 -0600)]
Merge branch 'const_posix_invlists' into blead

What characters certain POSIX classes match, like [[:xdigit:]] are
compiled into a C header file, thus avoiding the necessity of reading
them in from disk at run-time.  This merge makes those fully const, so
that they can get loaded as part of a read-only text segment.  The sv's
that contain these are set so that SvLEN is 0; this means (from my
looking at the code without any experience in this area) that copies are
not made when they are dup'd, such as when threads are created.

A new svtype is created for inversion lists, using the single
available slot, renumbering them.

The first few commits instead use an existing svtype, repurposing
some of its fields for use by inversion lists.  This was done so that
this could be done in a maintenance release, if necessary.  (Their not
being fully const can interfere with -DPERL_GLOBAL_STRUCT_PRIVATE.)
And also, should it become necessary to create an svtype for some other
purpose, we can revert to that point in the branch.

10 years agoUse new Svt_INVLIST for inversion lists.
Karl Williamson [Tue, 2 Jul 2013 19:16:45 +0000 (13:16 -0600)]
Use new Svt_INVLIST for inversion lists.

This converts inversion lists to use their own scalar type.

10 years agoCreate SVt_INVLIST
Karl Williamson [Tue, 11 Jun 2013 22:57:22 +0000 (16:57 -0600)]
Create SVt_INVLIST

This reshuffles the svtype enum to remove the dummy slot created in a
previous commit, and add the new SVt_INVLIST type in its proper order.
It still is unused, but since it is an extension of SVt_PV, it must be
greater than that type's enum value.  Since it can't be upgraded to any
other PV type, it comes right after SVt_PV.

Affected tables in the core are updated.

10 years agoregcomp.c: Move some #defines to only file that uses them
Karl Williamson [Thu, 14 Feb 2013 00:21:18 +0000 (17:21 -0700)]
regcomp.c: Move some #defines to only file that uses them

These were used in a header file to provide synchronization between
files.  However, the only other file that would need them is a .pl file
which doesn't have access to them.  So simplify things so that the
variables are either removed entirely if only used in a single place, or
are #defined in the area where they are used

10 years agoregcomp.c: Make C-array inversion lists const
Karl Williamson [Wed, 13 Feb 2013 23:41:44 +0000 (16:41 -0700)]
regcomp.c: Make C-array inversion lists const

The inversion lists that are compiled into a C header are now const.

10 years agoregcomp.c: Move inversion list hdr field to SV hdr
Karl Williamson [Wed, 13 Feb 2013 23:33:09 +0000 (16:33 -0700)]
regcomp.c: Move inversion list hdr field to SV hdr

This moves the final field that can vary from the inversion list data
structure into the header of the SV that contains it.  With this commit,
the body of an inversion list is now const.

The field is converted to a U8, to correspond with the header field in
the SV type that we currently use to hold inversion lists.

10 years agoregcomp.c: Change, variable, fcn name
Karl Williamson [Tue, 12 Feb 2013 16:20:44 +0000 (09:20 -0700)]
regcomp.c: Change, variable, fcn name

These have always been slightly misnamed, but a recent commit made them
more so.  The old name contained "zero", but now there is a new element
which always has zero.  This element indicates whether the inversion
list is offset, that is if the beginning is the zero element, or if the
beginning is the next element beyond the zero element.

10 years agoregcomp.c: Move 2 hdr inversion fields to SV hdr
Karl Williamson [Tue, 12 Feb 2013 06:08:00 +0000 (23:08 -0700)]
regcomp.c: Move 2 hdr inversion fields to SV hdr

This commit continues the process of separating the header area of
inversion lists from the body.  2 more fields are moved out of the
header portion of the inversion list, and into the header portion of the
SV that contains it.

10 years agoregcomp.c: Remove unused data structure field
Karl Williamson [Wed, 13 Feb 2013 22:13:04 +0000 (15:13 -0700)]
regcomp.c: Remove unused data structure field

This removes a field that is set in the inversion list data structure
and examined just once.  And that sole examiner is the function that
calls the function that does the set.  In other words X calls Y passing
it data D.  Y puts D into a structure.  Upon return from Y, X looks for
D in the structure.  No one else looks at D.  X might just as well have
looked at D directly, without involving Y, and without the structure
needing a space for D.

10 years agoregcomp.c: Make inversion lists SVt_PVLV
Karl Williamson [Mon, 11 Feb 2013 22:23:40 +0000 (15:23 -0700)]
regcomp.c: Make inversion lists SVt_PVLV

This is the 2nd step in separating the inversion list body from header.
This commit gives inversion lists the header from a SVt_PVLV, and
repurposes one of its fields into being the length of the inversion
list.

This is a temporary measure, in case binary compatibility is an issue.
Future commits will create a new SV type just for inversion lists.
This SV type was chosen because it has a sufficient number of fields to
accommodate all the header fields from inversion lists.

10 years agoregcomp.c: Add a constant 0 element before inversion lists
Karl Williamson [Mon, 11 Feb 2013 19:07:00 +0000 (12:07 -0700)]
regcomp.c: Add a constant 0 element before inversion lists

This commit is the first step to separating the header from the body of
inversion lists.  Doing so will allow the compiled-in inversion lists to
be fully read-only.

To invert an inversion list, one simply unshifts a 0 to the front of it
if one is not there, and shifts off the 0 if it does have one.

The current data structure reserves an element at the beginning of each
inversion list that is either 0 or 1.  If 0, it means the inversion list
begins there; if 1, it means the inversion list starts at the next
element.  Inverting involves flipping this bit.

This commit changes the structure so that there is an additional element
just after the element that flips.  This new element is always 0, and
the flipping element now says whether the inversion list begins at the
constant 0 element, or the one after that.

Doing this allows the flipping element to be separated in later commits
from the body of the inversion list, which will always begin with the
constant 0 element.  That means that the body of the inversion list can
be const.

10 years agoRemove duplicate entry
H.Merijn Brand [Wed, 3 Jul 2013 14:32:08 +0000 (16:32 +0200)]
Remove duplicate entry

PERL_NEW_COPY_ON_WRITE was defined in both perl.h and perl.c
6617f9f1f8da06f5163a7942df475e7387d371cf removed the first

10 years agoMove Exporter from lib/ to dist/Exporter/
Nicholas Clark [Tue, 2 Jul 2013 15:15:01 +0000 (17:15 +0200)]
Move Exporter from lib/ to dist/Exporter/

Exporter has been considered dual life, upstream blead, since commit
6295adb525682844 (Sep 2006), but it was not moved to dist/ in 2009 with
the other dual-life modules because it was not possible to disentangle it
from the early stages of the build bootstrapping.

The build bootstrapping is now sufficiently simplified that it's possible
to move it to dist/

10 years agoDelete superfluous lines; clarify identifier parsing.
James E Keenan [Tue, 2 Jul 2013 23:20:23 +0000 (01:20 +0200)]
Delete superfluous lines; clarify identifier parsing.

Grammar correction suggested by Father Chrysostomos.
For RT #118723.

10 years ago[perl #118561] note that the check is fragile and refer to parent.pm
Tony Cook [Wed, 3 Jul 2013 00:46:59 +0000 (10:46 +1000)]
[perl #118561] note that the check is fragile and refer to parent.pm

10 years agoRevert "[perl #118561] failures loading modules are ignored when sub-package exists"
Tony Cook [Wed, 3 Jul 2013 00:33:52 +0000 (10:33 +1000)]
Revert "[perl #118561] failures loading modules are ignored when sub-package exists"

This reverts commit c4f21d8bae2372c750ff63b7e5df47996baa1f39.

This broke tests in Moose.

10 years agoperlretut.pod: Rephrase about \p{}.
Karl Williamson [Tue, 2 Jul 2013 21:28:44 +0000 (15:28 -0600)]
perlretut.pod: Rephrase about \p{}.

This is in response to ticket [perl #118667].  This commit removes the
confusing table of equivalent Unicode properties.  It contained material
about Unicode without adequate explanation beyond what a tutorial reader
would be expected to know, so I just pulled it out.  The POSIX classes
haven't been introduced at this point, which really are needed for
understanding this.  Below, where they are introduced, I believe the
examples make things adequately clear.

10 years agoperlretut.pod: Rephrase to be consistent with other pods
Karl Williamson [Tue, 2 Jul 2013 20:58:48 +0000 (14:58 -0600)]
perlretut.pod: Rephrase to be consistent with other pods

This pod was calling bracketed character classes as just plain
"character classes", but in one place it referred to the period as a
character class as well, which is the terminology used elsewhere.  This
commit notes the distinction.

10 years agoperlgit.pod: Remove one mention of p5p
Father Chrysostomos [Tue, 2 Jul 2013 20:13:44 +0000 (13:13 -0700)]
perlgit.pod: Remove one mention of p5p

We oughtn’t encourage people to send patches where they are likely
to be lost.

10 years agoIn the PERL_IMPLICIT_SYS section in perl_free(), use fewer CPP directives.
Nicholas Clark [Mon, 18 Jul 2011 18:49:28 +0000 (19:49 +0100)]
In the PERL_IMPLICIT_SYS section in perl_free(), use fewer CPP directives.

The diff is actually confusing to look at - the code itself makes things a
lot clearer:

#    ifdef NETWARE
        void *host = nw_internal_host;
        PerlMem_free(aTHXx);
        nw_delete_internal_host(host);
#    else
        void *host = w32_internal_host;
        PerlMem_free(aTHXx);
        win32_delete_internal_host(host);
#    endif

10 years agoIn embed.fnc, reorder the symbols conditional on HAVE_INTERP_INTERP.
Nicholas Clark [Mon, 18 Jul 2011 17:31:55 +0000 (18:31 +0100)]
In embed.fnc, reorder the symbols conditional on HAVE_INTERP_INTERP.

This reordering removes 2 pre-processor directives.

10 years agoTerser fix to avoid warning about an empty body for Slab_to_rw().
Nicholas Clark [Tue, 4 Sep 2012 21:05:09 +0000 (23:05 +0200)]
Terser fix to avoid warning about an empty body for Slab_to_rw().

Slab_to_rw() is only defined as a function with -DPERL_DEBUG_READONLY_OPS.
This approach to silencing the warning feels more robust, because it ensures
that Slab_to_rw() acts as a single statement whatever compile-time options
are used.

10 years agoTeach makedef.pl that PL_op_exec_cnt is only available with -DPERL_TRACE_OPS.
Nicholas Clark [Tue, 2 Jul 2013 19:23:46 +0000 (21:23 +0200)]
Teach makedef.pl that PL_op_exec_cnt is only available with -DPERL_TRACE_OPS.

10 years agoVery few PAD[HA]Vs are "LVALUE": branch predictor hints
Steffen Mueller [Tue, 2 Jul 2013 17:33:53 +0000 (19:33 +0200)]
Very few PAD[HA]Vs are "LVALUE": branch predictor hints

In a nutshell, very few PADHV and PADAV OPs are executed that have
the OPpLVAL_INTRO flag set. To wit, "my %h" does whereas "$h{foo}" and
similar (also "$h{foo} = 1") do not. Also, traditional lexicals greatly
outnumber state variables, so pessimize "state" slightly.

This was determined with a nifty new trick. With a Perl compiled with
-DPERL_TRACE_OPS, we get a summary of all executed op counts by type at
the end of the program execution. The above was figured out (naively) by
adding the following:

--- a/dump.c
+++ b/dump.c
@@ -2215,6 +2215,8 @@ Perl_runops_debug(pTHX)
     do {
 #ifdef PERL_TRACE_OPS
         ++PL_op_exec_cnt[PL_op->op_type];
+        if (PL_op->op_type == OP_PADHV && PL_op->op_private & OPpLVAL_INTRO)
+            ++PL_op_exec_cnt[OP_max+1];
 #endif
        if (PL_debug) {
            if (PL_watchaddr && (*PL_watchaddr != PL_watchok))

Which adds a special case (OP_max+1) to the OP report. Dividing that
count by the total PADHV count gives a diminishingly small percentage.

10 years ago-DPERL_TRACE_OPS to produce reports on executed OP counts
Steffen Mueller [Tue, 2 Jul 2013 17:06:01 +0000 (19:06 +0200)]
-DPERL_TRACE_OPS to produce reports on executed OP counts

This produces a report on the number of OPs of a given type that were
executed at the end of a program run. This can be useful in multiple
ways. One, it can help determine hotspots for optimization (yes, I know
execution count is not equal execution time). It can also help with
determining whether a given change to perl has had the desired effect on
deterministic programs.

10 years agoRemove defunct DESCRIP.MMS cleanup rules.
Nicholas Clark [Mon, 17 Jun 2013 13:52:30 +0000 (15:52 +0200)]
Remove defunct DESCRIP.MMS cleanup rules.

Rules to remove C and object files from vms/ext were made redundant when
commit 26dd53a231877708 in Sep 2009 moved the XS extensions from there to
ext/

The wildcard rule to remove t/lib/vms*.t, which has been in
vms/descrip_mms.template since the file was added by commit 97abc6adffcd3efc
in June 1998 was effectively made redundant when it was duplicated by 4
specific rules for the 4 files it matched added by commit 493ba88a837f5a6b
in June 2001.

The rule to delete t/lib/vmsish.t was made redundant when vms/ext/vmsish.*
were moved to lib/ by commit 9f84c00564fd021b in Nov 2001.

10 years agoMove VMS::Filespec from vms/ext to ext/
Nicholas Clark [Mon, 17 Jun 2013 09:49:39 +0000 (11:49 +0200)]
Move VMS::Filespec from vms/ext to ext/

This simplifies the VMS Makefile. It would have simplified the VMS Makefile
further if it had had the correct rules to delete [.lib.VMS]Filespec.pm
which are now no longer needed. (The generated ext/VMS-Filespec/DESCRIP.MMS
will now take care of this.)

10 years agovms/ext/filespec.t does not need to be +x
Nicholas Clark [Mon, 17 Jun 2013 09:37:50 +0000 (10:37 +0100)]
vms/ext/filespec.t does not need to be +x

The mode of this file has rattled back and forth between +x and -x since it
was first added. It makes no difference which it is, so remove -x and hence
1 special case.

10 years agoMerge in the improvements to the build helper module FindExt.
Nicholas Clark [Tue, 2 Jul 2013 13:33:46 +0000 (15:33 +0200)]
Merge in the improvements to the build helper module FindExt.

10 years agoRefactor FindExt, merging scan_ext() and find_ext().
Nicholas Clark [Mon, 17 Jun 2013 09:27:16 +0000 (11:27 +0200)]
Refactor FindExt, merging scan_ext() and find_ext().

The return value of FindExt::scan_ext() has never been used, since FindExt
was first added by commit 8e2329934bcca9c5 in April 2001. The call to
FindExt::extensions() has no side effects, so it can be eliminated. Hence
FindExt::scan_ext() is a trivial wrapper around FindExt::find_ext(), and the
two can be merged.

Also, simplify the logic for "known" extensions. The complexity of checking
the hash first was needed when extension directories were nested. It should
have been removed as part of commit 1f8a0b38638b171c in Feb 2009.

10 years agoSkip most of FindExt's tests for troublesome configurations.
Nicholas Clark [Mon, 17 Jun 2013 08:50:33 +0000 (10:50 +0200)]
Skip most of FindExt's tests for troublesome configurations.

There are various various things that break the test's assumptions.
1) If Encode is a static extension, then Configure has special case logic
   to add Encode/* as static extensions
2) -Uusedl causes Encode to be a static extension, and drops building
    XS::APItest and XS::Typemap
3) Any use of -Dnoextensions to choose not to build a extension is not known
   by the test

If any of these are true, FindExt::extensions() and $Config{extensions} will
differ, and most of the tests are going to fail. Moreover, failure doesn't
tell us anything interesting. So don't run those tests.

10 years agoIn FindExt.t, move the main loop's comparison logic into a subroutine.
Nicholas Clark [Mon, 17 Jun 2013 08:19:48 +0000 (10:19 +0200)]
In FindExt.t, move the main loop's comparison logic into a subroutine.

10 years agoMinor refactors to FindExt's test, removing code duplication.
Nicholas Clark [Fri, 14 Jun 2013 09:28:31 +0000 (11:28 +0200)]
Minor refactors to FindExt's test, removing code duplication.

Use a ternary instead of if/unless on the same $^O test.
Use a loop to call FindExt::scan_ext()
As FindExt exports nothing, we can require it rather than using it.

10 years agoThanks to FindExt::apply_config() we're now able to test dynamic extensions.
Nicholas Clark [Wed, 5 Jun 2013 19:19:12 +0000 (21:19 +0200)]
Thanks to FindExt::apply_config() we're now able to test dynamic extensions.

FindExt::apply_config() mimic's Configure's logic, which means that FindExt's
idea of which extensions should be built is consistent with Configure's.

10 years agoCorrect a type in FindExt::apply_config in the "I18N-Langinfo" code.
Nicholas Clark [Wed, 5 Jun 2013 18:15:12 +0000 (20:15 +0200)]
Correct a type in FindExt::apply_config in the "I18N-Langinfo" code.

Commit 557ab4cb986767c7 (Feb 2011) which added this routine had
$config->{i_nl_langinfo} not $config->{d_nl_langinfo} ('i' should be 'd').

The logic for I18N::Langinfo should now be correct.

10 years agoIn FindExt, eliminate _ext_ne() and make extensions() a simple subroutine.
Nicholas Clark [Fri, 14 Jun 2013 15:10:31 +0000 (17:10 +0200)]
In FindExt, eliminate _ext_ne() and make extensions() a simple subroutine.

Previously _ext_ne() was a generator function, and extensions() and
known_extensions() were generated by it. Now that known_extensions() has a
different implementation, extensions() was the last user of _ext_ne(), so
there's no saving by keeping the complexity.

10 years agoAlso add Encode's sub-modules to known_extensions when building statically.
Nicholas Clark [Tue, 18 Jun 2013 10:00:38 +0000 (12:00 +0200)]
Also add Encode's sub-modules to known_extensions when building statically.

There is code in Configure to treat Encode specially when it is specified as
a statically linked extension. By default, Encode builds separated shared
objects for each of its subdirectories. This works well with DynaLoader,
and the top level perl Makefile doesn't even notice this, because it doesn't
have to list these libraries as things it links with at compile time.

For a static link, Encode builds a separate *.a file for each of its
subdirectories. The top level Makefile *does* need to know about these, as
a static link requires them all to be listed. Hence the work-around is to
treat Encode as a set of nested modules if linked statically.

We can't do this in Makefile.SH because the various Encode submodules are
installed as separate *.a files in the tree, and so need to continue to be
treated as distinct modules in case ExtUtils::MakeMaker is asked to (re)link
a static perl with an additional extension.

I suspect that the most elegant fix would be to tweak Encode's top level
Makefile.PL to link everything into one *.a if it is building statically.
I'm not sure how to do that, and it would need to be accepted upstream.

10 years agoAdd non-XS extensions to known_extensions.
Nicholas Clark [Fri, 14 Jun 2013 14:56:28 +0000 (16:56 +0200)]
Add non-XS extensions to known_extensions.

Previously "known_extensions" was misnamed, as it only contained known XS
extensions. grep.cpan.me suggests that there are only 10 mentions of it
outside the core, and none of them rely on this existing behaviour.

Update the descriptions of extensions, known_extensions and nonxs_ext in
Porting/Glossary.

These changes need replicating into configure.com.

10 years agoRemove Configure code that supported the old-style nested layout for ext/
Nicholas Clark [Fri, 14 Jun 2013 14:19:06 +0000 (16:19 +0200)]
Remove Configure code that supported the old-style nested layout for ext/

5.10.1 switched to the new layout, so this code would only be useful for
backporting to maint-5.8. That isn't going happen, so it can go.

10 years agoTrim the explicit Makefile rules to generate {mini,}perlmain.o
Nicholas Clark [Mon, 30 Apr 2012 16:00:39 +0000 (18:00 +0200)]
Trim the explicit Makefile rules to generate {mini,}perlmain.o

These duplicate the suffix rules used for general .c -> .o compilation.
makedepend automatically generates a dependency for miniperlmain.o on
patchlevel.h

10 years agoOP*method was added in c106c2be8b83ee but never used
Tony Cook [Tue, 2 Jul 2013 05:27:12 +0000 (15:27 +1000)]
OP*method was added in c106c2be8b83ee but never used

10 years agoBranch predictor hints: exists is mostly run on hashes
Steffen Mueller [Tue, 2 Jul 2013 05:25:45 +0000 (07:25 +0200)]
Branch predictor hints: exists is mostly run on hashes

10 years agoS_strip_spaces doesn't need to be seen out of core
Peter Martini [Mon, 1 Jul 2013 20:09:02 +0000 (16:09 -0400)]
S_strip_spaces doesn't need to be seen out of core

10 years agoPatches must not be sent via git's format-patch/send-email
Tony Cook [Tue, 25 Jun 2013 06:43:35 +0000 (16:43 +1000)]
Patches must not be sent via git's format-patch/send-email

updated to match perlgit.pod

10 years ago#118675 fix 4 porting/pod_rules.t uses different perl than compiled one
Daniel Dragan [Sat, 29 Jun 2013 00:53:12 +0000 (20:53 -0400)]
#118675 fix 4 porting/pod_rules.t uses different perl than compiled one

See rt ticket #118675 for background on this patch.

10 years agodist/lib/Makefile.PL: change INSTALLDIRS to 'site' for 5.12 and later
Brian Gottreu [Tue, 2 Jul 2013 00:54:03 +0000 (19:54 -0500)]
dist/lib/Makefile.PL: change INSTALLDIRS to 'site' for 5.12 and later

10 years agoperldelta for c448c12411b1ba
Tony Cook [Tue, 2 Jul 2013 01:25:29 +0000 (11:25 +1000)]
perldelta for c448c12411b1ba

10 years agoMake perlbug look up the list of local patches at run time
Niko Tyni [Thu, 27 Jun 2013 11:37:01 +0000 (14:37 +0300)]
Make perlbug look up the list of local patches at run time

Re-parsing patchlevel.h in Perl by perlbug.PL is error prone
and apparently unnecessary. The same information is available
to perlbug via Config::local_patches().

This fixes [perl #118433].

10 years agoFix to make 8d455b9f99c1046e969462419b0eb5b8bf740a47 not a lie
Steffen Mueller [Mon, 1 Jul 2013 19:29:14 +0000 (21:29 +0200)]
Fix to make 8d455b9f99c1046e969462419b0eb5b8bf740a47 not a lie

Previous commit 8d455b9f99c1046e969462419b0eb5b8bf740a47 was a partial
lie. This commit fixes it up not to be a lie and to avoid mortalizing
the HV.

10 years agoAvoid needless refcount and mortialization on pp_anonhash
Steffen Mueller [Mon, 1 Jul 2013 18:33:05 +0000 (20:33 +0200)]
Avoid needless refcount and mortialization on pp_anonhash

pp_anonhash can be used to construct both bare hashes and hashrefs. In
the hashref case, it used to create an HV and mortalize it. Then it went
through the parameters on the stack and copied them into the hashref.
This can throw exceptions which would make the HV leak if it hadn't been
mortalized.

After potentially copying the arguments, pp_anonhash would then in the
hashREF case increment the refcount on the HV *again*, create an RV for
the HV, and mortalize that RV before pushing it on the stack.

Instead, we can get away with constructing the HV and only mortalizing
it if there's no mortalizable ref to clean up if there's an exception.
This should remove a fair fraction of work in the common case of empty {}
hash ref construction.

10 years agoFix regex seqfault 5.18 regression
Karl Williamson [Mon, 1 Jul 2013 16:26:14 +0000 (10:26 -0600)]
Fix regex seqfault 5.18 regression

This segfault is a result of an optimization that can leave the
compilation in an inconsistent state.

  /f{0}/

doesn't match anything, and hence should be removable from the regex for
all f.  However,

  qr{(?&foo){0}(?<foo>)}

caused a segfault.  What was happening prior to this commit is that
(?&foo) refers to a named capture group further along in the regex.
The "{0}" caused the "(?&foo)" to be discarded prior to setting up the
pointers between the two related subexpressions; a segfault follows.

This commit removes the optimization, and should be suitable for a
maintenance release.

One might think that no one would be writing code like this, but this
example was distilled from machine-generated code in Regexp::Grammars.

Perhaps this optimization can be done, but the location I chose for
checking it was during parsing, which turns out to be premature.  It
would be better to do it in the optimization phase of regex compilation.
Another option would be to retain it where it was, but for it to operate
only on a limited set of nodes, such as EXACTish, which would have no
unintended consequences.  But that is for looking at in the future; the
important thing is to have a simple patch suitable for fixing this
regression in a maintenance release.

For the record, the code being reverted was mistakenly added by me in
commit 3018b823898645e44b8c37c70ac5c6302b031381, and wasn't even
mentioned in that commit message.  It should have had its own commit.

10 years agoMerge the branch that purged various under-used Makefile targets.
Nicholas Clark [Mon, 1 Jul 2013 09:40:12 +0000 (11:40 +0200)]
Merge the branch that purged various under-used Makefile targets.

10 years agoDocument the removed Makefile targets in perldelta.
Nicholas Clark [Mon, 1 Jul 2013 09:39:39 +0000 (11:39 +0200)]
Document the removed Makefile targets in perldelta.

10 years agoIn perlhacktips, suggest a shell loop to generate all .gcov files.
Nicholas Clark [Thu, 20 Jun 2013 14:46:05 +0000 (16:46 +0200)]
In perlhacktips, suggest a shell loop to generate all .gcov files.

10 years agoEliminate the perl.gprof and perl.gcov Makefile targets.
Nicholas Clark [Thu, 20 Jun 2013 11:52:15 +0000 (13:52 +0200)]
Eliminate the perl.gprof and perl.gcov Makefile targets.

I don't feel that it's worthwhile having specific named targets for
building named binaries for use with gprof and gcov given that one has to
(re)Configure with the appropriate C compiler flags, hence all the object
files and the F<perl> that the build tree would build are just as enabled
(or contaminated) with profiling code as the specially named binary.

Update the documentation on using gprof and gcov to reflect that the binary
named F<perl> is now the binary that is profiled.

10 years agoRun Porting/podtidy on pod/perlhacktips.pod
Nicholas Clark [Thu, 20 Jun 2013 09:00:34 +0000 (11:00 +0200)]
Run Porting/podtidy on pod/perlhacktips.pod

10 years agoUpdate perlhacktips to note that Address Sanitizer is now also in gcc 4.8
Nicholas Clark [Thu, 20 Jun 2013 08:51:17 +0000 (10:51 +0200)]
Update perlhacktips to note that Address Sanitizer is now also in gcc 4.8

Also s/linux/Linux/ in two places.

10 years agoIn perlhacktips, no need to give 3 ways to set an environment variable.
Nicholas Clark [Thu, 20 Jun 2013 08:15:31 +0000 (10:15 +0200)]
In perlhacktips, no need to give 3 ways to set an environment variable.

10 years agoRemove the explicit purify/quantify/purecov targets and documentation.
Nicholas Clark [Thu, 20 Jun 2013 08:01:20 +0000 (10:01 +0200)]
Remove the explicit purify/quantify/purecov targets and documentation.

It's not clear whether IBM still sell quantify or purecov. They still seem
to sell purify, but I'm not sure if anyone is using it these days to detect
bugs in perl.

This doesn't prevent anyone from using these tools if they have them, as
it's still possible to run the commands by "hand". But by removing probably
unused code and documentation, the signal to noise ratio improves.

10 years agoWe don't actually need to set $ENV{PERL} for the tests to work.
Nicholas Clark [Wed, 19 Jun 2013 19:39:39 +0000 (21:39 +0200)]
We don't actually need to set $ENV{PERL} for the tests to work.

Whatever the executable is named at the top level, it's always symlinked
as ./perl in t, so there's no need to set an environment variable to
override the expected name.

10 years agovalgrind doesn't require that perl was built with -g, so remove the check.
Nicholas Clark [Wed, 19 Jun 2013 19:13:45 +0000 (21:13 +0200)]
valgrind doesn't require that perl was built with -g, so remove the check.

C<make test.valgrind> will run quite happily on a perl built with
optimisation and without debugging symbols. So don't enforce -g.

10 years agoInline the Makefile target minitest.prep into its only user.
Nicholas Clark [Wed, 19 Jun 2013 12:09:55 +0000 (14:09 +0200)]
Inline the Makefile target minitest.prep into its only user.

This is strictly a refactoring, so do not change the rules themselves, despite
them being ugly and fragile.

10 years agoRemove Makefile targets and tools related to Irix and Tru64 debugging tools.
Nicholas Clark [Wed, 19 Jun 2013 11:37:25 +0000 (13:37 +0200)]
Remove Makefile targets and tools related to Irix and Tru64 debugging tools.

Remove the targets:

perl.pixie perl.pixie.atom perl.pixie.config perl.pixie.irix perl.third
perl.third.config

It's still possible to run the actions these targets "by hand", if desired.
This commit removes the convenience targets from the Makefile, reducing its
complexity. It also removes the related support scripts testall.atom and
thirdclean from Porting/

pixie is a performance analysis tool for Irix and Tru64
Third Degree is a memory checker tool for Tru64

Given that Tru64 went out of support at the end of 2012, and Irix goes out
of support at the end of 2013, it's very unlikely that anyone is still
actively profiling or debugging perl on either platform, and hence using
these targets. It's been several years since we've even had a regular bug
report from either platform.

10 years agoRemove various rarely used test targets from the generated Makefile.
Nicholas Clark [Wed, 19 Jun 2013 10:35:33 +0000 (12:35 +0200)]
Remove various rarely used test targets from the generated Makefile.

Remove these targets and their documentation:

check.third check.utf16 check.utf8 coretest minitest.utf16 test.deparse
test.taintwarn test.third test.torture test.utf16 test.utf8
test_notty.deparse test_notty.third test_prep.third torturetest ucheck
ucheck.third ucheck.utf16 ucheck.valgrind utest utest.third utest.utf16
utest.valgrind

It's still possible to run the actions these targets "by hand", if desired.
This commit simply removes the convenience targets from the Makefile,
reducing its complexity.

10 years ago[perl #71680] hints to use gdbm compat for [NO]DBM_File on Win32
Tony Cook [Mon, 24 Jun 2013 06:27:42 +0000 (16:27 +1000)]
[perl #71680] hints to use gdbm compat for [NO]DBM_File on Win32

10 years agoSmall stylistic improvement; add one POD formatting character.
James E Keenan [Sat, 26 Jan 2013 15:05:29 +0000 (10:05 -0500)]
Small stylistic improvement; add one POD formatting character.

10 years agoGive little more examples to interpolated typemap variables
Hojung Youn [Fri, 25 Jan 2013 09:52:53 +0000 (18:52 +0900)]
Give little more examples to interpolated typemap variables

Added an example for $type Perl variable interpolated by typemap.
and adjusted an example of $ntype Perl variable of typemap to
illustrate its effect.

10 years agoMake t/comp/parser.t get the correct libraries.
Craig A. Berry [Mon, 1 Jul 2013 02:09:21 +0000 (21:09 -0500)]
Make t/comp/parser.t get the correct libraries.

In principle it shouldn't need libraries, but an eval of a utf8
constant now triggers automatic loading of utf8.pm, and it was
looking for that in the usual @INC locations set at configuration
time.  Which just might match an installed perl rather than the
perl being tested.  So make sure we get the correct libraries.

10 years agochange tied_method to use SVs with precomputed hash values
Ruslan Zakirov [Mon, 25 Feb 2013 09:46:02 +0000 (13:46 +0400)]
change tied_method to use SVs with precomputed hash values

10 years agochange magic_methcall to use SV with shared hash value
Ruslan Zakirov [Sun, 24 Feb 2013 12:05:51 +0000 (16:05 +0400)]
change magic_methcall to use SV with shared hash value

Perl_magic_methcall is not public API, so there is no
need to add another function and we can just change
function's arguments.

10 years agoSV_CONST(name) and PL_sv_consts
Ruslan Zakirov [Mon, 25 Mar 2013 01:31:35 +0000 (05:31 +0400)]
SV_CONST(name) and PL_sv_consts

SV_CONST(XXX) returns SV* that contains "XXX" string.
SVs are built on demand and stored in interp's structure
for re-use. All SVs have precomputed hash value.

Creates SVs on demand, we don't want 35 SV created during
compile time or cloned during thread creation.

10 years agoG_METHOD_NAMED flag for call_method and call_sv
Ruslan Zakirov [Sat, 29 Sep 2012 16:41:10 +0000 (20:41 +0400)]
G_METHOD_NAMED flag for call_method and call_sv

Can be used when it's known that method name has no
package part - just method name.

With flag set SV with precomputed hash value is used
and pp_method_named is called instead of pp_method.
Method lookup is faster.

10 years agoperldiag: Consistent spaces after dots
Father Chrysostomos [Sun, 30 Jun 2013 06:44:30 +0000 (23:44 -0700)]
perldiag: Consistent spaces after dots

10 years agoUpdate IPC-Cmd to CPAN version 0.82
Chris 'BinGOs' Williams [Sat, 29 Jun 2013 21:34:17 +0000 (22:34 +0100)]
Update IPC-Cmd to CPAN version 0.82

  [DELTA]

  Changes for 0.82    Sat Jun 29 22:11:22 BST 2013
  =================================================
  * Typo fixes (David Steinbrunner)

10 years agoop.c: Suppress compiler warning
Father Chrysostomos [Sat, 29 Jun 2013 01:31:26 +0000 (18:31 -0700)]
op.c: Suppress compiler warning

Sorry, commit 08aff5359 was not quite ready and I pushed it too soon.

The purpose of the if block that it removed was to suppress a warn-
ing about an unused variable, but it was a very strange way of accom-
plishing that.

We have a much simpler way that takes only one line and expresses its
intent clearly.

10 years agoregenerate t/porting/known_pod_issues.dat
Brian Gottreu [Fri, 28 Jun 2013 23:43:41 +0000 (18:43 -0500)]
regenerate t/porting/known_pod_issues.dat

10 years agoRun the pedantic checks when regenerating the database
Brian Gottreu [Fri, 28 Jun 2013 23:07:49 +0000 (18:07 -0500)]
Run the pedantic checks when regenerating the database

Make the two checks of possible poor uses of C<>
pedantic checks.

Allow --pedantic to turn on those tests in addition to
the environmnt variable.