platform/upstream/perl.git
11 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.

11 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.

11 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.

11 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

11 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.

11 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.

11 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.

11 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.

11 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.

11 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.

11 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.

11 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

11 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/

11 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.

11 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

11 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.

11 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.

11 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.

11 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.

11 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

11 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.

11 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.

11 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.

11 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.

11 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.

11 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.

11 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.)

11 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.

11 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.

11 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.

11 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.

11 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.

11 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.

11 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.

11 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.

11 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.

11 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.

11 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.

11 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.

11 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

11 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

11 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

11 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

11 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

11 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.

11 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

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

11 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].

11 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.

11 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.

11 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.

11 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.

11 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.

11 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.

11 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.

11 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

11 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.

11 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.

11 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.

11 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.

11 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.

11 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.

11 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.

11 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.

11 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

11 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.

11 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.

11 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.

11 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

11 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.

11 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.

11 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.

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

11 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)

11 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.

11 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

11 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.

11 years agodo not worry about long verbatim lines w/o env var
Ricardo Signes [Tue, 18 Jun 2013 23:45:56 +0000 (19:45 -0400)]
do not worry about long verbatim lines w/o env var

To run these tests, set PERL_POD_PEDANTIC in the environment.

This needs further testing, at least, to ensure that it behaves correctly
when regenerating the known problem files.

11 years agoRevert "Make t/podcheck.t less sensitive"
Ricardo Signes [Tue, 18 Jun 2013 23:27:11 +0000 (19:27 -0400)]
Revert "Make t/podcheck.t less sensitive"

This reverts commit f26da014a698383ac348973050af3e754752e6ab.

Conflicts:
t/porting/known_pod_issues.dat

11 years agoop.c: Remove dummy code from const_sv_xsub
Father Chrysostomos [Fri, 28 Jun 2013 21:24:59 +0000 (14:24 -0700)]
op.c: Remove dummy code from const_sv_xsub

This was added in commit 9cbac4c7 with no explanation.  It has been
#ifdeffed out since it was added.  That commit was supposedly just for
compiler warnings.  I think this was something else the author was
playing with that got combined in the same patch by mistake.

11 years agoperlfunc: consistent spaces after dots
Father Chrysostomos [Fri, 28 Jun 2013 19:45:41 +0000 (12:45 -0700)]
perlfunc: consistent spaces after dots

plus one typo fix

11 years agoClarify variable lists for my, our, state.
Johan Vromans [Mon, 24 Jun 2013 07:23:49 +0000 (09:23 +0200)]
Clarify variable lists for my, our, state.

11 years ago7b2d3c0 Added description of the Benchmark object to doc
Neil Bowers [Wed, 26 Jun 2013 21:53:55 +0000 (22:53 +0100)]
7b2d3c0 Added description of the Benchmark object to doc

11 years agoop.c:cv_ckproto_len_flags: do null checks first
Father Chrysostomos [Fri, 28 Jun 2013 07:09:02 +0000 (00:09 -0700)]
op.c:cv_ckproto_len_flags: do null checks first

Checking local variables for nullness is faster than calling ckWARN_d,
which involves a function call.

11 years agoReinstate UTF8f
Father Chrysostomos [Wed, 26 Jun 2013 03:31:54 +0000 (20:31 -0700)]
Reinstate UTF8f

This format string allows char*s to be interpolated with the
utf8ness and length specified as well, avoiding the need to create
extra SVs:

Perl_croak(aTHX_ "Couldn't twiggle the twoggle in \"%"UTF8f"\"",
                  UTF8fARG(is_utf8, len, s));

This is the second attempt.

I screwed up in commits 1c8b67b38f0a5 and b3e714770ee1 because
I didn’t really understand how varargs functions receive their
arguments.

They are like structs, in that different members can be different
sizes.  So therefore both ends--the caller and the called--*must* get
the casts right, or the data will be corrupted.

The main mistake I made was to use %u in the format for the first
argument and then retrieve it as UV (a simple typo, I meant unsigned
int or U32--I don’t remember).

To be on the safe side, I added a UTF8fARG macro (after SVfARG), which
(unlike SVfARG) takes three arguments and casts them explicitly, mak-
ing it much harder to get this wrong at call sites.

11 years agomake sure the prototype actually matches
Tony Cook [Fri, 28 Jun 2013 01:55:27 +0000 (11:55 +1000)]
make sure the prototype actually matches

because:

a) I think it better demonstrates the fix, the following failed without
the patch:

./perl -Ilib -le 'my $proto = "\x{30cd}"; eval "sub f($proto) {}"; print prototype(\&f); print prototype(\&f) eq $proto'

b) I can envision bugs that might preserve UTF-8 but mis-manage the content

