| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
| |
We had a field report of lack of clarity around this, so add some
text.
|
|
|
|
|
|
| |
If the version of Unicode being compiled doesn't have the modern
casefolding .txt file, get the values from Unicode::UCD. Also for
EBCDIC, where otherwise the file would have to be translated.
|
| |
|
|
|
|
| |
I’m running out of synonyms for ‘remove’.
|
|
|
|
|
|
| |
See the previous commit. The same applies here.
In short, this allows core_prototype and pp_coreargs to be simpler.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In regen/opcodes, we have some operators that use ck_fun and have R
for the argument. And there are some that use ck_lfun and have S for
the argument.
These both amount to more or less the same thing.
ck_fun/R goes through the OA_SCALARREF case in ck_fun, which calls
op_lvalue(scalar()) on the child op.
ck_lfun/S goes through the OA_SCALAR case in ck_fun, which calls
scalar(), and then ck_lfun sees to it that op_lvalue is called.
The only real difference is that the OA_SCALAR case makes sure there
are not too many arguments.
Since both core_prototype and pp_coreargs need special cases to deal
with OA_SCALAR that is really ‘supposed’ to be OA_SCALARREF, it
becomes simpler to add &CORE::undef if undef uses R. In that case,
we also have to put the argument-checking in the OA_SCALARREF, but we
make it conditional on the op being an undef op, for the sake of doing
one thing at a time. (This is a bit of a mess; see ticket #96006.)
|
|
|
|
| |
This is instead of silently returning nothing.
|
|
|
|
|
|
|
|
|
|
|
|
| |
The new definition is likely slightly faster, as it replaces an array
lookup with a mask.
Comments are also added, listing the other possible candidates for this
treatment, though the speed differential is unclear as they would also
add an extra test.
A U32 is used to store the information about the various properties for
a character. This frees up one bit of that for future other use.
|
|
|
|
|
|
| |
Now that these are partially compiled into the Perl core, we have a
chicken and egg problem if one changes. Instead, use the \p{}
equivalent which doesn't have this problem.
|
|
|
|
|
|
|
|
|
| |
How ironic! Overloading is called ‘A’ magic internally all over the
place, because of the letter used as its magic type. But now it does
not even use that magic.
I left a comment in mg_vtable.pl, so that future maintainers will have
some clue as to what AMAGIC means.
|
|
|
|
|
|
| |
Since the 5.18 feature bundle should be added long before 5.18, to
avoid last-minute blunders, and since it’s easy to forget to do it in
advance, have feature.pl do it automatically.
|
|
|
|
|
| |
Otherwise cv_set_call_checker has no effect inside an attribute han-
dler for a closure.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This goes all the way back to when perl 5.0 was being polished up.
The idea behind evalonce is that eval "constant string" should be
optimisable by being compiled ahead of time, just like eval { ... }.
But this could never work properly, because BEGIN blocks would only
fire once. Also, eval '$x .. $y' is an easy way to create two separ-
ate flip-flops. There are undoubtedly many other reasons why this
could never work.
So there is no reason to keep this comment any longer, as it is not
(or should not be) a to-do item.
|
| |
|
| |
|
|
|
|
|
| |
current_bundle() was added after 5.14.0 was released, so has never been in
a stable release. Hence it's totally safe to kill it.
|
|
|
|
|
| |
normalise_hints() was added after 5.14.0 was released, so has never been in
a stable release. Hence it's totally safe to kill it.
|
| |
|
|
|
|
|
|
|
|
|
| |
There were a couple of inconsistencies (shift with/without an explicit @_,
exists with/without(), !@_ vs @_ == 0) which turn out to date back to
before 5.10.0
Also fix an inadvertent use of a single element array slice with a simple
array lookup in current_bundle().
|
|
|
|
|
|
|
|
|
|
|
|
| |
This was an off-by-one error caused by my failing to realize that things
had to be done differently at the 255/256 boundary depending on whether
U+00FF matched or did not match the property.
Two properties were affected, [:upper:] and [:punct:]. The bug was that
all code points above the first one > 255 that legitimately matches the
property will match whether or not they should. In the case of
[:upper:], this meant that effectively anything from 256..infinity
matched. For [:punct:], it was anything above U+037D.
|
|
|
|
|
|
|
|
|
| |
‘Normalise’ in this case means to set $^H to indicate that features
are in %^H (FEATURE_BUNDLE_CUSTOM) and to make %^H contain the current
feature set.
Since ‘no feature’ sets the default feature bundle in $^H, this is
unnecessary in that case.
|
| |
|
|
|
|
|
|
|
|
|
| |
See https://rt.perl.org/rt3/Ticket/Display.html?id=108776
"no feature" now resets to the default feature set. To disable all
features (which is likely to be a pretty special-purpose request, since
it presumably won't match any named set of semantics) you can now
write "no feature ':all'"
|
|
|
|
|
|
|
|
|
|
| |
As described in the pod changes in this commit, this changes quotemeta()
to consistenly quote non-ASCII characters when used under
unicode_strings. The behavior is changed for these and UTF-8 encoded
strings to more closely align with Unicode's recommendations.
The end result is that we *could* at some future point start using other
characters as metacharacters than the 12 we do now.
|
|
|
|
|
| |
This changes this header to include a bit for each character indicating
if it should be quoted by quotemeta under unicode_strings
|
|
|
|
|
|
| |
Same for [[:upper:]] and \p{Upper}. These were matching instead all of
[[:alpha:]] or \p{Alpha}. What /\p{Lower}/i and /\p{Upper}/i match instead
is \p{Cased}, and so that is what these should match.
|
|
|
|
|
| |
\h and \p{XPosixBlank} contain the same code points, so there is no need
to have both of them.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
These will be used in regcomp.c to replace the existing bit-wise
handling of these, enabling subsequent optimizations.
These are compiled-in, and hence affect the memory footprint of every
program, including those that don't use Unicode. The lists that aren't
tiny are therefore currently restricted to only the Latin1 range;
anything needed beyond that will have to be read in at execution time,
just as before.
The design allows for easy conversion from Latin1 to use the full
Unicode range, should it be deemed desirable for some or all of these.
|
|
|
|
|
|
|
| |
This will be used to generate compile-time inversion lists in a C hdr
file that can be included in programs for initialization speed
Three simple inversion lists are included in this initial commit
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Along with the simple_casefolding and full_casefolding features.
fc() stands for foldcase, a sort of pseudo case (like lowercase),
which is used to implement Unicode casefolding. It maps a string
to a form where all case differences are erased, so it's a
locale-independent way of checking if two strings are the same,
regardless of case.
This functionality was, and still is, available through the
regular expression engine -- /i matches would use casefolding
internally. The fc keyword merely exposes this for easier access.
Previously, one could attempt to case-insensitively test two strings
for equality by doing
lc($a) eq lc($b)
But that might get you wrong results, for example in the case of
\x{DF}, LATIN SMALL LETTER SHARP S.
|
|
|
|
| |
It doesn't do anything yet.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Otherwise CURRENT_FEATURE_BUNDLE will end up including any hints added
later that happen to use higher bits.
This was causing autobox to turn off all features, causing failures
for Dist::Zilla::PluginBundle::AVAR.
I’m not adding tests for this, as such tests would need constant
tweaking in future perl developement. What autobox is doing is
naughty and unsupported anyway.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Various magical modules copy hints from one scope to another. But
copying ${^WARNING_BITS} doesn’t always copy the same hints. If lexi-
cal warnings are not on at all, ${^WARNING_BITS} returns a different
value depending on the current value of $^W. Setting ${^WARNING_BITS}
to its own value when $^W is true will stop $^W from being able to
control the warnings in the current compilation scope. Setting
${^WARNING_BITS} to its own value when $^W is false causes even
default warnings to be suppressed.
This commit makes undef a special value that represents the default
state, in which $^W controls warnings.
|
|
|
|
|
|
|
| |
Sync copyright dates with actual changes according to git history.
[Plus run regen_perly.h to update the SHA-256 checksums, and
regen/regcharclass.pl to update regcharclass.h]
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
regen/mg_vtable.pl was modified a while ago to generate the table
for copying and pasting, but at least twice since then it has not
been updated properly; once by me and once by the author of that
part of regen/mg_vtable.pl.
|
|
|
|
|
|
|
|
|
| |
Or potential lvalue context, like function calls.
The %n format code’s existence renders these two very much like func-
tion calls, as they can modify their arguments.
This allows sprintf("...%n", substr ...) to work.
|
|
|
|
|
|
| |
Since feature.pm is now a generated file, there is no reason to hard-
code constants from perl.h into it. We can get them from perl.h auto-
matically.
|
|
|
|
|
|
| |
Since the regen scripts use the system perl, I thought I might as
well test regen/feature.pl with 5.6.2, the earliest I have installed.
It failed.
|
|
|
|
|
|
|
|
|
| |
When a version declaration has been seen, it’s not possible to deparse
the code perfectly correctly, but using ‘no feature; use feature
"5.14"’ is a reasonable tradeoff. See also commit 1c74777c25.
This necessitated sorting %^H keys that are output to keep tests pass-
ing. Previously they were relying on phases of the moon.
|
| |
|
|
|
|
|
| |
In case #define is changed to # define some day. (Not likely, but
this will make things easier for future maintainers.)
|
| |
|
|
|
|
|
| |
unicode_strings was not the longest string. We can determine it auto-
matically, now that this macro is in a generated file.
|
| |
|