Zefram [Sat, 11 Dec 2010 18:18:12 +0000 (18:18 +0000)]
fix various compiler warnings from XS code
Trivial changes to fix warnings of types
* unclear precedence
* assignment as conditional
* signed/unsigned mixing
* unused parameter/variable
* value computed not used
* wrong argument type for a printf format
* variable may be used uninitialised (due to unhandled switch case)
Florian Ragwitz [Thu, 9 Dec 2010 23:08:42 +0000 (00:08 +0100)]
Dual-life File::CheckTree
Chris 'BinGOs' Williams [Sat, 11 Dec 2010 16:41:50 +0000 (16:41 +0000)]
Update ExtUtils-CBuilder to CPAN version 0.2801
[DELTA]
0.2801 - Wed Dec 8 21:36:56 EST 2010
Fixed:
- Fixed spurious t/04-base.t failure when run from Perl core
[David Golden]
Florian Ragwitz [Sat, 11 Dec 2010 14:33:27 +0000 (15:33 +0100)]
Upgrade Devel-SelfStubber fro version 1.03 to 1.04
This is necessary because the CPAN version required its SelfLoader dependency to
be bumped to a version that didn't swallow text after __END__.
Nicholas Clark [Sat, 11 Dec 2010 12:18:09 +0000 (12:18 +0000)]
Fix permissions for ext/XS-APItest/t/refs.t, added as +x in
88b5a879c6c933e0.
Florian Ragwitz [Sat, 11 Dec 2010 11:01:22 +0000 (12:01 +0100)]
Encode has CPAN as its upstream
As confirmed by Dan.
Father Chrysostomos [Sat, 11 Dec 2010 06:12:48 +0000 (22:12 -0800)]
Fix some casts in typemap
Father Chrysostomos [Sat, 11 Dec 2010 06:11:30 +0000 (22:11 -0800)]
Fix test count in ext/XS-APItest/t/refs.t
Father Chrysostomos [Sat, 11 Dec 2010 06:11:10 +0000 (22:11 -0800)]
Add ext/XS-APItest/t/refs.t to MANIFEST
gfx [Sat, 11 Dec 2010 05:57:22 +0000 (21:57 -0800)]
Fix XS types in typemap in order to deal with references with get magics correctly
Father Chrysostomos [Sat, 11 Dec 2010 05:46:13 +0000 (21:46 -0800)]
[perl #68712] caller() filenames broken by "use"
require() sets the file name for PL_compiling but localises it to the
calling scope, not the scope that it creates. As a result, caller()
during or after require (in the same scope that require was called
from) will return the wrong file name for whichever code is being com-
piled at the time and any scope sharing the same CopFILE (or something
like that):
$ ./miniperl -Ilib -e 'BEGIN{require strict; warn join ", ", caller(0)}'
main, lib/strict.pm, 1, main::BEGIN, 1, , , , 0, , at -e line 1.
^^^^^^^^^^^^^ should be -e
This commit moves the SAVECOPFILE_FREE and CopFILE_set down below the
ENTER_with_name to put it in the right scope. It was in its existing
location presumably because namesv needed to be freed before any code
that could die (and the CopFILE_set call reads a PV allocated for
namesv). So now namesv is mortalised instead.
The if(tryrsfp) is no longer necessary, as that code is never reached
when tryrsfp is false.
The block in between that sets %INC was reading CopFILE. It can simply
use the same tryname variable that is passed to CopFILE_set.
Jan Dubois [Sat, 11 Dec 2010 01:45:30 +0000 (17:45 -0800)]
Update Win32 from CPAN (from 0.40 to 0.41)
Father Chrysostomos [Sat, 11 Dec 2010 00:17:09 +0000 (16:17 -0800)]
perldelta for [perl #72090]
Father Chrysostomos [Sat, 11 Dec 2010 00:12:13 +0000 (16:12 -0800)]
perldelta for [perl #68658]
Father Chrysostomos [Fri, 10 Dec 2010 22:59:31 +0000 (14:59 -0800)]
perldelta for 0e5d25b
David Leadbeater [Fri, 10 Dec 2010 22:56:41 +0000 (14:56 -0800)]
[perl #80548] Add the stash name to DTrace probes
This adds an additional parameter to perl's dtrace probes with the stash
name of the subroutine. This generally looks nicer than the filename but
gives a similar level of context.
As this is an additional parameter this will not have an impact on
existing DTrace scripts. (Also due to the way DTrace works I believe it
does not break binary compatibility and would be safe to backport to
maint-5.12 if desired, but I'm not a DTrace expert.)
Father Chrysostomos [Fri, 10 Dec 2010 22:54:13 +0000 (14:54 -0800)]
[perl #72090] unitialized variable name wrong with no strict refs
$ ./perl -we '$a = @$a > 0'
Use of uninitialized value $a in array dereference at -e line 1.
Use of uninitialized value $a in numeric gt (>) at -e line 1.
S_find_uninit_var was not taking into account that rv2*v could return
undef. So it merrily looked at the child ops to find one that named
a variable.
This commit makes it skip any rv2av/rv2hv that does not have an OP_GV
as its child op.
In other words, it skips @{...} and %{...} (including the shorthand
forms @$foo and %$foo), but not @foo or %foo.
Florian Ragwitz [Fri, 10 Dec 2010 22:07:32 +0000 (23:07 +0100)]
Dual-life autouse
Florian Ragwitz [Fri, 10 Dec 2010 21:02:52 +0000 (22:02 +0100)]
Dual-life Env
Florian Ragwitz [Fri, 10 Dec 2010 16:31:15 +0000 (17:31 +0100)]
Localise temporary FHs in the EU::Constant tests
This avoids makes them work on 5.6.2 again, where the fact that the "XS" glob is
also used elsewhere in the tests triggered what seems to be a bug that causes
*XS to lose it's "q" magic.
Nicholas Clark [Fri, 10 Dec 2010 16:30:21 +0000 (16:30 +0000)]
As of 2.25, 5.6.x is writing minor version 8, so update malice.t
Nicholas Clark [Fri, 10 Dec 2010 16:29:31 +0000 (16:29 +0000)]
5.8.8's Test::More doesn't provide note(), so revert to a print statement.
Abhijit Menon-Sen [Fri, 10 Dec 2010 16:13:32 +0000 (21:43 +0530)]
The CPAN release will include Test::More to be used on old Perls
Abhijit Menon-Sen [Fri, 10 Dec 2010 15:13:14 +0000 (20:43 +0530)]
Make sure META.yml mentions perlbug as the right place to file bugs
Nicholas Clark [Fri, 10 Dec 2010 14:38:52 +0000 (14:38 +0000)]
Convert all Storable's tests to use Test::More.
Originally Storable didn't use any test modules, and had an ok subroutine in
t/st-dump.pl. Subsequently some tests were made conditional on Test::More
loading, and more recently the distribution started bundling Test::More, at
which point newer tests were written to use it. However, the older tests have
never been refactored to use it. Hence refactor tests to use Test::More, and
delete the now-unused test functions from t/st-dump.pl
Tested on blead and 5.004.
Florian Ragwitz [Fri, 10 Dec 2010 12:50:00 +0000 (13:50 +0100)]
Dual-life I18N::Collate
H.Merijn Brand [Fri, 10 Dec 2010 11:29:50 +0000 (12:29 +0100)]
Add probe for sa_len availability in sockaddr struct
Sorry for the huge config_h.SH re-order. Don't know (yet) what caused that
Father Chrysostomos [Fri, 10 Dec 2010 08:28:02 +0000 (00:28 -0800)]
perldelta for [perl #19135]
Florian Ragwitz [Fri, 10 Dec 2010 00:01:58 +0000 (01:01 +0100)]
legacy.pm is no more
It has been removed in
1863b87966ed39b042c45e12d1b4e0b90b9cc071. feature.pm
replaces it.
Ricardo Signes [Thu, 9 Dec 2010 21:02:38 +0000 (16:02 -0500)]
perlfaq is not the only exception; just say "few"
Ricardo SIGNES [Thu, 9 Dec 2010 20:58:21 +0000 (15:58 -0500)]
Remove ; from use statements for readability. (Obeying the documentation
policy)
Ricardo SIGNES [Thu, 9 Dec 2010 20:56:34 +0000 (15:56 -0500)]
Typo fix
Jesse Vincent [Thu, 9 Dec 2010 20:45:50 +0000 (15:45 -0500)]
First draft of a documentation policy.
Jesse Vincent [Thu, 9 Dec 2010 20:15:56 +0000 (15:15 -0500)]
Slightly update perl.pod's "DESCRIPTION"
Jesse Vincent [Thu, 9 Dec 2010 20:11:45 +0000 (15:11 -0500)]
Don't explicitly talk about our support for DBM files as a feature.
It's not 1995 anymore.
Jesse Vincent [Thu, 9 Dec 2010 20:10:15 +0000 (15:10 -0500)]
remove more a2p/s2p from perl.pod
Jesse Vincent [Thu, 9 Dec 2010 20:07:51 +0000 (15:07 -0500)]
Remove a now-inaccurate statement about setuid scripts
Jesse Vincent [Thu, 9 Dec 2010 20:07:19 +0000 (15:07 -0500)]
Remove a paragraph from perl.pod pimping it as a sed/awk replacement.
Jesse Vincent [Thu, 9 Dec 2010 20:05:41 +0000 (15:05 -0500)]
Wordsmithing of Abigail's prose.
Abigail [Thu, 9 Dec 2010 19:48:25 +0000 (14:48 -0500)]
Added a statement about the examples in perl's documentation
Florian Ragwitz [Thu, 2 Dec 2010 09:41:33 +0000 (10:41 +0100)]
Dual-life Devel::SelfStubber
Nicholas Clark [Thu, 9 Dec 2010 15:42:44 +0000 (15:42 +0000)]
Storable's t/malice.t now needs to use a minor version >4 ahead for testing.
The "safety margin" of 4 has been used up, now that Storable 2.25 can read
v2.8 files, but only writes out v2.4 on 5.004. All tests now pass on 5.004
(albeit with a bunch of warnings about ambiguous use of barewords, which are
no longer warnings).
Also, update $Test::Builder::Level to make diagnosing failing tests easier.
Nicholas Clark [Thu, 9 Dec 2010 15:41:37 +0000 (15:41 +0000)]
Refactor Storable::read_magic to avoid 4 arg substr.
This makes it fractionally shorter, and restores all compatibility with 5.004
David Golden [Thu, 9 Dec 2010 02:32:26 +0000 (21:32 -0500)]
Fix failing ExtUtils-CBuilder test
The change is also being applied upstream, but this will fix
tests until the next EU::CB release is merged to blead
Marvin Humphrey [Wed, 8 Dec 2010 20:36:33 +0000 (12:36 -0800)]
Document use of strlen() by is_ascii_string(), is_utf8_string() and friends.
Father Chrysostomos [Thu, 9 Dec 2010 00:52:08 +0000 (16:52 -0800)]
[perl #68658] attributes turn "state" into "my"
This is for two reasons:
• In S_my_kid, the attribute-handling code comes before the code that
marks the padop as being a state instead of a my, which it knows to
do based on the value of PL_parser->in_my. The attribute-handling
code begins by setting PL_parser->in_my to FALSE, preventing the
code that follows from doing its job.
So now PL_parser->in_my is read at the top of S_my_kid, before the
attribute code, with the statehood recorded in a boolean. Then the
code that marks the padop as being state checks that boolean
instead of in_my.
• A lexical variable declaration that has an attribute and is assigned
to in the same expression compiles to something similar to:
(attributes->import(... \$x ...), my $x) = 3;
where the list is actually in scalar context, returning the my $x
which is then assigned to (something that cannot be expressed
directly in Perl syntax). So Perl_ck_sassign needs to take that list
op into account when creating the ‘once’ op that actually makes
state assignment work. Up till now it was just looking for a padsv
on its LHS. This commit makes it check also for a list op whose last
item is a padsv.
Jan Dubois [Thu, 9 Dec 2010 00:09:42 +0000 (16:09 -0800)]
Revert change to AUTHORS #
ea316027e
#2a25d7b already adds Paul Evans at the correct spot.
Jan Dubois [Wed, 8 Dec 2010 23:49:03 +0000 (15:49 -0800)]
Fix file permissions mangled by #
0e5d25bf
Jan Dubois [Wed, 8 Dec 2010 23:45:06 +0000 (15:45 -0800)]
Merge branch 'blead' of ssh://perl5.git.perl.org/gitroot/perl into blead
Jan Dubois [Wed, 8 Dec 2010 22:07:18 +0000 (14:07 -0800)]
Upgrade Win32 from CPAN (from 0.39 to 0.40)
Yes, still has CR/LF line endings; I'll fix it in a CPAN
release with no changes but the line-endings fix first.
Father Chrysostomos [Wed, 8 Dec 2010 20:54:25 +0000 (12:54 -0800)]
perldelta for 558b442/[perl #66104]
Brad Gilbert [Tue, 7 Dec 2010 23:16:56 +0000 (17:16 -0600)]
Modified unlink_all in t/test.pl to return the count of unlinked files This will make it so that it can be a drop-in replacement for unlink
Brad Gilbert [Tue, 7 Dec 2010 23:14:51 +0000 (17:14 -0600)]
Replaced '1 while unlink' with 'unlink_all' in t/uni/write.t
Brad Gilbert [Tue, 7 Dec 2010 23:14:30 +0000 (17:14 -0600)]
Replaced '1 while unlink' with 'unlink_all' in t/run/switches.t
Brad Gilbert [Tue, 7 Dec 2010 23:14:12 +0000 (17:14 -0600)]
Replaced 'unlink' with 'unlink_all' in t/re/qr.t
Brad Gilbert [Tue, 7 Dec 2010 23:13:57 +0000 (17:13 -0600)]
Replaced 'unlink' with 'unlink_all' in t/op/sysio.t
Brad Gilbert [Tue, 7 Dec 2010 23:13:05 +0000 (17:13 -0600)]
Replaced '1 while unlink' with 'unlink_all' in t/op/stat.t
Brad Gilbert [Tue, 7 Dec 2010 23:12:31 +0000 (17:12 -0600)]
Replaced 'unlink' with 'unlink_all' in t/op/magic.t
Brad Gilbert [Tue, 7 Dec 2010 23:11:52 +0000 (17:11 -0600)]
Replaced 'unlink' with 'unlink_all' in t/op/goto.t
Brad Gilbert [Tue, 7 Dec 2010 23:11:23 +0000 (17:11 -0600)]
Replaced 'unlink' with 'unlink_all' in t/op/filetest.t
Brad Gilbert [Tue, 7 Dec 2010 23:11:00 +0000 (17:11 -0600)]
Replaced 'unlink' with 'unlink_all' in t/lib/deprecate.t
Brad Gilbert [Tue, 7 Dec 2010 23:10:39 +0000 (17:10 -0600)]
Replaced '1 while unlink' with 'unlink_all' in t/io/perlio.t
Brad Gilbert [Tue, 7 Dec 2010 23:09:30 +0000 (17:09 -0600)]
Replaced 'unlink' with 'unlink_all' in t/io/nargv.t
Brad Gilbert [Tue, 7 Dec 2010 23:08:07 +0000 (17:08 -0600)]
Replaced '1 while unlink' with 'unlink_all' in t/io/fs.t
Brad Gilbert [Tue, 7 Dec 2010 23:07:51 +0000 (17:07 -0600)]
Replaced '1 while unlink' with 'unlink_all' in t/io/argv.t
Brad Gilbert [Tue, 7 Dec 2010 22:17:02 +0000 (16:17 -0600)]
Replaced '1 while unlink' with 'unlink_all' in t/op/write.t
Father Chrysostomos [Wed, 8 Dec 2010 19:11:07 +0000 (11:11 -0800)]
[perl #19135] string eval turns off readonlyness on lexicals
Don’t turn off readonliness on lexicals when freeing pad entries.
The readonliness is (prior to this commit) turned off explicitly in
pad_free under ithreads. See also bug #19022, which resulted from the
same change. There is some discussion there, too, but nobody seemed to
know exactly why the readonliness needed to be turned off.
Change 4761/2aa1bed, from January of 2000, added that SvREADONLY_off.
It is supposed to make sure that pad entries that were constants will
not be constants the next time they are used.
Dave Mitchell writes:
> I think...[this]...fix is correct (just removing the SvREADONLY_off).
> The issue it was trying to fix appears to have been properly fixed
> later by
3b1c21fabed159100271bd60bac3f870f5ac16af, which is why it's
> safe to remove it.
So this commit just deletes that code.
Nicholas Clark [Wed, 8 Dec 2010 11:34:49 +0000 (11:34 +0000)]
In Storable.xs fix #80074, caused by the Perl stack moving when expanded.
cbc736f3c4431a04 refactored Storable::{net_,}pstore to simplify the logic in
their caller, Storable::_store(). However, it introduced a bug, by assigning
the result of do_store() to a location on the Perl stack, which fails if the
Perl stack moves, because it was reallocated. Fix this assumption, and add a
test which causes the Perl stack to expand during the call to do_store().
Karl Williamson [Mon, 6 Dec 2010 19:16:24 +0000 (12:16 -0700)]
regexec.c: Fix locale and \s
The handling for locale \s and \S both assume that the character in
ASCII platforms at 0x20 is a space. This is not necessarily so.
I'm guessing that the code was originally just copied and pasted from
the non-locale space handling code without thinking. That code hard-coded
in the space character, probably to avoid an expensive swash fetch for a
common situation.
Karl Williamson [Mon, 6 Dec 2010 19:01:22 +0000 (12:01 -0700)]
regexec.c: Add missing handlers for locale \d
regexec.c had some code to handle \d under locales, but not everywhere.
Karl Williamson [Mon, 6 Dec 2010 18:56:49 +0000 (11:56 -0700)]
regcomp.sym: Correct DIGITL, NDIGITL entries
These were missing that they were simple (matching exactly 1 character)
and have 0 regnode arguments
Karl Williamson [Mon, 6 Dec 2010 15:35:17 +0000 (08:35 -0700)]
regcomp.c: Add locale for \d
The DIGITL and NDIGITL regnodes were not being generated; instead
regular DIGIT and NDIGIT regnodes were even under locale.
This means no one has probably ever used Perl on a locale that changed
the digits.
Karl Williamson [Sun, 5 Dec 2010 20:10:13 +0000 (13:10 -0700)]
toke.c: Fix EBCDIC problem
Commit
356979f4a7d780fd67a92a9ca6c8659bd12e7168 failed to include two
instances in toke.c that needed the same treatment, i.e., converting
properly from I8 to native.
Karl Williamson [Sun, 5 Dec 2010 20:09:43 +0000 (13:09 -0700)]
toke.c: highlight problematic-mentioning comment
Karl Williamson [Sun, 5 Dec 2010 20:08:33 +0000 (13:08 -0700)]
uni/fold.t: Prevent [] from being optimized out
This test hasn't been testing bracketed char classes because a single
character class gets optimized out.
Karl Williamson [Sun, 5 Dec 2010 20:07:13 +0000 (13:07 -0700)]
regcomp.c: Revert to using regcomp.sym order
Now that the new nodes are grouped properly, we can use the fact that
the named backreferences all come after all the numbered backreferences,
as had been there before.
Karl Williamson [Sun, 5 Dec 2010 19:28:21 +0000 (12:28 -0700)]
regcomp.sym: Re-order for better grouping
The recently added regnodes are moved to their respective equivalence
classes, and the named backreferences are moved to just after the
numbered backreferences
Karl Williamson [Sun, 5 Dec 2010 03:48:24 +0000 (20:48 -0700)]
regcomp.sym: Remove misleading comments
Yves informed me that in spite of the comments giving precise node
numbers, those numbers can change, so new nodes can be mixed in with
their kin. Remove those comments
Father Chrysostomos [Wed, 8 Dec 2010 02:28:46 +0000 (18:28 -0800)]
Avoid setting PL_cv_has_eval unnecessarily
Quoting op.c:
/* /$x/ may cause an eval, since $x might be qr/(?{..})/ */
But the (?{..})’s compilation is only ever reached in the scope of
‘use re 'eval'’, so we can avoid setting PL_cv_has_eval (and the
slight overhead that entails) when that pragma is off.
Father Chrysostomos [Wed, 8 Dec 2010 02:02:16 +0000 (18:02 -0800)]
[perl #66104] Bugs in extended regexp features
More precisely: Make run-time (?{...}) inherit pragmata.
This commit makes Perl_sv_compile_2op_is_broken (nice name!) copy the
hints from PL_curcop if invoked during run time. Usually they are
inherited from the code that is currently being compiled (which works
for $foo =~ /(?{...})/), but the code currently being compiled is not
the enclosing scope at run time ($bar = '(?{...})'; $foo =~ $bar),
hence the need for copying in a similar manner to pp_entereval.
Theoretically this code should also have to avoid copying a statement
label, but goto inside a regexp eval does not currently work, so I
cannot prove or disprove that yet.
David Leadbeater [Wed, 8 Dec 2010 00:46:53 +0000 (16:46 -0800)]
The docs for SvRX and SvRXOK still refered to magic and the code snippet
was wrong.
Jan Dubois [Tue, 7 Dec 2010 21:57:10 +0000 (13:57 -0800)]
Don't advertise PERL_HASH_SEED_EXPLICIT and NO_HASH_SEED
These (commented out) options had been advertised/documented in the
Makefile to make it easy to produce binary compatible builds of
Perl 5.8.x after the hash key randomization feature was introduced.
There is no reason to point out these customization option in
a prominent space.
Jan Dubois [Tue, 7 Dec 2010 21:51:46 +0000 (13:51 -0800)]
Always build with crypt() support on Windows
The sources did support to drop win32/fcrypt.c from a Perl distribution
and build without a crypt() implementation to account for the paranoia
around distribution of encryption technology. However sources and binaries
have been released for at least 10 years with all the code in place, so
there is not much point in making it configurable.
Nicholas Clark [Tue, 7 Dec 2010 14:44:27 +0000 (14:44 +0000)]
Uncomment and fix up tests at the end of Storable's blessed.t
These tests have never been "live", having been added, commented out, in 2004
as part of
754c00caaffe2ec6. The trick to make them work is to delete from the
symbol table, rather than merely attempting to undefine the subroutine.
Chris 'BinGOs' Williams [Tue, 7 Dec 2010 13:25:37 +0000 (13:25 +0000)]
Update ExtUtils-CBuilder to CPAN version 0.2800
[DELTA]
0.2800 - Mon Dec 6 16:05:46 EST 2010
- No changes from 0.27_07
0.27_07 - Wed Sep 29 21:48:55 EDT 2010
Fixed:
- Fixed t/02-link.t on perl < 5.8
0.27_06 - Mon Sep 27 15:29:54 EDT 2010
Fixed:
- Preserves exit status on VMS [Craig Berry]
- Fix Win32 split_like_shell escaping [Christian Walde]
0.27_05 - Wed Jul 28 15:29:59 EDT 2010
Fixed:
- Tests no longer fail if user has set the CC environment variable
0.27_04 - Mon Jul 26 22:41:43 EDT 2010
Added:
- handle c compiler and c++ compiler separately
(adds requirement for IPC::Cmd) [Jens Rehsack]
Others:
- rely on File::Temp::tempfile and File::Spec::tmpdir to
get unique file name for checking for compiler
[Jens Rehsack]
- Code base modernization and substantial code coverage improvments
[Jim Keenan]
Florian Ragwitz [Tue, 7 Dec 2010 12:42:45 +0000 (13:42 +0100)]
Perldelta for 22a3069
As contributed by Zefram on irc, with some pod markup added.
Jan Dubois [Tue, 7 Dec 2010 02:16:39 +0000 (18:16 -0800)]
Get rid of PERL_MSVCRT_READFIX
The code works around a bug in very old versions of MSVCRT.dll.
The issue has been fixed a long time ago by Microsoft, so anyone
who has installed a Windows Service Pack in the last 10 years
or so won't be affected by the problem.
Jan Dubois [Tue, 7 Dec 2010 01:13:37 +0000 (17:13 -0800)]
Remove dead Windows code
Zefram [Mon, 6 Dec 2010 22:21:19 +0000 (22:21 +0000)]
stopgap hack for $@ as unwinding reason indicator
Set $@ early in a die as well as late, so that it continues to function
as an unreliable indicator of whether unwinding in progress is due to
an exception. This is a stopgap arrangement, until the unwinding process
can be introspected properly.
Jan Dubois [Mon, 6 Dec 2010 22:33:12 +0000 (14:33 -0800)]
Merge branch 'blead' of ssh://perl5.git.perl.org/gitroot/perl into blead
David Golden [Mon, 6 Dec 2010 20:41:20 +0000 (15:41 -0500)]
Clarify this is the Perl 5 interpreter for manpage and META
Karl Williamson [Sun, 5 Dec 2010 23:13:59 +0000 (16:13 -0700)]
regcomp.c: Fix longjmp-related warnings
This patch should get rid of the compiler warnings recently introduced.
Another way to handle the pm_flags warning is to declare it to be
volatile, but not all compilers that perl uses apparently have that, so
I chose a longer way of introducting a new variable that isn't changed
within the jumpable area. The others were fixed by not initializing
them before the jumpable area.
Father Chrysostomos [Sun, 5 Dec 2010 03:27:27 +0000 (19:27 -0800)]
To-do tests for abnormal exiting from (?{})
Father Chrysostomos [Sun, 5 Dec 2010 02:11:24 +0000 (18:11 -0800)]
Hideous to-do tests for (?{}) scoping issues
Father Chrysostomos [Sat, 4 Dec 2010 20:43:06 +0000 (12:43 -0800)]
Un-TODO and un-SKIP the [perl #22354] tests
We can run these now that the regexp engine is reëntrant.
Father Chrysostomos [Sat, 4 Dec 2010 20:38:38 +0000 (12:38 -0800)]
Emit warning for use re "/ul"
This was an omission on my part.
This should perhaps be an error, but I am just following what
‘use re’ already does with ‘use re "whatever"’.
Karl Williamson [Sat, 4 Dec 2010 18:18:23 +0000 (11:18 -0700)]
regexec.c: Clean up initialized vars in switch
Commit
cf5c578b88887f19f7fba519bbc12296 attempted to clean up
d7ef4b73,
but did not get it quite right. This fixes it, after consultation with
the author.
Karl Williamson [Fri, 3 Dec 2010 17:46:19 +0000 (10:46 -0700)]
regcomp.c: small efficiency, portability fix
The code had hard-coded into it the ascii platform values for possible
start bytes. There are macros that do that portably with no branches
Karl Williamson [Fri, 3 Dec 2010 17:44:55 +0000 (10:44 -0700)]
regcomp.c: small efficiency improvement
The inline function repeats the test removed here.
Karl Williamson [Fri, 3 Dec 2010 17:36:22 +0000 (10:36 -0700)]
regcomp.c: small efficiency gain
The 7-bit test operations always fail on non-ascii characters, therefore
it isn't needed to test each such character individually. The loops
that do that and then set a bit for each character can therefore stop at
127 instead of 255 (the bitmaps are initialized to all zeros). For
EBCDIC, the same applies, except that we have to map those 7-bits
characters to the 8-bit EBCDIC range. This creates an extra array
lookup for each ebcdic character, but half as many times through the
loop.
For the complement of the 7-bit operations, we know that they will all
be set for the non-ascii characters. Therefore, we don't need to test,
we can just unconditionally set those bits. It would not be a good idea
to just do a memset on that range under /i, as each character that gets
chosen may have its fold added as well and that has to be looked up
individually.