11 years agopad.c, S_cv_clone: Maintain the utf8-ness of the cloned cv
Brian Fraser [Sun, 24 Mar 2013 08:58:43 +0000 (05:58 -0300)]
pad.c, S_cv_clone: Maintain the utf8-ness of the cloned cv

Because of a missing SvUTF8_on() in cv_clone(), these two were different:

    use utf8;
    eval "   sub foo ($;\x{30cd});"
    eval "my sub foo ($;\x{30cd});"

Because the lexical version would lose the UTF8 flag in the
prototype.

11 years agoperlexperiment: mark :pop layer as accepted
Ricardo Signes [Thu, 27 Jun 2013 02:12:34 +0000 (22:12 -0400)]
perlexperiment: mark :pop layer as accepted

11 years agoMANIFEST: add t/porting/readme.t
Brian Gottreu [Thu, 27 Jun 2013 03:11:17 +0000 (22:11 -0500)]
MANIFEST: add t/porting/readme.t

11 years agoFix Porting/README.pod so it passes its new test.
Brian Gottreu [Thu, 27 Jun 2013 00:44:34 +0000 (19:44 -0500)]
Fix Porting/README.pod so it passes its new test.

Added entries for sync-with-cpan and README.pod itself.  Rearranged
entries to be sorted consistently.

11 years agot/porting/readme.t: Check Porting/README.pod consistency
Brian Gottreu [Thu, 27 Jun 2013 00:39:25 +0000 (19:39 -0500)]
t/porting/readme.t: Check Porting/README.pod consistency

This is a slightly expanded (or bloated) version of the patch
Dennis Kaarsemaker <dennis@kaarsemaker.net> submitted.

11 years agoCorrect the SYNOPSIS for Module::CoreList::Utils
Chris 'BinGOs' Williams [Thu, 27 Jun 2013 15:15:32 +0000 (16:15 +0100)]
Correct the SYNOPSIS for Module::CoreList::Utils

11 years agoUpdate HTTP-Tiny to CPAN version 0.034
Chris 'BinGOs' Williams [Thu, 27 Jun 2013 10:04:53 +0000 (11:04 +0100)]
Update HTTP-Tiny to CPAN version 0.034

  [DELTA]

0.034     2013-06-26 19:02:25 America/New_York

  [ADDED]

  - Added support for 'Basic' authorization from
    user:password parameters in the URL

11 years agocv_ckproto should disregard spaces
Peter Martini [Thu, 27 Jun 2013 04:06:16 +0000 (00:06 -0400)]
cv_ckproto should disregard spaces

This included some refactoring to break down the original
large if block into smaller, more manageable chunks,
although the only functional change was to pass the two
string buffers through S_strip_spaces.

11 years agot/re/reg_mesg.t: Add diagnostic output on some failures
Karl Williamson [Wed, 26 Jun 2013 23:51:36 +0000 (17:51 -0600)]
t/re/reg_mesg.t: Add diagnostic output on some failures

11 years ago[perl #117751] prevent POSIX::AUTOLOAD recursing if POSIX$(so) fails to load
Aristotle Pagaltzis [Thu, 27 Jun 2013 01:55:13 +0000 (11:55 +1000)]
[perl #117751] prevent POSIX::AUTOLOAD recursing if POSIX$(so) fails to load

11 years agoUse -Wno-unused-value also on other clang compilers
Reini Urban [Mon, 8 Apr 2013 17:25:27 +0000 (12:25 -0500)]
Use -Wno-unused-value also on other clang compilers

clang++ or clang-3.2, ...

11 years ago[perl #117535, #76910] Fix bogus ambiguity warnings
Father Chrysostomos [Thu, 27 Jun 2013 01:03:04 +0000 (18:03 -0700)]
[perl #117535, #76910] Fix bogus ambiguity warnings

‘Ambiguous use of * resolved as operator *’: This message can occur in
cases where there is no multiplication operator, so what it is saying
is completely wrong.

When the lexer parses a bareword, it looks at the previous character
and warns if it happens to match /[*%&]/, so foo**bar and foo&&bar
result in this warning, as does print $%foo.

The purpose of the code is to catch *bar *bar or &black &sheep.

To avoid false positives, when emitting one of the three operators
* % & the lexer can record that fact, so when it sees a bareword pre-
ceded by one of those three characters, instead of guessing that the
infix operator was used, it will *know*.

The test cases added also trigger ‘Bareword found where operator
expected’.  I don’t know whether that should change, but at least the
current behaviour is tested, so we will know when it does change.

11 years agoregen/genpacksizetables.pl: Add comment
Karl Williamson [Wed, 26 Jun 2013 21:52:01 +0000 (15:52 -0600)]
regen/genpacksizetables.pl: Add comment

11 years agoperlguts: Nit
Karl Williamson [Wed, 26 Jun 2013 21:50:37 +0000 (15:50 -0600)]
perlguts: Nit