This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Karl Williamson [Tue, 8 Jul 2014 16:29:13 +0000 (10:29 -0600)]
utf8_heavy.pl: Fix nit in comment
David Mitchell [Mon, 21 Jul 2014 15:02:23 +0000 (16:02 +0100)]
cpan/Time-HiRes/t/itimer.t: better diagnostics
This test is failing some smokes. Add better diagnostics to see what's
going on.
Since this is a CPAN-first module, this commit either needs backing out at
some point, or merging upstream.
Dagfinn Ilmari Mannsåker [Sun, 8 Jun 2014 00:37:32 +0000 (01:37 +0100)]
Disallow importing functions from UNIVERSAL
It's been deprecated since v5.12.
Karl Williamson [Sun, 20 Jul 2014 16:38:25 +0000 (10:38 -0600)]
Regen podcheck db for new long verbatims in perlepigraph
Karl Williamson [Tue, 15 Jul 2014 22:05:12 +0000 (16:05 -0600)]
perlop: Grammatical nit.
'either' refers only to one of two possibilities. Since this
has more than that, 'either' is grammatically incorrect.
Abigail [Sun, 20 Jul 2014 15:25:04 +0000 (17:25 +0200)]
Upped version numbers for ModuleList
Abigail [Sun, 20 Jul 2014 15:12:05 +0000 (17:12 +0200)]
Bump version number from 5.21.2 to 5.21.3
Abigail [Sun, 20 Jul 2014 14:51:11 +0000 (16:51 +0200)]
New perldelta.
Abigail [Sun, 20 Jul 2014 12:43:59 +0000 (14:43 +0200)]
Installing Inline no longer installs Inline::C.
So, when testing cpan, install Inline::C.
Abigail [Sun, 20 Jul 2014 14:36:36 +0000 (16:36 +0200)]
Epigraph for 5.21.2
Abigail [Sun, 20 Jul 2014 14:16:38 +0000 (16:16 +0200)]
Merge branch 'release-5.21.2' into blead
Conflicts:
t/porting/libperl.t
Jarkko Hietaniemi [Sun, 20 Jul 2014 13:10:27 +0000 (09:10 -0400)]
Warn against tmpfile, and mention perlclib.
Jarkko Hietaniemi [Sun, 20 Jul 2014 12:00:59 +0000 (08:00 -0400)]
Skip symbols for which Configure found no support.
Jarkko Hietaniemi [Sun, 20 Jul 2014 11:33:12 +0000 (07:33 -0400)]
Comments for dlopen.
Jarkko Hietaniemi [Sun, 20 Jul 2014 11:30:17 +0000 (07:30 -0400)]
Expect sqrtl instead of sqrt if applicable.
Abigail [Sun, 20 Jul 2014 11:33:42 +0000 (13:33 +0200)]
Adjust
31e62fa1f35be3aceacc7fa62ce72d7131299a9a
It seems that 'sqrt' is not always called as a system call, in particular,
when compiling with -Dusemorebits
Abigail [Sun, 20 Jul 2014 02:08:08 +0000 (04:08 +0200)]
Add new release to perlhist
Abigail [Sun, 20 Jul 2014 01:50:54 +0000 (03:50 +0200)]
Acknowledgement section of perldelta
Abigail [Sun, 20 Jul 2014 01:42:20 +0000 (03:42 +0200)]
Listed updated modules.
Abigail [Sun, 20 Jul 2014 01:05:59 +0000 (03:05 +0200)]
Update Module::CoreList for 5.21.2
Abigail [Sat, 19 Jul 2014 22:50:34 +0000 (00:50 +0200)]
Revert "Update HTTP-Tiny to CPAN version 0.044"
This reverts commit
43bf4e6652b9fc743b1dbbc5153ced8b08779e84.
HTTP::Tiny contains tests that requires a connection to www.example.com.
These tests fail if run behind a firewall.
Jarkko Hietaniemi [Sat, 19 Jul 2014 14:03:15 +0000 (14:03 +0000)]
Add fgets+tmpfile to avoidables, and add comments.
Jarkko Hietaniemi [Sat, 19 Jul 2014 13:51:38 +0000 (13:51 +0000)]
Add freebsd support.
Jarkko Hietaniemi [Thu, 17 Jul 2014 10:23:21 +0000 (10:23 +0000)]
Parsing linux input in darwin, and vice versa.
Jarkko Hietaniemi [Wed, 16 Jul 2014 07:17:06 +0000 (07:17 +0000)]
Add comments.
Jarkko Hietaniemi [Sun, 13 Jul 2014 13:13:30 +0000 (16:13 +0300)]
Scan for expected and unwanted undef (libc) symbols.
We would expect to see e.g. chmod() being used,
but we do not want to see e.g. gets() being used, ever.
Jarkko Hietaniemi [Mon, 14 Jul 2014 21:31:19 +0000 (21:31 +0000)]
Sometimes Darwin has the string constants in cstring section.
At least in OS X 10.7.
Resolves the darwin x86 part of RT #12267 (the failing PL_no_mem test).
Jarkko Hietaniemi [Sun, 13 Jul 2014 12:44:33 +0000 (15:44 +0300)]
test.pl:eq_array() is enough.
No bad is_deeply() emulation necessary.
Jarkko Hietaniemi [Sun, 13 Jul 2014 06:00:58 +0000 (09:00 +0300)]
More debugging output.
Jarkko Hietaniemi [Sun, 13 Jul 2014 05:57:45 +0000 (08:57 +0300)]
Handle darwin ppc nm output, reenable test.
Not darwin ppc in particular: handle 32-bit nm output, in general.
Resolves part of RT #122267.
Jarkko Hietaniemi [Sun, 13 Jul 2014 05:49:50 +0000 (08:49 +0300)]
Allow reading nm output from a file (or STDIN).
Abigail [Sat, 19 Jul 2014 21:25:34 +0000 (23:25 +0200)]
Changes for 5.21.1 -> 5.21.2.
Not included the parts that are automated (module changes and acknowledgements).
Abigail [Sat, 19 Jul 2014 16:36:11 +0000 (18:36 +0200)]
Tick off the 5.20.0 and 5.20.1 releases.
Abigail [Sat, 19 Jul 2014 16:34:08 +0000 (18:34 +0200)]
"all question marks" is ambigious.
Because if just a single question mark is used, it means the release
manager is unknown. Only if multiple question marks are used it
means it isn't known whether this release will happen.
Steve Hay [Fri, 18 Jul 2014 14:59:34 +0000 (15:59 +0100)]
perlpolicy - Add encoding to fix podcheck.t following
0c6082f411
Ricardo Signes [Fri, 18 Jul 2014 13:03:52 +0000 (09:03 -0400)]
perlpolicy: update list of moderators
Steve Hay [Fri, 18 Jul 2014 07:48:32 +0000 (08:48 +0100)]
Note that ExtUtils::Manifest has been upgraded to 1.64
The EXCLUDED files are also now different.
Steve Hay [Fri, 18 Jul 2014 07:36:15 +0000 (08:36 +0100)]
perlpolicy - Note that minimal build fixes are acceptable for maint too
Changes like
31114fe991, which has just been cherry-picked into maint-5.20,
should be allowed.
H.Merijn Brand [Thu, 17 Jul 2014 12:45:47 +0000 (14:45 +0200)]
uconfig.h again
I am so sorry
H.Merijn Brand [Thu, 17 Jul 2014 12:31:43 +0000 (14:31 +0200)]
cut-n-paste error in comment for dladdr in config_h.SH for Condifure
Chris 'BinGOs' Williams [Thu, 17 Jul 2014 10:24:32 +0000 (11:24 +0100)]
Update HTTP-Tiny to CPAN version 0.044
[DELTA]
0.044 2014-07-16 23:46:09-04:00 America/New_York
[CHANGED]
- Providing a custom 'Host' header is now a fatal exception. Previously, it
was silently ignored, as the RFC mandates that Host be set from the
URL, but ignoring it could lead to unexpected, confusing errors.
- optimized URL splitting
- Passing 'undef' for any proxy attribute will prevent HTTP::Tiny from
setting the proxy from the environment.
James E Keenan [Tue, 15 Jul 2014 22:54:47 +0000 (18:54 -0400)]
Merge branch '122300-extutils-manifest' into blead
Karen Etheridge [Tue, 15 Jul 2014 00:25:46 +0000 (17:25 -0700)]
use just the import sub from Exporter
James E Keenan [Tue, 15 Jul 2014 22:36:29 +0000 (18:36 -0400)]
Need to increment $VERSION in ExtUtils::Manifest.
Karen Etheridge [Tue, 15 Jul 2014 00:19:36 +0000 (17:19 -0700)]
use warnings; convert "use vars" to "our"
Karen Etheridge [Mon, 30 Jan 2012 21:04:43 +0000 (13:04 -0800)]
add vim swap files to the ignored list for MANIFEST.SKIP.
brian d foy [Tue, 6 Dec 2011 09:42:43 +0000 (03:42 -0600)]
RT 72933: Ignore files from prove
H.Merijn Brand [Tue, 15 Jul 2014 14:17:48 +0000 (16:17 +0200)]
This should be automated!
H.Merijn Brand [Tue, 15 Jul 2014 14:05:53 +0000 (16:05 +0200)]
Regen Configure after backports
Alexandr Ciornii [Sun, 16 Mar 2014 12:12:42 +0000 (14:12 +0200)]
File::Copy does not overwrite read-only files
Daniel Dragan [Sun, 13 Jul 2014 10:48:25 +0000 (06:48 -0400)]
refactor pp_ref
similar to commmit
b3cf48215c
-removed:
-4/-8 pop on SP
+4/+8 push on SP
PUTBACK
1 non vol register save/restore (TARG not saved across the sv_ref())
TARG is not computed if the SV isn't a reference, so the PL_sv_no branch is
slightly faster. On VC 2003 32 bit miniperl, this func dropped from 0x6D to
0x58 bytes of machine code.
Daniel Dragan [Mon, 14 Jul 2014 05:10:52 +0000 (15:10 +1000)]
optimize PathTools to not try to load XS on miniperl
this will slightly speed up perl's build time by not loading XSLoader.pm
and DynaLoader.pm into the process, and then die()+eval trap when trying
to load the XS module.
Tony: update perldelta message to avoid a broken link
James E Keenan [Sun, 13 Jul 2014 02:16:23 +0000 (22:16 -0400)]
skip_all on darwin until nm peculiarities can be straighted out.
For: RT #122267
Karl Williamson [Fri, 11 Jul 2014 22:33:26 +0000 (16:33 -0600)]
locale.c: Improve some comments
Karl Williamson [Fri, 11 Jul 2014 22:29:54 +0000 (16:29 -0600)]
locale.c: Fix some unused code for potential future use
This code extends the heuristics used to determine if a locale is UTF-8
or not on older platforms. It has been #ifdef'd out because it only
added a little value on dromedary. Now the previous commit has added
new heuristics, and tests on dromedary show that this adds nothing to
that. But I'm leaving it in the source in case it might ever prove
useful. In order to test it, I compiled it and found some problems with
the earlier version that this now fixes.
Karl Williamson [Fri, 11 Jul 2014 22:24:39 +0000 (16:24 -0600)]
locale.c: Add new heuristic for finding if locale is UTF-8
On older platforms that don't conform to POSIX 2001 nor C99, heuristics
are employed to try to determine if a locale is UTF-8 or not. This
commit improves those heuristics by looking at names of the months and
days of the week to see if they are UTF-8 or not. This is done if
looking at the currency symbol failed to help.
Karl Williamson [Fri, 11 Jul 2014 22:23:10 +0000 (16:23 -0600)]
locale.c: White-space only
Indent and outdent blocks of code to conform to newly formed or removed
braces
Karl Williamson [Fri, 11 Jul 2014 22:12:22 +0000 (16:12 -0600)]
locale.c: Refactor UTF8ness of currency symbol code
On older platforms that aren't C99 nor POSIX 2001, locale.c uses the
currency symbol to try to see if a locale is UTF-8 or not. This commit
refactors it somewhat to make it cleaner, and which fixes several
problems. The least issue was that it sometimes did a setlocale()
unnecessarily. Others are that in some circumstances it called
localeconv() and/or looked at the result while within the wrong locale.
Karl Williamson [Fri, 11 Jul 2014 21:56:51 +0000 (15:56 -0600)]
locale.c: Use ptr's value before freeing it, not after
This only affected runs with the -DL parameter to perl set.
Karl Williamson [Fri, 11 Jul 2014 21:54:38 +0000 (15:54 -0600)]
locale.c: Use safer code practice
The interior-most function can return NULL. Currently savepv() which is
the next outer function handles this correctly, as does the next outer
function, but it is dangerous to rely on that behavior. So we test for
NULL before calling functions on a NULL ptr.
Karl Williamson [Fri, 11 Jul 2014 21:42:21 +0000 (15:42 -0600)]
locale.c: Skip compiling fallback code on modern platforms
In the function that determines if a POSIX locale is UTF-8 or not, if
either nl_langinfo or MB_CUR_MAX are defined, it can reliably determine
the answer. If they are not defined, it uses heuristics to figure
things out as best it can. This code doesn't add value for those
platforms where one of the two symbols is defined, so can just be
ifdef'd out
Karl Williamson [Fri, 11 Jul 2014 21:39:02 +0000 (15:39 -0600)]
util.c: Add comment
Karl Williamson [Wed, 9 Jul 2014 19:36:28 +0000 (13:36 -0600)]
locale.c: name should be last resort when deciding if locale is utf8
Looking at if the currency symbol is UTF-8 should come ahead of looking
at the locale name.
Karl Williamson [Wed, 9 Jul 2014 19:22:17 +0000 (13:22 -0600)]
locale.c: Prepare for rearrangement of code blocks
This section of code just returned generally,. This commit changes it
so that it drops off the end if it can't determine if the current locale
is UTF-8 or not, so that additional tests can be added later. The
function defaults to not UTF-8 if this drops off the end, so there
should be no functionality change
Karl Williamson [Wed, 9 Jul 2014 17:26:26 +0000 (11:26 -0600)]
perl.h: Actually #define USE_LOCALE_TIME
This symbol is used, but was never defined
Steve Hay [Fri, 11 Jul 2014 07:51:42 +0000 (08:51 +0100)]
Upgrade IO-Socket-IP from version 0.30 to 0.31
(perldelta: Say we're upgrading from 0.29 since we've already upgraded from
that since 5.21.0.)
Steve Hay [Fri, 11 Jul 2014 07:51:23 +0000 (08:51 +0100)]
Remove IGNORABLE files from IO-Socket-IP as per
8db6555210
Karl Williamson [Thu, 10 Jul 2014 19:31:11 +0000 (13:31 -0600)]
locale.c: Fix misplaced parenthesis
Commit
a39edc4c877304d4075679b1d8de1904671a9c37 got a parenthesis
misplaced so it wasn't really looking at the next character, like it was
supposed to be doing
Karl Williamson [Wed, 9 Jul 2014 15:38:00 +0000 (09:38 -0600)]
t/run/locale.t: setting to POSIX may be same as C
On some (? all) systems, setting the locale to POSIX may cause it to
actually set it to C. In these tests we want to exclude C, hence we
have to exclude POSIX as well.
Some systems may not have any other locales, so this commit also
properly skips tests on those.
Thanks to Matthew Horsfall for figuring this out
Karl Williamson [Wed, 9 Jul 2014 15:35:06 +0000 (09:35 -0600)]
t/loc_tools.pl: Don't return a locale empty string
A locale name shouldn't be an empty string; this makes sure
that some glitch that introduces one doesn't get passed on
Karl Williamson [Mon, 7 Jul 2014 21:46:49 +0000 (15:46 -0600)]
ext/POSIX/POSIX.xs: White space only, align column
Karl Williamson [Mon, 7 Jul 2014 21:14:49 +0000 (15:14 -0600)]
POSIX::setlocale(LC_NUMERIC) returns proper locale
Commit
4c28b29c7a1549f173177cdf69e91cc1acaa0969 broke calling setlocale
with a single parameter and hoping to get the correct LC_NUMERIC
property returned from it (including LC_ALL calls). This is because the
numeric locale is now kept as C except around the code that wants it to
be the underlying locale. It turns out that querying the current locale
is such a code area, so LC_NUMERIC is now set to the underlying locale
around this.
Karl Williamson [Mon, 7 Jul 2014 20:42:11 +0000 (14:42 -0600)]
locale.c: White-space only
Outdent because the previous commit removed the enclosing block.
Karl Williamson [Mon, 7 Jul 2014 20:38:08 +0000 (14:38 -0600)]
locale.c: Remove conditionals.
These two functions are supposed to normally be called through macro
interfaces which check whether they actually should be called or not.
That means the conditionals removed by this commit are redundant from
the normal interface. By removing them, we allow the exceptional case
where the code should be executed unconditionally, to happen, by just
calling the functions directly, not using the macro interface.
Karl Williamson [Mon, 7 Jul 2014 20:30:59 +0000 (14:30 -0600)]
locale.c: Keep better track of C/non-C locale
Perl uses three interpreter-level (but private) variables to keep track
of numeric locales. PL_numeric name is the current underlying locale.
PL_standard is a boolean to indicate if we are switched to the C (or
POSIX) locale, and PL_local is a boolean to indicate if we are switched
to the underlying one. The reason there are two booleans is if the
underlying locale is C, both can be true at the same time. But the code
that is being changed by this commit didn't realize this, and
could unnecessarily set the booleans to FALSE. This could cause
unnecessary switching of locales.
Karl Williamson [Mon, 7 Jul 2014 20:21:30 +0000 (14:21 -0600)]
locale.c: Make a common idiom into a macro
Karl Williamson [Mon, 7 Jul 2014 19:59:30 +0000 (13:59 -0600)]
lib/locale.t: Fix debug statement
This was printing using the wrong function. It is a string, and should
use the string output function.
Karl Williamson [Sun, 29 Jun 2014 03:43:02 +0000 (21:43 -0600)]
utf8.h: Add comment
Steve Hay [Wed, 9 Jul 2014 07:36:32 +0000 (08:36 +0100)]
Update which stable release series are now "officially" supported
Aaron Crane [Tue, 8 Jul 2014 23:33:47 +0000 (00:33 +0100)]
Fix typo in op.h
This caused all OP structures to be larger than intended; for example, it
made `struct op` 48 bytes rather than 40 on Mac OS X x86-64.
David Mitchell [Tue, 8 Jul 2014 15:44:53 +0000 (16:44 +0100)]
[Merge] add support for ops to link to parent
This series of commits provides experimental support for ops in the optree
to be able to locate their parent op, if any.
First, it adds a new general-purpose function, op_sibling_splice(),
which allows for general manipulation of an op_sibling chain by analogy
with the perl splice() function. op.c has then been heavily refactored to
use this function rather than manipulating ops directly.
Then the boolean field op_lastsib has been added to OPs. Within the core,
this is set on the last op in an op_sibling chain (so it is synonymous
with op_sibling being null). By default, its value is set but not used.
In addition, a new build define has been added (not yet enabled by default),
-DPERL_OP_PARENT, that forces the core to use op_lastsib to detect the
last op in a sibling chain, rather than op_sibling being NULL. This frees
up the last op_sibling pointer in the chain, which rather than being set
to NULL, is now set to point back to the parent of the sibling chain (if
any).
Then add a C-level op_parent() function and B parent() method; under
default builds they just return NULL, under PERL_OP_PARENT they return the
parent of the current op.
Collectively this provides a facility not previously available from B:: nor
C, of being able to follow an op tree up as well as down.
Also, some assertions are added to finalize_op() that check the
consistency of the optree; in particular that op_last points to the last
sibling. Under -DPERL_OP_PARENT, more checks are enabled.
David Mitchell [Tue, 1 Jul 2014 14:42:42 +0000 (15:42 +0100)]
avoid adding two OP_HINTSEVAL ops
Under argless eval (i.e. defaults to $_) in the presence of hints,
the perl core was recursively calling ck_eval, which had the side-effect
of attempting to append an OP_HINTSEVAL op twice. Formerly due to the way
the appending was done, the first OP_HINTSEVAL op was silently discarded;
after doing things "properly" with op_sibling_splice(), both ops ended up
being appended, and at run-time, the hints hash would be interpreted as
the SV to eval.
This wasn't tested in the core tests, and just ended up sometimes failing
warnings.t or Digest-SHA tests (but never on my system!)
David Mitchell [Tue, 1 Jul 2014 12:23:50 +0000 (13:23 +0100)]
minor fixups to new op_sibling work
remove pTHX args to op_parent() and op_sibling_splice() since they don't
use them, and cast an op type assignment. Also, minor fixups to the pod
for op_sibling_splice().
David Mitchell [Mon, 30 Jun 2014 16:06:26 +0000 (17:06 +0100)]
Improve optree sanity checking code in finalize_op
The previous couple of commits added DEBUGGING code to finalize_op() that
checked, for BINOP/LISTOPs etc, that all the op's children had consistent
flags and that op_last pointed to the last op (and vice-versa under
PERL_OP_PARENT). Extend most of this consistency checking to the various
classes of OP that have op_first but not op_last (like UNOP, LOGOP).
David Mitchell [Fri, 27 Jun 2014 10:52:44 +0000 (11:52 +0100)]
add op_lastsib and -DPERL_OP_PARENT
Add the boolean field op_lastsib to OPs. Within the core, this is set
on the last op in an op_sibling chain (so it is synonymous with op_sibling
being null). By default, its value is set but not used.
In addition, add a new build define (not yet enabled by default),
-DPERL_OP_PARENT, that forces the core to use op_lastsib to detect the
last op in a sibling chain, rather than op_sibling being NULL. This frees
up the last op_sibling pointer in the chain, which rather than being set
to NULL, is now set to point back to the parent of the sibling chain (if
any).
This commit also adds a C-level op_parent() function and B parent()
method; under default builds they just return NULL, under PERL_OP_PARENT
they return the parent of the current op.
Collectively this provides a facility not previously available from B:: nor
C, of being able to follow an op tree up as well as down.
David Mitchell [Wed, 25 Jun 2014 17:09:14 +0000 (18:09 +0100)]
Ensure that op_last always points to last sibling
Add a big DEBUGGING-only check to S_finalize_op() that for list ops,
checks whether op_last points to the last sibling. Then fix up the places
where this isn't true.
It turns out that convert() and force_list() didn't update op_first, so
fix them. Also, the 'x' (repeat) op in list context is a binary op with
op_last set to null, which is a bit bizarre, but too complex to fix for
now. So just skip the test on that one.
David Mitchell [Mon, 16 Jun 2014 13:34:14 +0000 (14:34 +0100)]
add op_sibling_splice() fn and make core use it
The op_sibling_splice() is a new general-purpose OP manipulation
function designed to edit the children of an op, in an analogous
manner in which the perl splice() function manipulates arrays.
This commit also edits op.c and a few other places to remove most direct
manipulation of op_sibling, op_first and op_last, and replace that with
calls to op_sibling_splice().
This has two advantages. First, by using the one function consistently
throughout, it makes it clearer what a particular piece of of code is
doing, rather than having to decipher lots of of ad-hoc
cLISTOPo->op_first = OP_SIBLING(kid);
style stuff. Second, it will make it easier to later add a facility for
child OPs to find their parent, since the changes now only need to be made
in a few places.
In theory this commit should make no functional change to the code.
David Mitchell [Sat, 14 Jun 2014 12:10:46 +0000 (13:10 +0100)]
Devel::Peek: test 2-arg form of Dump
the 'Dump var, limit' form wasn't being tested.
David Mitchell [Tue, 10 Jun 2014 15:34:16 +0000 (16:34 +0100)]
macroise op_sibling in Perl_ck_fun()
This is logically part of the previous commit, but since Perl_ck_fun()
took the address of o->op_sibling, it wasn't straightforward to simply
replace op_sibling with the relevant macros. So we now do it as a separate
commit.
It's basically trying to insert a new op into the sibling chain, and
depending on whether it inserts at the front or not, it updates
&cLISTOPo->op_first or &kid->op_sibling.
Rather than taking the address, make each assignment check whether the
destination is op_first or op_sibling. Slightly less elegant, but hey, it
works!
David Mitchell [Tue, 10 Jun 2014 12:54:13 +0000 (13:54 +0100)]
wrap op_sibling field access in OP_SIBLING* macros
Remove (almost all) direct access to the op_sibling field of OP structs,
and use these three new macros instead:
OP_SIBLING(o);
OP_HAS_SIBLING(o);
OP_SIBLING_set(o, new_value);
OP_HAS_SIBLING is intended to be a slightly more efficient version of
OP_SIBLING when only boolean context is needed.
For now these three macros are just defined in the obvious way:
#define OP_SIBLING(o) (0 + (o)->op_sibling)
#define OP_HAS_SIBLING(o) (cBOOL((o)->op_sibling))
#define OP_SIBLING_set(o, sib) ((o)->op_sibling = (sib))
but abstracting them out will allow us shortly to make the last pointer in
an op_sibling chain point back to the parent rather than being null, with
a new flag indicating whether this is the last op.
Perl_ck_fun() still has a couple of direct uses of op_sibling, since it
takes the field's address, which is not covered by these macros.
David Mitchell [Tue, 8 Jul 2014 15:28:55 +0000 (16:28 +0100)]
libperl.t + ASAN + -DPERL_GLOBAL_STRUCT_PRIVATE
One of the t/porting/libperl.t tests was failing under
-DPERL_GLOBAL_STRUCT_PRIVATE with clang and address sanitizer,
since that combo added a data symbol to each object file:
0000000000000000 d __unnamed_1
which contradicted the test of not having any global data.
Simply ignore that symbol for the purposes of the test.
David Mitchell [Mon, 7 Jul 2014 22:17:13 +0000 (23:17 +0100)]
faster constant hash key lookups ($hash{const})
On something like $hash{constantstring}, at compile-time the
PVX string on the SV attached to the OP_CONST is converted into a
HEK (with an appropriate offset shift).
At run-time on hash keying, this HEK is used to speed up the bucket
search; however it turns out that this can be improved. Currently,
the main bucket loop does:
for (; entry; entry = HeNEXT(entry)) {
if (HeHASH(entry) != hash)
continue;
if (HeKLEN(entry) != (I32)klen)
continue;
if (HeKEY(entry) != key && memNE(HeKEY(entry),key,klen))
continue;
if ((HeKFLAGS(entry) ^ masked_flags) & HVhek_UTF8)
continue;
The 'HeKEY(entry) != key' test is the bit that allows us to skip the
memNE() when 'key' is actually part of a HEK. However, this means that in
the const HEK scenario, for a match, we do pointless hash, klen and
HVhek_UTF8 tests, when HeKEY(entry) == key is sufficient for a
match. Conversely, in the non-const-HEK scenario, the 'HeKEY(entry) !=
key' will always fail, and so it's just dead weight in the loop.
To work around this, this commit splits the code into two separate bucket
search loops; one for const-HEKs that just compare HEK pointers, and a
general loop that now doesn't have do the 'HeKEY(entry) != key' test.
Analysing this code with cachegrind shows that with this commit, lookups
of constant keys that exist (e.g. the typical perl object scenario,
$self->{somefield}) takes 15% less instruction reads in hv_common(), 14%
less data reads and 27% less writes.
A lookup with a non-existing constant key ($hash{not_exist}) is about the
same as before (0.7% improvement).
Non-constant existing lookup ($hash{$existing_key}) is about 5% less
instructions, while $hash{$non_existing_key} is about 0.7%.
James E Keenan [Sat, 5 Jul 2014 01:13:55 +0000 (21:13 -0400)]
Add description to tests lacking them.
Explain why 'nomethod' special key is invoked.
Ricardo Signes [Mon, 7 Jul 2014 17:58:26 +0000 (13:58 -0400)]
add the standards of conduct to perlpolicy
Tony Cook [Mon, 7 Jul 2014 05:10:16 +0000 (15:10 +1000)]
perldelta for
e45636ee0875
Daniel Dragan [Sun, 6 Jul 2014 06:59:02 +0000 (02:59 -0400)]
static misc things in /dist/threads/threads.xs
there is no reason for these functions to be exported on a linux build,
since they aren't exported on Win32, also consting ithread_vtbl allows
more memory to be shared between perl procs
Chris 'BinGOs' Williams [Sun, 6 Jul 2014 10:52:41 +0000 (11:52 +0100)]
Update experimental to CPAN version 0.008
[DELTA]
0.008 2014-07-05 13:58:28+02:00 Europe/Amsterdam
Give better perl version formatting
Fix smartmatch/switch description
Karl Williamson [Mon, 12 May 2014 00:19:40 +0000 (18:19 -0600)]
regcomp.c: Add assertion, remove case: statements
This routine should never be called unless the new assertion is true,
which removes the need for the removed cases in the switch.
Jarkko Hietaniemi [Sat, 5 Jul 2014 11:14:55 +0000 (07:14 -0400)]
Updates to the HP-UX compilation warning.
Aaron Crane [Sat, 5 Jul 2014 00:53:57 +0000 (01:53 +0100)]
pod/perlre.pod: fix typo in example code