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.