In perl.git, the branch smoke-me/khw-invlist has been created
<http://perl5.git.perl.org/perl.git/commitdiff/6287837d571737ea7f191707a6d61741f129c3ca?hp=0000000000000000000000000000000000000000>
at 6287837d571737ea7f191707a6d61741f129c3ca (commit)
- Log -----------------------------------------------------------------
commit 6287837d571737ea7f191707a6d61741f129c3ca
Author: Karl Williamson <[email protected]>
Date: Sun Dec 16 20:35:30 2012 -0700
regcomp.c: Expand only call of a macro
M regcomp.c
commit 79352591d08ad978f9576a7c2fbc1a221219b7e7
Author: Karl Williamson <[email protected]>
Date: Sun Dec 16 20:11:30 2012 -0700
regcomp.c: Combine two cases in a switch()
Like [[:^digit]] done in a previous commit, the non-complemented
[[:digit:]] can be combined with its kin, provided we override a
variable setting for just it.
M regcomp.c
commit 3b4611241f0eb9131999032e49da15792aa53798
Author: Karl Williamson <[email protected]>
Date: Sun Dec 16 18:58:33 2012 -0700
regcomp.c: Replace macro by expansion in only place called
Previous commits have removed all but one call of this macro. Replace
that call by its expansion. It also adds some comments.
M regcomp.c
commit 7f081af2f75a9a55f35f9385e047bc5080907f2f
Author: Karl Williamson <[email protected]>
Date: Sun Dec 16 14:29:41 2012 -0700
XXX regcomp.c: Collapse switch() case
This combines one switch case with another, overriding a variable
setting is all that is needed to make these identical.
This commit introduces a global destruction warning, but it is unrelated
to it. It is because the
PL_XPosix_ptrs[classnum] = _swash_to_invlist(PL_utf8_swash_ptrs[classnum]);
M regcomp.c
commit ff31e96be70c549b3f50cbd572bedab0667c7b56
Author: Karl Williamson <[email protected]>
Date: Sat Dec 15 21:10:37 2012 -0700
regcomp.c: Expand single instance of macro
This small macro has only one call of it
M regcomp.c
commit 263cb665eaaaa197594fe84b3060bb27ea35298e
Author: Karl Williamson <[email protected]>
Date: Sat Dec 15 21:03:23 2012 -0700
regcomp.c: Collapse cases in a switch()
[:upper:] and [:lower:] have the same logic as some other cases in the
switch statement, but differ in that under /i they match more than just
themselves, and this has to be accounted for.
By moving the test for /i to outside the switch(), these cases can be
collapsed. There is a small performance penalty in having to test for
all classes if /i is active, and if so, if the class is one of these
two.
M regcomp.c
commit 776bfe12f790e054d07b33d3ae493ab48732161a
Author: Karl Williamson <[email protected]>
Date: Sat Dec 15 20:47:53 2012 -0700
regcomp.c: Use auto variables set to array elements
This permits slightly clearer reading of the code, and will be useful in
a future commit to allow further collapsing of cases int the switch()
M regcomp.c
commit b2dcb6eec5675d4f1b3416eb3ca8b8afe7278cfc
Author: Karl Williamson <[email protected]>
Date: Sat Dec 15 20:24:24 2012 -0700
regcomp.c: Collapse some switch() cases
Careful inspection of these 4 cases shows that each pair differs only in
one spot, which varies only a compile time, so a #ifdef can be used to
control that, and the cases can be collapsed. This results in an extra
test for those platforms that don't have isblank().
M regcomp.c
commit 6281046c0dae665240612e444135d31480b2a8ff
Author: Karl Williamson <[email protected]>
Date: Sat Dec 15 20:05:31 2012 -0700
regcomp.c: Move some code to later in block
These two code snippets are currently unrelated to anything else going
on in their respective blocks. A future commit, however, will want
things like this to happen after the 'posixes' variable has been
updated.
M regcomp.c
commit 94dd98631a9b695964711ae4d1b7158f985d2e33
Author: Karl Williamson <[email protected]>
Date: Sat Dec 15 19:28:20 2012 -0700
regcomp.c: Combine some cases in a switch()
These cases differ only in the operand. The logic is identical.
M regcomp.c
commit e779f31f6a9c779a17149d3d728c7d65a471d767
Author: Karl Williamson <[email protected]>
Date: Sat Dec 15 11:51:24 2012 -0700
regcomp.c: Replace macro call by goto
The macros are called with identical parameters. This avoids the extra
expansion of them.
M regcomp.c
commit a3d00bc74c5547b8d298e4213ece369f8a2fab19
Author: Karl Williamson <[email protected]>
Date: Sat Dec 15 11:32:48 2012 -0700
regcomp.c: Slight refactor of [[:blank:]]
The C library function isblank() is not available on every platform. A
Configure probe determines if it exists on the current platform. If so,
compiling it can be done just like all the similar ones. Only if
isblank() is not present does there need to be special handling.
This commit changes the cases of a switch statement so that if isblank()
is present, there is no special handling.
M regcomp.c
commit 6ea6f5358ec5ab774b5cf7434f01bce84d4d2a4f
Author: Karl Williamson <[email protected]>
Date: Sat Dec 15 10:46:10 2012 -0700
XXX remove swash
M regcomp.c
commit 19ffce8507d4eb0bc84413bbb312a945896e5cef
Author: Karl Williamson <[email protected]>
Date: Fri Dec 14 21:43:14 2012 -0700
l
M regcomp.c
commit b8a1ac90d6a96cb577aa73cb4ca560897b549c57
Author: Karl Williamson <[email protected]>
Date: Fri Dec 14 15:39:02 2012 -0700
regcomp.c: Move some cases in a switch around
This is so future commits can have a FALL THROUGH
M regcomp.c
commit 3ffe36278a5c0ce363a945d6505df09cb1a0368e
Author: Karl Williamson <[email protected]>
Date: Thu Dec 13 20:30:10 2012 -0700
regcomp.c: Collapse some switch casses
Previous commits have caused these cases in this switch to be identical,
so they can be collapsed.
M regcomp.c
commit cd00bfe1fc35a5c71ec6199ca5cf4cd344610cbe
Author: Karl Williamson <[email protected]>
Date: Thu Dec 13 10:39:53 2012 -0700
Use an array for some inversion lists
Previous commits have placed some inversion list pointers into arrays.
This commit extends that to another group of inversion lists
M embedvar.h
M intrpvar.h
M perl.c
M regcomp.c
M sv.c
commit 20f4cf9cb4d933d44a5045de96c5b5bb41d0dadc
Author: Karl Williamson <[email protected]>
Date: Thu Dec 13 09:09:17 2012 -0700
regcomp.c: Collapse two identical cases in a switch
M regcomp.c
commit 0a1e3458138b3662a1c51e4b0ebacf3bc809e06f
Author: Karl Williamson <[email protected]>
Date: Thu Dec 13 08:41:02 2012 -0700
regcomp.c: Use calculated value instead of hard-coded
After this commit, these two cases in the switch are identical, and can
be collapsed. This also reverses the sense of the 'if', to avoid a
negative, which is harder to read.
M regcomp.c
commit e6bdc42496298d7f7da6fcc8592e0704bafb026a
Author: Karl Williamson <[email protected]>
Date: Wed Dec 12 22:40:44 2012 -0700
regcomp.c: Collapse some switch cases
Previous commits have caused some of the cases in this switch to be
identical, so they can be collapsed.
M regcomp.c
commit f49004fd28b38a60d42ba4b7f5b53da1881cd0e5
Author: Karl Williamson <[email protected]>
Date: Wed Dec 12 22:08:39 2012 -0700
Use an array for some inversion lists
An earlier commit placed some inversion list pointers into an array.
This commit extends that to another group of inversion lists.
M embedvar.h
M intrpvar.h
M perl.c
M regcomp.c
M sv.c
commit e79309e1c311d61d8e583505b3da2ec355c4fc6f
Author: Karl Williamson <[email protected]>
Date: Wed Dec 12 21:23:03 2012 -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
M regcomp.c
commit aad478d8db84289e245136a9fa7f8ca733dbb06d
Author: Karl Williamson <[email protected]>
Date: Wed Dec 12 21:17:45 2012 -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.
M regcomp.c
commit 471582317ca77696d9cf48cd13b87cd9633f4e06
Author: Karl Williamson <[email protected]>
Date: Wed Dec 12 20:26:08 2012 -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.
M embedvar.h
M handy.h
M intrpvar.h
M perl.c
M regcomp.c
M sv.c
commit 8e977530fa571d0d69bf20cc87e6319a86ffea22
Author: Karl Williamson <[email protected]>
Date: Wed Dec 12 20:17:10 2012 -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.
M perl.c
commit 8f6eb44017d5b4b93773f36b2b8cdd96c1384599
Author: Karl Williamson <[email protected]>
Date: Wed Dec 12 19:06:47 2012 -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.
M handy.h
M regcomp.c
commit 2538fbf71b36e438daa993c0552e0edbad2fad1c
Author: Karl Williamson <[email protected]>
Date: Wed Dec 12 11:35:06 2012 -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, and this commit changes to use it.
M regcomp.c
commit d16f5e0c5e96ee7c9b9eafb3c0752712df0a021f
Author: Karl Williamson <[email protected]>
Date: Wed Dec 12 10:35:02 2012 -0700
handy.h: Move some back compat macros
Move them to the section that is for back-compat definitions.
M handy.h
commit 1b689167f59defa9e262a01bf52701ba8a596b01
Author: Karl Williamson <[email protected]>
Date: Wed Dec 12 09:17:50 2012 -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
M embed.fnc
M embed.h
M handy.h
M proto.h
M utf8.c
commit 90bb6d163fae375ffc6402332fdd0a21a4a4390f
Author: Karl Williamson <[email protected]>
Date: Tue Dec 11 20:47:25 2012 -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.)
M ext/XS-APItest/APItest.xs
M ext/XS-APItest/t/handy.t
M handy.h
M l1_char_class_tab.h
M pp_hot.c
M regcomp.c
M regcomp.h
M regen/mk_PL_charclass.pl
M regexec.c
M toke.c
M utf8.c
M x2p/walk.c
commit 4daade4ed8afdb2be924095f6de2c7597be3e201
Author: Karl Williamson <[email protected]>
Date: Tue Dec 11 20:43:59 2012 -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
M handy.h
commit 07993de9e8b5b02e8d2fdb149a157942965960e1
Author: Karl Williamson <[email protected]>
Date: Tue Dec 11 13:05:04 2012 -0700
intrpvar.h: Place some swash pointers in an array
M embedvar.h
M handy.h
M intrpvar.h
M sv.c
commit 1fda362752ca70c756106ac139a5d3fb7c355feb
Author: Karl Williamson <[email protected]>
Date: Tue Dec 11 20:35:16 2012 -0700
intrpvar.h: #include handy.h
This will allow some mnemonics to be used in future commits
M intrpvar.h
commit 751776df5a587d286f7de6119c0f2092ef4f83ec
Author: Karl Williamson <[email protected]>
Date: Tue Dec 11 20:34:31 2012 -0700
handy.h: Guard against recursive #inclusion
M handy.h
commit b53f4893e1cdbcde4f459ef5aebbd3828e6e818f
Author: Karl Williamson <[email protected]>
Date: Tue Dec 11 12:06:47 2012 -0700
regcomp.c: White-space, comment only
M regcomp.c
-----------------------------------------------------------------------
--
Perl5 Master Repository