Karl Williamson [Thu, 13 Dec 2012 04:23:03 +0000 (21:23 -0700)]
regcomp.c: Use computed value instead of hard-coded one
The cases of this switch have used the hard-coded character class
number, depending on which case it is. However, there is a mapping from
the switch case value to its equivalent class number. This changes to
use that mapping
Karl Williamson [Thu, 13 Dec 2012 04:17:45 +0000 (21:17 -0700)]
regcomp.c: Move #define to earlier in file
This will be needed by code being added earlier in the file than the
define is currently. It also makes sure that it is integer division.
Karl Williamson [Thu, 13 Dec 2012 03:26:08 +0000 (20:26 -0700)]
Use array for some inversion lists
This patch creates an array pointing to the inversion lists that cover
the Latin-1 ranges for Posix character classes, and uses it instead of
the individual variables previously referred to.
Karl Williamson [Thu, 13 Dec 2012 03:17:10 +0000 (20:17 -0700)]
perl.c: Use loop to clear array
These SV* variables are now in an array, and its cleaner to use a loop
instead of doing it individually.
Karl Williamson [Thu, 13 Dec 2012 02:06:47 +0000 (19:06 -0700)]
regcomp.c: Use table look-up instead of individual strings.
This changes to get the name for the character class's Unicode property
via table lookup. This is in preparation for making most of the cases
in this switch identical, so they can be collapsed.
Karl Williamson [Wed, 12 Dec 2012 18:35:06 +0000 (11:35 -0700)]
regcomp.c: Use values if known at compile time
When compiling a regular expression, it is too expensive to go out and
load from disk the list of code points that match a particular Posix
character class. Some of these classes have so few code points, that
the lists are compiled in, but others are too large for that, for
example the list of code points that match \w. Also, it is known at
compile time which of the 256 code points within the Latin-1 range match
any Posix character class.
The lists for beyond Latin-1 are demand-loaded upon first need for each,
thus the loading is deferred to execution time. This is less efficient
than doing it a compilation time, but many many programs will never need
to load them, so the deferral is a big gain. However, once loaded, they
stay loaded (in this thread and all sub threads). It may be that at the
time a regex is being compiled that a list it needs has already been
loaded for some other reason. Then, the data is already available for
free.
This commit changes to use this for some character classes whose
non-complemented forms are wanted. Before pushing this to blead, I
realized a better way to do this, and so the code in this commit gets
ripped out some commits hence. If I try to rebase this commit away, it
turns up too many "failure to apply" messages for the intermediate
commits, so I'm leaving this one in.
Karl Williamson [Wed, 12 Dec 2012 17:35:02 +0000 (10:35 -0700)]
handy.h: Move some back compat macros
Move them to the section that is for back-compat definitions.
Karl Williamson [Wed, 12 Dec 2012 16:17:50 +0000 (09:17 -0700)]
Add generic _is_(uni|utf8)_FOO() function
This function uses table lookup to replace 9 more specific functions,
which can be deprecated. They should not have been exposed to the
public API in the first place
Karl Williamson [Wed, 12 Dec 2012 03:47:25 +0000 (20:47 -0700)]
handy.h: Create isALPHANUMERIC() and kin
Perl has had an undocumented macro isALNUMC() for a long time. I want
to document it, but the name is very obscure. Neither Yves nor I are
sure what it is. My best guess is "C's alnum". It corresponds to
/[[:alnum:]]/, and so its best name would be isALNUM(). But that is the
name long given to what matches \w. A new synonym, isWORDCHAR(), has
been in place for several releases for that, but the old isALNUM()
should remain for backwards compatibility.
I don't think that the name isALNUMC() should be published, as it is too
close to isALNUM(). I finally came to the conclusion that
isALPHANUMERIC() is the best name; it describes its purpose clearly; the
disadvantage is its long length. I doubt that it will get much use, but
we need something, I think, that we can publish to accomplish this
functionality.
This commit also converts core uses of isALNUMC to isALPHANUMERIC. (I
intended to that separately, but made a mistake in rebasing, and
combined the two patches; and it seemed like not a big enough problem to
separate them out again.)
Karl Williamson [Wed, 12 Dec 2012 03:43:59 +0000 (20:43 -0700)]
handy.h: Move some #defines
I'm moving this block of back-compat macros to later in the file, so
it comes after all the other definitions that may need to have backwards
compatibility equivalents
Karl Williamson [Tue, 11 Dec 2012 20:05:04 +0000 (13:05 -0700)]
intrpvar.h: Place some swash pointers in an array
Karl Williamson [Wed, 12 Dec 2012 03:35:16 +0000 (20:35 -0700)]
intrpvar.h: #include handy.h
This will allow some mnemonics to be used in future commits
Karl Williamson [Wed, 12 Dec 2012 03:34:31 +0000 (20:34 -0700)]
handy.h: Guard against recursive #inclusion
Karl Williamson [Tue, 11 Dec 2012 19:06:47 +0000 (12:06 -0700)]
regcomp.c: White-space, comment only
Karl Williamson [Wed, 19 Dec 2012 20:44:08 +0000 (13:44 -0700)]
perlapi: Grammar nit
Karl Williamson [Fri, 21 Dec 2012 04:57:04 +0000 (21:57 -0700)]
utf8.c: Fix reference count in swash_to_invlist()
The return SV* from this function was inconsistent in its reference
count. In some cases it creates a new SV, which has a reference count
of 1, and in some cases it returned an existing SV without incrementing
the reference count. If the caller thought it was getting its own copy,
and decremented the reference count, it could lead to a double free.
Karl Williamson [Thu, 20 Dec 2012 23:16:26 +0000 (16:16 -0700)]
perlapi: Clarify return value of SvREFCNT_inc()
Karl Williamson [Thu, 20 Dec 2012 23:14:05 +0000 (16:14 -0700)]
regexec.c: Remove redundant calculation
Commit
9a902117f5d8a3ebc669e3a90eeb7cee78286a33 introduced a redundancy.
It calculates a value twice.
Karl Williamson [Sat, 22 Dec 2012 16:32:43 +0000 (09:32 -0700)]
XS-Typemap: bump version
I'm getting cmp_version.t failures from the recent T_BOOL changes. I
don't know why others don't seem to be.
Chris 'BinGOs' Williams [Sat, 22 Dec 2012 10:08:22 +0000 (10:08 +0000)]
Update Unicode-Collate to CPAN version 0.97
[DELTA]
0.97 Sat Dec 22 14:25:50 2012
- bug fix: XS of 0.96 (if UCA_Version is 9 to 11) wrongly referred to
DUCET for completely ignorable characters, even though the collator
don't use DUCET.
- separated t/notable.t from t/test.t.
Chris 'BinGOs' Williams [Sat, 22 Dec 2012 09:58:09 +0000 (09:58 +0000)]
Sync Module-CoreList version in Maintainers.pl with CPAN
Daniel Dragan [Thu, 20 Dec 2012 04:27:45 +0000 (23:27 -0500)]
a better perldelta for
d1bee06989
a better perldelta for
d1bee06989
Daniel Dragan [Thu, 20 Dec 2012 04:59:19 +0000 (23:59 -0500)]
Better POD for newSVrv
It takes me a couple times to slowly read the description to realize
what this does. The "its reference count is 1" can be misread to mean
someone must mortalize the return value of newSVrv. The "Creates
a new SV for the RV, C<rv>, to point to." can be misread to mean that
newSVrv is a macro, and will do an &() on rv to create a total of
two new SVs. An SvRV pointing to a posssibly blessed undef SV.
This is also wrong. Adding "existing" makes the point that rv
will not be created in this call.
Tony Cook [Wed, 19 Dec 2012 22:58:55 +0000 (09:58 +1100)]
Tony Cook [Wed, 19 Dec 2012 22:32:53 +0000 (09:32 +1100)]
[perl #115796] fix the T_BOOL OUTPUT typemap for parameters
Tony Cook [Wed, 19 Dec 2012 22:10:01 +0000 (09:10 +1100)]
when the output isn't RETVAL, update the SV instead of replacing it
Previously OUTPUT argument parameters would replace ST(n) instead of
updating it, this meant that the caller's supplied value would not be
updated.
This change means that OUTPUT T_BOOL arguments called RETVAL won't be
handled correctly, but since the OUTPUT didn't work previously for
*any* case, this is a net improvement.
Tony Cook [Wed, 19 Dec 2012 22:05:47 +0000 (09:05 +1100)]
TODO the failing T_BOOL tests
also update one test so it actually fails
Daniel Dragan [Thu, 22 Nov 2012 07:51:06 +0000 (02:51 -0500)]
T_BOOL failure example
[perl #115796] T_BOOL failure example
Tony Cook [Wed, 19 Dec 2012 06:29:55 +0000 (17:29 +1100)]
The T_BOOL_2 tests should have failed, rewrite and TODO
Karl Williamson [Wed, 19 Dec 2012 17:28:29 +0000 (10:28 -0700)]
regexec.c: Remove some read beyond buffer ends
It turns out that this paradigm used in several places in regexec.c is
wrong:
while (s + (len = UTF8SKIP(s)) <= PL_regeol) {
...
s += len;
}
The reason it is wrong is that PL_regeol points to one past the end, and
this will inevitably end up reading the character at PL_regeol, which is
hence out-of-bounds. I don't know how many times I've looked at this
code and missed this, but valgrind found it after I tried Dave
Mitchell's hack to remove the trailing NUL for testing purposes.
The way to make sure that there isn't malformed UTF-8 pointing us to
read too far would be:
while (s < PL_regeol && s + (len = UTF8SKIP(s)) <= PL_regeol) {}
This commit converts the one place that uses this safe thing to the
others:
while (s < PL_regeol) {}
In many places (but not all) in this file, we assume that the input is
well formed. If we're going to be paranoid, it seems to me we should do
it consistently. So I've converted this one relevant instance of
paranoia to not be, to be in line with the rest of the code.
David Mitchell [Tue, 18 Dec 2012 23:09:46 +0000 (23:09 +0000)]
silence g++ warning with PL_magic_vtable_names
See this p5p thread for more details
<
20121218144018.GQ1842@iabyn.com>
David Mitchell [Tue, 18 Dec 2012 23:41:29 +0000 (23:41 +0000)]
test the resetting of refcnt for immortals
PL_sv_undef etc get given a very high ref count, which if it ever reaches
zero, is set back to a high value. On debugging builds, use a lower value
(1000) so that the resetting code gets exercised occasionally.
Also, replace literal (~(U32)0)/2 with the constant SvREFCNT_IMMORTAL.
Dave Rolsky [Tue, 18 Dec 2012 22:45:27 +0000 (16:45 -0600)]
The 5.17.7 release is done, give it a check mark on the schedule
Jesse Luehrs [Tue, 18 Dec 2012 21:06:01 +0000 (15:06 -0600)]
skip this test if we can't get an absolute path
fixes testing as root on at least solaris and openbsd
Dave Rolsky [Tue, 18 Dec 2012 22:21:42 +0000 (16:21 -0600)]
Bump the perl version in various places for 5.17.8
Dave Rolsky [Tue, 18 Dec 2012 22:03:06 +0000 (16:03 -0600)]
Make a new perldelta for 5.17.8-to-be
Dave Rolsky [Tue, 18 Dec 2012 22:02:34 +0000 (16:02 -0600)]
Add the 5.17.7 epigraph to epigraphs.pod
Dave Rolsky [Tue, 18 Dec 2012 21:37:35 +0000 (15:37 -0600)]
Add known t/op/require_errors.t failure to known problems
Dave Rolsky [Tue, 18 Dec 2012 16:57:02 +0000 (10:57 -0600)]
Add 5.17.7 to perlhist
Dave Rolsky [Tue, 18 Dec 2012 16:55:48 +0000 (10:55 -0600)]
Update Module::CoreList for 5.17.7
Dave Rolsky [Tue, 18 Dec 2012 16:54:21 +0000 (10:54 -0600)]
The
23b7025ebc commit is sufficiently documented in perldelta
Dave Rolsky [Mon, 17 Dec 2012 21:32:35 +0000 (15:32 -0600)]
Better description of hash assignment bug fixes
Dave Rolsky [Mon, 17 Dec 2012 21:31:26 +0000 (15:31 -0600)]
Clarify hash assignment bug fix in list context
Dave Rolsky [Mon, 17 Dec 2012 21:26:08 +0000 (15:26 -0600)]
Trim description of one bug fix in perldelta
Dave Rolsky [Mon, 17 Dec 2012 20:03:49 +0000 (14:03 -0600)]
Add more build configurations to test in the RMG
Dave Rolsky [Mon, 17 Dec 2012 19:38:26 +0000 (13:38 -0600)]
Add placeholder for additional
23b7025ebc changes in case no one gets back to me
Dave Rolsky [Mon, 17 Dec 2012 19:37:39 +0000 (13:37 -0600)]
Add an =item marker for sub-list in perldelta
Dave Rolsky [Mon, 17 Dec 2012 19:24:42 +0000 (13:24 -0600)]
Add delta for Storable & Locale::Maketext security issues
Dave Rolsky [Mon, 17 Dec 2012 19:18:52 +0000 (13:18 -0600)]
Fix typo in Locale-Maketext ChangeLog
Dave Rolsky [Mon, 17 Dec 2012 19:09:01 +0000 (13:09 -0600)]
Fix some weird formatting in perldelta
Dave Rolsky [Mon, 17 Dec 2012 18:25:53 +0000 (12:25 -0600)]
s/5.17.5/5.17.6/ in the INSTALL document
Dave Rolsky [Mon, 17 Dec 2012 18:23:42 +0000 (12:23 -0600)]
Add the generated Acknowledgements section to perldelta
Dave Rolsky [Mon, 17 Dec 2012 18:21:17 +0000 (12:21 -0600)]
Remove all the boilerplate notes from perldelta
Dave Rolsky [Mon, 17 Dec 2012 18:20:47 +0000 (12:20 -0600)]
Look up RT authors in the DATA section aliases as well as AUTHORS
This patch is a little gross but if fixes a bug where an author wasn't found
at all. The author in question was in the git log as "bulk88 (via RT)
<perlbug-followup@perl.org>". Note the lack of a name before the "(via RT)"
part.
This whole thing is a bit of a mess. I think this whole script could be
re-organized in a simpler way, perhaps.
Dave Rolsky [Mon, 17 Dec 2012 17:46:13 +0000 (11:46 -0600)]
Work in progress on perldelta for
23b7025ebc
I still need to figure out what some of the changes described in
http://www.nntp.perl.org/group/perl.perl5.porters/2012/10/msg194211.html
actually mean.
David Mitchell [Mon, 17 Dec 2012 14:53:11 +0000 (14:53 +0000)]
use PERL_UNUSED_VAR rather than PERL_UNUSED_DECL
PERL_UNUSED_DECL doesn't do anything under g++, so doing this silences
some g++ warnings.
Chris 'BinGOs' Williams [Mon, 17 Dec 2012 09:46:37 +0000 (09:46 +0000)]
Update ExtUtils-MakeMaker to CPAN version 6.64
[DELTA]
6.64 Sun Dec 16 18:27:40 PST 2012
Build Fixes
* Update the home page in the meta file. makemaker.org has been
unmaintained for a while.
6.63_04 Thu Nov 22 13:18:06 PST 2012
Test Fixes
* Eliminated the problematic and not very useful PASTHRU test
on Windows. A better test will come after stable. [github 41]
(Michael G Schwern)
* Avoid a new regex warning in 5.17.x in t/MM_OS2.t. (Craig A. Berry)
VMS Fixes
* Better ignore files due to non-case-preserving filesystems.
(Craig A. Berry)
Chris 'BinGOs' Williams [Mon, 17 Dec 2012 09:35:15 +0000 (09:35 +0000)]
Update Scalar-List-Utils to CPAN version 1.26
[DELTA]
1.26 -- Sun Dec 16 19:39
* Merge patch from JDHEDDEN - Add Scalar::Util::isdual() RT#76150
1.25_01 -- Wed Nov 21 09:47
* Fix a hash order dependency bug t/tainted.t
(Currently this is a core only version to fix perl5 smokes)
Nicholas Clark [Mon, 17 Dec 2012 09:31:11 +0000 (10:31 +0100)]
GDBM_File must cast fatal_func appropriately for the version of gdbm.h
The fifth argument to gdbm_open() is an optional callback function for fatal
errors. The prototype for this function has changed between gdbm 1.8.3 and
1.9.0, from void (*)() to void(*)(const char *). This distinction doesn't
matter to a C compiler, but does to a C++ compiler, which we use to test the
core build. So, cast appropriately, depending on the version macros in
gdbm.h
Tony Cook [Mon, 17 Dec 2012 09:06:47 +0000 (20:06 +1100)]
skip the \N{...} unloaded charnames croak test when PERL_UNICODE set
This has been causing failures for a while.
Tony Cook [Mon, 17 Dec 2012 09:05:56 +0000 (20:05 +1100)]
SKIP in run_multiple_progs() was parsed but unimplemented, implement it
Tony Cook [Mon, 17 Dec 2012 08:19:32 +0000 (19:19 +1100)]
fix the debugger t expr command regression
Tony Cook [Mon, 17 Dec 2012 08:09:34 +0000 (19:09 +1100)]
rough TODO test for t expr
Father Chrysostomos [Mon, 17 Dec 2012 01:00:45 +0000 (17:00 -0800)]
Make DosGlob.t more resilient
If the sv count goes *down* (which doesn’t happen on my machine, but see
<CANgJU+W8_nVg9-YVRBe2r=ZYCbu9-R3RPf0tbH-XWrtVxYhGpA@mail.gmail.com>), we
certainly don’t have a leak.
Father Chrysostomos [Sun, 16 Dec 2012 14:21:02 +0000 (06:21 -0800)]
perl5180delta: Mention 2 more broken+patched modules
David Mitchell [Sat, 15 Dec 2012 00:31:40 +0000 (00:31 +0000)]
eliminate PL_regsize
This var (or rather PL_reg_state.re_state_regsize, which it is #deffed to)
just holds the index of the maximum opening paren index seen so far in
S_regmatch(). So make it a local var of S_regmatch() and pass it as a
param to the couple of static functions called from there that need it.
(Also give the local var the more meaningful name 'maxopenparen'.)
Karl Williamson [Sun, 16 Dec 2012 18:57:09 +0000 (11:57 -0700)]
mktables, regexec.c: Comments, white-space; no code changes
Karl Williamson [Sun, 16 Dec 2012 18:50:34 +0000 (11:50 -0700)]
Rename property involved in \X matching, for clarity
I was re-reading some code and got confused. This table matches just
the first character of a sequence that may or may not contain others.
Karl Williamson [Sun, 16 Dec 2012 15:56:28 +0000 (08:56 -0700)]
regen/unicode_constants.pl: Add option to skip if undef
I thought I would need this new functionality in this regen script, but
ended up going a different route. But just in case someone might find
this useful in the future, here it is.
Karl Williamson [Sat, 15 Dec 2012 16:53:19 +0000 (09:53 -0700)]
regexec.c: More efficient Korean \X processing
This refactors the code slightly that checks for Korean precomposed
syllables in \X. It eliminates the PL_variable formerly used to keep
track of things.
Karl Williamson [Sat, 15 Dec 2012 16:42:36 +0000 (09:42 -0700)]
regexec.c: Move #defines to earlier in the file
They will be used in a later commit earlier. This also changes the
wording of the comment slightly to give more explanation, since the
context they are now found in is different
Chris 'BinGOs' Williams [Sun, 16 Dec 2012 10:31:07 +0000 (10:31 +0000)]
Added Sergey Alekseev to AUTHORS
Sergey Alekseev [Sun, 16 Dec 2012 10:29:31 +0000 (10:29 +0000)]
Correct typo in perlreftut
Signed-off-by: Chris 'BinGOs' Williams <chris@bingosnet.co.uk>
Yves Orton [Sat, 15 Dec 2012 21:09:36 +0000 (22:09 +0100)]
add lib/File/DosGlob.pm to .gitignore
The master version of the file now lives in ext
Yves Orton [Sat, 15 Dec 2012 20:59:43 +0000 (21:59 +0100)]
Fix missing argument in sprintf in Socket.xs
Shows up as:
Socket.xs:919:16: warning: more '%' conversions than data arguments [-Wformat]
Socket.xs:925:16: warning: more '%' conversions than data arguments [-Wformat]
This bumps the version as well.
Yves Orton [Sat, 15 Dec 2012 20:55:47 +0000 (21:55 +0100)]
Silence a warning under clang/asan
This should silence the following warning:
dump.c:459:57: warning: comparison of constant 85 with expression of
type 'svtype' is always false [-Wtautological-constant-out-of-range-compare]
The warning is a false positive, this code is /meant/ to detect
conditions that should not happen.
Chris 'BinGOs' Williams [Sat, 15 Dec 2012 19:50:36 +0000 (19:50 +0000)]
Update IO-Compress to CPAN version 2.059
[DELTA]
2.059 10 December 2012
* IO::Compress::Base
Added "Encode" option.
James E Keenan [Sat, 15 Dec 2012 03:00:22 +0000 (22:00 -0500)]
Add regression tests for split on string of single wordspace or hex20.
For: RT #116086
Father Chrysostomos [Sat, 15 Dec 2012 14:56:03 +0000 (06:56 -0800)]
perldelta: Add to-do note for hash changes
I don’t have time for this right now, and I might not for two or three
days, so make sure it is not forgotten.
Father Chrysostomos [Sat, 15 Dec 2012 14:54:05 +0000 (06:54 -0800)]
perldelta for glob changes
Father Chrysostomos [Sat, 15 Dec 2012 14:53:24 +0000 (06:53 -0800)]
known_pod_issues.dat: Allow links to Devel::Callsite
Father Chrysostomos [Sat, 15 Dec 2012 14:45:57 +0000 (06:45 -0800)]
perldelta for
bb4784f00 (Constant(undef))
Father Chrysostomos [Sat, 15 Dec 2012 14:42:46 +0000 (06:42 -0800)]
perldelta for
67a057d6d8 (charnames crash)
Father Chrysostomos [Sat, 15 Dec 2012 14:40:40 +0000 (06:40 -0800)]
perldelta for
230834321 (renamed stashes; m??; reset)
Father Chrysostomos [Sat, 15 Dec 2012 14:38:46 +0000 (06:38 -0800)]
perldelta for
55b37f1c31 (goto $tied)
Father Chrysostomos [Sat, 15 Dec 2012 14:37:33 +0000 (06:37 -0800)]
perldelta for
f5eec17c/#115818
Father Chrysostomos [Sat, 15 Dec 2012 14:36:02 +0000 (06:36 -0800)]
perldelta for
90b58ec9e (deprecate lexical $_)
Father Chrysostomos [Sat, 15 Dec 2012 14:25:50 +0000 (06:25 -0800)]
perldelta for
4e52a9b69 and
db9306af4 (local *method=...)
Father Chrysostomos [Sat, 15 Dec 2012 14:23:43 +0000 (06:23 -0800)]
perldelta:
3d460042 fixed more local *ISA bugs
Father Chrysostomos [Sat, 15 Dec 2012 14:22:57 +0000 (06:22 -0800)]
perldelta for
959f7ad7 (local *Detached::method)
Father Chrysostomos [Sat, 15 Dec 2012 14:20:12 +0000 (06:20 -0800)]
perldelta for
978a498e (PL_sub_generation++)
Father Chrysostomos [Sat, 15 Dec 2012 14:17:49 +0000 (06:17 -0800)]
perldelta for
6e1b2de7 (localised glob assignment)
Father Chrysostomos [Sat, 15 Dec 2012 14:12:25 +0000 (06:12 -0800)]
perldelta for cows sawing ampersands
Father Chrysostomos [Sat, 15 Dec 2012 13:55:26 +0000 (05:55 -0800)]
perldelta for
de0df3c09/#23180
Father Chrysostomos [Sat, 15 Dec 2012 13:50:57 +0000 (05:50 -0800)]
perldelta for
ee0832cea (lexical constant warnings)
Father Chrysostomos [Sat, 15 Dec 2012 13:50:00 +0000 (05:50 -0800)]
perldelta for
4ded55f35 (lexical constants)
Father Chrysostomos [Sat, 15 Dec 2012 13:48:22 +0000 (05:48 -0800)]
perldelta for lexsub warnings
Father Chrysostomos [Sat, 15 Dec 2012 13:41:46 +0000 (05:41 -0800)]
perldelta: Blanket entry for memory leaks
Father Chrysostomos [Sat, 15 Dec 2012 13:38:07 +0000 (05:38 -0800)]
perldelta for
f6f93f805 (circular blessings)
Father Chrysostomos [Sat, 15 Dec 2012 13:35:20 +0000 (05:35 -0800)]
perldelta for
2f43ddf1e (sort {undef})