James E Keenan [Fri, 5 Jul 2013 01:09:04 +0000 (03:09 +0200)]
Add block to exercise case of very large buffer in lib/File/Copy.pm.
James E Keenan [Thu, 4 Jul 2013 13:33:40 +0000 (15:33 +0200)]
Add tests for two previously unexercised sections of lib/Symbol.pm.
Craig A. Berry [Sun, 7 Jul 2013 19:28:21 +0000 (14:28 -0500)]
Remove trailing dots in t/porting/readme.t on VMS.
Because on VMS a zero-length extension still has a dot.
Craig A. Berry [Sun, 7 Jul 2013 19:03:33 +0000 (14:03 -0500)]
Restore $(ARCHDIR)vmspipe.com to VMS build after
2d11a7e9678.
That commit moved VMS::Filespec from vms/ext to ext/, but it also
deleted the vmspipe.com dependency from the LIBPREREQ target in
vms/descrip_mms.template. (vmspipe.com has nothing to do with
VMS::Filespec.) Which meant vmspipe.com was not availabe for
building extensions or running tests, and -- worse yet -- would
not get installed. So every pipe creation would involve creating
a temporary version of this file using fallback code in vms/vms.c,
thus making the very pokey pipe implementation even more expensive.
Karl Williamson [Thu, 20 Jun 2013 19:17:13 +0000 (13:17 -0600)]
perl.c: Use Strerror instead of strerror
The former works on more systems.
Karl Williamson [Thu, 20 Jun 2013 19:13:40 +0000 (13:13 -0600)]
pp_sys.c: Use macro instead of reinventing it
The Strerror macro is defined properly to handle either case here.
Karl Williamson [Thu, 20 Jun 2013 18:28:12 +0000 (12:28 -0600)]
util.c: Avoid unnecessary setlocale() calls
This code sets the locale to C around its work. This is unnecessary if
the locale is already C, and there is an existing global that indicates
this, that can be tested to avoid the sets.
Karl Williamson [Sat, 22 Jun 2013 18:49:01 +0000 (12:49 -0600)]
PATCH: [perl #118197] Cope with non-ASCII decimal separators
This patch causes the radix string to be examined upon a new numeric
locale being set. If the string isn't ASCII, and the new locale is
UTF-8, it turns on the UTF-8 flag in the scalar that holds the radix.
When a floating point number is formatted in Perl_sv_vcatpvfn_flags(),
and the flag is on, the result's flag will be set on too.
Karl Williamson [Fri, 28 Jun 2013 21:43:54 +0000 (15:43 -0600)]
Properly determine if in locale for NV stringification
Commit
68e8f474bc686a86c064b695b9c7400313d7af65 used the wrong macro to
determine if the operation is within the scope of 'use locale'. It also
has to operate under 'use locale 'not_characters'.
Tests for this are coming in the patch for [perl #118197].
Chris 'BinGOs' Williams [Sun, 7 Jul 2013 18:42:27 +0000 (19:42 +0100)]
Update DB_File to CPAN version 1.829
[DELTA]
1.829 7 July 2013
* make realclean: removing all files
RT #68214
* Documented the issue where the error below
BDB0588 At least one secondary cursor must be specified to DB->join
* DB_File installs to wrong place for CPAN version
RT #70420
Makefile.PL prevents INSTALLDIRS on command line.
RT #68287: Makefile.PL prevents INSTALLDIRS on command line.
* typo fix
RT #85335
Karl Williamson [Sun, 7 Jul 2013 12:16:11 +0000 (06:16 -0600)]
ExtUtils::Miniperl: Remove pod repeated phrase
Chris 'BinGOs' Williams [Sun, 7 Jul 2013 12:55:29 +0000 (13:55 +0100)]
Fix MidnightBSD hints file for 0.4-RELEASE
0.4 has no /usr/bin/objformat, so the hints file was
falling through to configure for aout with fatal consequences.
Confirmed that the objformat in 0.3 warns that it is deprecated.
Have switched around the logic of the checks so that it will always
configure for elf, using aout is explicitly detected.
Nicholas Clark [Sun, 7 Jul 2013 11:36:09 +0000 (13:36 +0200)]
Merge the refactoring of ExtUtils::Miniperl and {mini,}perlmain.c generation.
Nicholas Clark [Sat, 6 Jul 2013 14:21:40 +0000 (16:21 +0200)]
Move the "editor block" from miniperlmain.c to ExtUtils::Miniperl
As miniperlmain.c is now generated by ExtUtils::Miniperl (and not the other
way round), there's no reason to have an editor block in the generated file,
as it's not intended to be edited. Instead, add the "generated from" and
read-only headers to miniperlmain.c
Nicholas Clark [Fri, 5 Jul 2013 22:28:50 +0000 (00:28 +0200)]
Clean up ExtUtils::Miniperl
Give it a $VERSION.
Bring the joy of strict (and warnings) to it.
Inline the C code into writemain() instead of using $head, $tail and a regex
to split the $tail into $tail1, $tail2 and $tail3.
Tweak the NAME section so that ABSTRACT_FROM parses it.
Document the updated functionality of writemain().
Nicholas Clark [Fri, 5 Jul 2013 21:16:12 +0000 (23:16 +0200)]
Invert the build logic for miniperlmain.c and ExtUtils::Miniperl
Now ExtUtils::Miniperl has the master version of {mini,}perlmain.c and is
checked into the repository. miniperlmain.c is now generated by a script
in regen/ which uses ExtUtils::Miniperl.
Tweak ExtUtils::Miniperl::writemain() to take an optional first argument,
a reference to a file handle. This permits the regen script to use the
regen_lib.pl functions for file opening/closing/renaming and TAP generation.
For now check in ExtUtils::Miniperl minimally modified from the version
generated by the former minimod.pl. The next commit will tidy it up.
Nicholas Clark [Thu, 4 Jul 2013 09:28:53 +0000 (11:28 +0200)]
Move generation of ExtUtils::Miniperl to ext/ExtUtils-Miniperl from minimod.pl
It does increase the lines of code slightly but it replaces a bunch of
platform specific special case code in the Makefiles for *nix, Win32 and VMS
with one unified implementation. And in Perl, rather than 3+ different
languages.
This feels like the right maintainability trade-off.
Nicholas Clark [Sun, 7 Jul 2013 10:50:13 +0000 (12:50 +0200)]
Merge the branch which builds utils/Makefile from utils/Makefile.PL
Nicholas Clark [Wed, 3 Jul 2013 20:50:08 +0000 (22:50 +0200)]
Generate utils/Makefile from utils/Makefile.PL, and remove it at clean time.
Add rules to the Win32 Makefiles to call utils/Makefile.PL to generate
utils/Makefile, and rules to both them and the *nix Makefile to delete
the generated file as part of the cleanup targets.
VMS continues to do its own thing, rather than using utils/Makefile.
Nicholas Clark [Wed, 3 Jul 2013 16:31:02 +0000 (18:31 +0200)]
Replace utils/Makefile.SH with utils/Makefile.PL
This shares all the existing deficiencies of utils/Makefile.SH, and
generates a byte-for-byte identical utils/Makefile, including boilerplate
that claims it was generated by utils/Makefile.SH
utils/Makefile remains as a file checked into the repository, and is not (yet)
deleted, because as-was only *nix platforms could run utils/Makefile.SH to
generate utils/Makefile. This messy state of affairs means that if you build
with static linking, the checked-out utils/Makefile is modified
('../miniperl' is replaced with '../perl')
The next commit will resolve just these bugs.
In turn, it seems that the pre-generated utils/Makefile is only used by
Win32, as VMS contains rules in descrip_mms.template to build the
utilities. Probably the next thing to unpick is the build on VMS, but it
seems better to reduce the size of the "problem" in both utils/Makefile.PL
and vms/descrip_mms.template by attempting to move the work from them to
the extension directories and ExtUtils::MakeMaker.
Nicholas Clark [Wed, 3 Jul 2013 13:23:33 +0000 (15:23 +0200)]
Add an "always update" parameter to regen_lib's open_new().
By default the code in regen_lib compares the newly written file it has just
closed with the (assumed) existing file, and only overwrites the existing
file if the new file differs. This is a useful behaviour for regeneration
scripts. However, it's not ideal for build scripts called from the Makefile,
as make assumes that targets will be regenerated (and the timestamp touched).
So add an "always update" parameter for the use of Makefile invoked scripts,
such as autodoc.pl. If set, delete any existing file early (so that fatal
errors during the generation don't confuse the build by leaving an existing
stale file around), skip the comparison and skip the diagnostic output
listing the changed files.
Change autodoc.pl to set this parameter.
Correct a typo in an error message in regen_lib's open_new().
Nicholas Clark [Wed, 3 Jul 2013 13:51:16 +0000 (15:51 +0200)]
Refactor the Text::Wrap::wrap() logic in regen/regen_lib.pl
Provide a local subroutine wrap(). Pass columns as its first parameter and
set $Text::Wrap::columns, as all uses of Text::Wrap::wrap() were setting
this variable.
Nicholas Clark [Wed, 3 Jul 2013 20:28:50 +0000 (22:28 +0200)]
Add cpan/Text-Tabs/lib to buildcustomize.pl and hence miniperl's @INC.
autodoc.pl already needs Text::Wrap, and soon other early-stage build scripts
will too.
Nicholas Clark [Wed, 3 Jul 2013 13:40:47 +0000 (15:40 +0200)]
Refactor regen_lib.pl to reduce verbosity.
Use hash slices to avoid repeated typeglob dereferences on $fh.
In read_only_top() use a lexical to avoid repeated $args{lang} lookups.
Father Chrysostomos [Sun, 7 Jul 2013 05:32:53 +0000 (22:32 -0700)]
to-do tests for #113932 (UNIVERSAL::can and handles)
Father Chrysostomos [Sun, 7 Jul 2013 01:00:34 +0000 (18:00 -0700)]
Stop using IV in pmop; remove workaround
See ticket #118055 for all the detail. On systems where IV is bigger
than a pointer, the slab allocator messes things up because it only
provides pointer alignment. If pmops have an IV field, we cannot
allocate them via slab on such systems. Pmops actually don’t need
an IV, just a PADOFFSET. So we can change them and remove the
workaround.
This is obviously not suitable for maint.
Father Chrysostomos [Sun, 7 Jul 2013 00:58:31 +0000 (17:58 -0700)]
Suppress dep warnings in DD’s indent.t
I considered changing the code to suppress the warning, but:
• The warning only occurs before 5.12; the code is fine in
later versions.
• By not changing the code I avoid the risk of sabotaging the test.
• By suppressing the warning conditionally based on perl version, we
will still see future deprecations.
So this seems the least intrusive fix.
Ricardo Signes [Sat, 6 Jul 2013 19:26:01 +0000 (15:26 -0400)]
small improvements to documentation of IO::Socket
IO::Socket::INET's documentation for its Listen parameter was
somewhat misleading, and the documentation for IO::Socket::Unix
even more so.
See [perl #118713]
Lukas Mai [Sat, 6 Jul 2013 16:38:50 +0000 (18:38 +0200)]
fix SIGZZERO typo in perldoc -f kill
Chris 'BinGOs' Williams [Sat, 6 Jul 2013 18:40:50 +0000 (19:40 +0100)]
Update Time-Piece to CPAN version 1.21
[DELTA]
1.21 2013-07-06
- fix installation target; now installs to site in v5.12 and later
- make Time::Seconds match its VERSION to Time::Piece
- numerous portability fixes imported from perl core distribution
Ricardo Signes [Sat, 6 Jul 2013 16:01:07 +0000 (12:01 -0400)]
ignore lib/File/Find.pm
This is a bit of cleanup in the wake of
6de85bb45a5ea25528026a26cac854ee4dcdcd45.
Father Chrysostomos [Sat, 6 Jul 2013 06:59:46 +0000 (23:59 -0700)]
[perl #117917] /(?{ m|...| }) (?{ $1 })/
A regular expression invoked inside a regular expression code block
can cause other code blocks in the same outer regular expression to
see the wrong values in $1.
PL_curpm holds a pointer to the match operator from which $1, $2, etc.
get their values.
Normally PL_curpm is set at the end of a match.
When code blocks are embedded inside a regular expression, PL_curpm
is set during a match to point to PL_reg_curpm, which is a dummy op
pointing to the current regular expression.
S_setup_eval_state is called at the beginning of regexp execution.
It is responsible for setting up PL_regcurpm and making PL_curpm
point to it.
Code blocks are executed using the multicall API. PUSH_MULTICALL
records the value of PL_curpm and POP_MULTICALL makes sure that the
previous value of PL_curpm is restored.
Executing a code block can cause PL_curpm to point to something else.
Since we don’t necessarily do POP_MULTICALL between code block calls
within a single regular expression (sometimes we do, depending on
backtracking), PL_curpm may not have been restored when a second code
block fires. So we have to restore it to point to PL_reg_curpm manu-
ally after calling a code block.
Karl Williamson [Thu, 20 Jun 2013 03:00:53 +0000 (21:00 -0600)]
PATCH: [perl #112208]: Set utf8 flag on $! appropriately
This patch sets the utf8 flag on $! if the error string passes utf8
validity tests and has some bytes with the upper bit set. (If none
have that bit set, is an ASCII string, and whether or not it is UTF-8 is
irrelevant.) This is a heuristic that could fail, but as the reference
in the comments points out this is unlikely.
One can reasonably assume that a UTF-8 locale will return a UTF-8
result. So another approach would be to look at that (but we wouldn't
want to turn the flag on for a purely ASCII string anyway, as that could
change the semantics from existing behavior by making the string follow
Unicode rules, whereas it didn't necessarily before.) To do this, we
could keep track of the utf8ness of the LC_MESSAGES locale. But until
the heuristic in this patch is shown to not be good enough, I don't see
the need to do this extra work.
H.Merijn Brand [Wed, 3 Jul 2013 13:53:11 +0000 (15:53 +0200)]
Add new -V output to Config-Perl-V
Karl Williamson [Tue, 2 Jul 2013 16:49:04 +0000 (10:49 -0600)]
locale.c: Further checks for utf8ness of a locale
In reality, the return value of setlocale() is documented to be opaque,
so using it to determine if a locale is UTF-8 or not may not work. It
is a char*, which we treat as a name. We can safely assume that if the
name contains UTF-8 (or slight variations thereof), that it is a UTF-8
locale. But if the name doesn't contain that, it still could be one.
In fact there are currently many locales on our dromedary machine that
fall into this category. Similarly, something containing 8859 is not
going to be UTF-8.
This commit adds another test for cases where there is no nl_langinfo(),
and the locale name isn't helpful. It looks at the currency symbol,
which typically will be in the locale's script. If that is illegal
UTF-8, we know for sure that the locale isn't UTF-8 (or is corrupted).
If it is legal UTF-8 (but not ASCII) we can be pretty sure that the
locale is UTF-8. If it is ASCII, we still don't know one way or the
other, so we err on it not being UTF-8.
Originally, I was going to use the locale's error message strings,
returned from strerror(), the source for $!, to check for this.
These are supposed to be in terms of the LC_MESSAGES locale. Chances
are vanishingly small that the locale is not UTF-8 if all the messages
pass a utf8ness test, provided that the messages aren't just ASCII.
However, on dromedary, the messages for many of the exotic locales
haven't been translated, and are still in English, which doesn't help at
all. I figure that this is quite likely to be the case generally, and
the currency symbol is much more likely to have been translated.
I left the code in though, commented out for possible future use.
Note that this test will run only on systems that don't have
nl_langinfo(). The test can also be turned off by setting a C compiler
flag -DNO_LOCALE_MONETARY, (and -DNO_LOCALE_MESSAGES for the
commented-out part), corresponding to the way the other categories can
be turned off (none of which is documented).
Karl Williamson [Mon, 24 Jun 2013 23:21:49 +0000 (17:21 -0600)]
locale.c: Extract out, fix, expand fcn to see if a locale is utf8
There was buggy code to see if the start-up locale is UTF-8. This
commit extracts it into a separate function.
The bugs involved looking at the name of the locale to see if that
implies a UTF-8 name. Prior to this commit, it looked at the
beginning of the locale name, whereas in reality, it is at the end, as
in "fr_FR.UTF8".
Also, it didn't look for the documented Windows name for UTF-8 locales
on those platforms.
The function is expanded to have an input category to find the utf8ness
of. Thus it now works on any non-LC_ALL category, not just LC_CTYPE.
It is possible for categories to be in different locales, so that
LC_CTYPE is in a UTF-8 locale, and LC_NUMERIC isn't. For the purposes
of PERL_UNICODE, the most applicable category is LC_CTYPE, so that is
the one used in its currently only call.
Karl Williamson [Thu, 27 Jun 2013 20:25:43 +0000 (14:25 -0600)]
locale.c: Compare apples to apples
Prior to this patch, one parameter to strNE would have been through a
standardizing function, while the other had not. By standardizing both
before doing the compare, we avoid false positives.
Karl Williamson [Thu, 27 Jun 2013 20:01:01 +0000 (14:01 -0600)]
perl.h, locale.c: White space only
This indents some nested #if's to clarify the program structure.
Karl Williamson [Thu, 27 Jun 2013 19:57:19 +0000 (13:57 -0600)]
locale.c: Add comments
Father Chrysostomos [Fri, 5 Jul 2013 20:24:12 +0000 (13:24 -0700)]
[perl #117727] Document B::PADLIST
I neglected this when I added that class in perl 5.17.4
Nicholas Clark [Wed, 3 Jul 2013 09:11:06 +0000 (11:11 +0200)]
Move File::Find from lib/ to ext/
Nicholas Clark [Wed, 3 Jul 2013 08:57:28 +0000 (10:57 +0200)]
Change File::Find's tests to look for taint.t instead of commonsense.t
This passes whether the tests are in lib/ (and hence run with the CWD as t/)
or in ext/File-Find (and hence run with that as the CWD) because they find
t/op/taint.t or ext/File-Find/t/taint.t respectively.
Change taint.t to count the number of times it finds a file named taint.t,
and fail if the count isn't 1. find.t was already testing a count.
Nicholas Clark [Wed, 3 Jul 2013 08:41:29 +0000 (10:41 +0200)]
Improve the BEGIN-time setup code for File::Find's tests.
In find.t merge the two BEGIN blocks and eliminate the redundant
C<use File::Spec;>
In both, don't attempt to change directory to t/ (which will be unhelpful
once File::Find is moved to ext/)
Only make paths in @INC absolute if $ENV{PERL_CORE} is set (which will ease
making File::Find dual-life, if we want to this.)
Father Chrysostomos [Fri, 5 Jul 2013 15:13:39 +0000 (08:13 -0700)]
Add Olivier Mengué to AUTHORS
Father Chrysostomos [Fri, 5 Jul 2013 15:12:47 +0000 (08:12 -0700)]
Increase $subs::VERSION to 1.02
Olivier Mengué [Sat, 13 Apr 2013 09:48:40 +0000 (11:48 +0200)]
subs.pm: fix variable leak into global scope
Chris 'BinGOs' Williams [Fri, 5 Jul 2013 14:21:07 +0000 (15:21 +0100)]
Update MIME-Base64 to CPAN version 3.14
[DELTA]
2013-07-02 Gisle Aas <gisle@ActiveState.com>
Release 3.14
Install to 'site' instead of 'perl' when perl version is 5.12+
Chris 'BinGOs' Williams [Fri, 5 Jul 2013 14:20:03 +0000 (15:20 +0100)]
Update Digest-MD5 to CPAN version 2.53
[DELTA]
2013-07-02 Gisle Aas <gisle@ActiveState.com>
Release 2.53
Drop File::Spec dependency and don't override installation location
for perl-5.12++
Documentation tweaks.
Tony Cook [Fri, 5 Jul 2013 07:20:57 +0000 (17:20 +1000)]
ignore build products from the newly dist/ed Exporter
Peter Martini [Mon, 1 Jul 2013 22:13:42 +0000 (18:13 -0400)]
Introduce validate_proto / stop stripping spaces
The code to do warnings on invalid prototypes was a chunk
of 70 or so lines inside the core lexer. It also had the
side effect of removing spaces from the prototype as part
of its check for warnings.
This validation code is now just a validation, printing
out warnings if and only if warnings are enabled,
and leaving the source SV untouched.
Tony Cook [Fri, 5 Jul 2013 06:01:06 +0000 (16:01 +1000)]
minor clean up of the refactoring of
d6a4f4b531
- the values assigned to format_name are unused under PERL_MAD, hence
format_name is unused
- and PL_madskills is #defined to 0 when not under PERL_MAD
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.
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.
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.
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.
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.
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.
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.
Father Chrysostomos [Fri, 5 Jul 2013 01:30:56 +0000 (18:30 -0700)]
Consistent spaces after dots in perlhack.pod
Father Chrysostomos [Fri, 5 Jul 2013 01:25:30 +0000 (18:25 -0700)]
Use tabs consistently in AUTHORS
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.
Father Chrysostomos [Thu, 4 Jul 2013 20:22:39 +0000 (13:22 -0700)]
Add Keedi Kim to AUTHORS
Keedi Kim [Thu, 4 Jul 2013 17:11:12 +0000 (02:11 +0900)]
Update brand-new README.ko
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
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
Karl Williamson [Thu, 4 Jul 2013 22:08:05 +0000 (16:08 -0600)]
op.c: White-space only
Outdent to correspond with removed block
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
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.
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.)
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.
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
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.
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.
James E Keenan [Wed, 3 Jul 2013 00:03:53 +0000 (02:03 +0200)]
Add test for undefined first argument to fileparse().
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.
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.
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.
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
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.
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.
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.
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.
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.
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.
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.
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
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/
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.
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
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.
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.
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.
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.
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
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.
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.
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.
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.
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.
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.