PERL_ARGS_ASSERT_SSC_ANYTHING;
ANYOF_BITMAP_SETALL(ssc);
- ssc->flags = ANYOF_UNICODE_ALL;
+ ssc->flags = ANYOF_ABOVE_LATIN1_ALL;
SET_SSC_EOS(ssc);
/* If any portion of the regex is to operate under locale rules,
for (value = 0; value < ANYOF_POSIXL_MAX; value += 2)
if (ANYOF_POSIXL_TEST(ssc, value) && ANYOF_POSIXL_TEST(ssc, value + 1))
return 1;
- if (!(ssc->flags & ANYOF_UNICODE_ALL))
+ if (!(ssc->flags & ANYOF_ABOVE_LATIN1_ALL))
return 0;
if (!ANYOF_BITMAP_TESTALLSET((const void*)ssc))
return 0;
/* The inversion of these two flags indicate that the resulting
* intersection doesn't have them */
- if (and_with->flags & ANYOF_UNICODE_ALL) {
- ssc->flags &= ~ANYOF_UNICODE_ALL;
+ if (and_with->flags & ANYOF_ABOVE_LATIN1_ALL) {
+ ssc->flags &= ~ANYOF_ABOVE_LATIN1_ALL;
}
if (and_with->flags & ANYOF_NON_UTF8_LATIN1_ALL) {
ssc->flags &= ~ANYOF_NON_UTF8_LATIN1_ALL;
if (! ANYOF_NONBITMAP(and_with)) {
/* Here 'and_with' doesn't match anything outside the bitmap
- * (except possibly ANYOF_UNICODE_ALL), which means the
- * intersection can't either, except for ANYOF_UNICODE_ALL, in
+ * (except possibly ANYOF_ABOVE_LATIN1_ALL), which means the
+ * intersection can't either, except for ANYOF_ABOVE_LATIN1_ALL, in
* which case we don't know what the intersection is, but it's no
* greater than what ssc already has, so can just leave it alone,
* with possible false positives */
- if (! (and_with->flags & ANYOF_UNICODE_ALL)) {
+ if (! (and_with->flags & ANYOF_ABOVE_LATIN1_ALL)) {
ARG_SET(ssc, ANYOF_NONBITMAP_EMPTY);
ssc->flags &= ~ANYOF_NONBITMAP_NON_UTF8;
}
* match anything outside the bitmap (since the 'if' that got us
* into this block tested for that), so we leave the bitmap empty.
*/
- if (ssc->flags & ANYOF_UNICODE_ALL) {
+ if (ssc->flags & ANYOF_ABOVE_LATIN1_ALL) {
ARG_SET(ssc, ARG(and_with));
/* and_with's ARG may match things that don't require UTF8.
ssc->flags |= or_with->flags & INVERSION_UNAFFECTED_FLAGS;
/* For the remaining flags:
- ANYOF_UNICODE_ALL and inverted means to not match anything above
+ ANYOF_ABOVE_LATIN1_ALL and inverted means to not match anything above
255, which means that the union with ssc should just be
what ssc has in it, so can ignore this flag
ANYOF_NON_UTF8_LATIN1_ALL and inverted means if not utf8 and ord
ssc_anything(pRExC_state, ssc);
}
else {
- ssc->flags |= ANYOF_UNICODE_ALL;
+ ssc->flags |= ANYOF_ABOVE_LATIN1_ALL;
}
}
}
}
CLEAR_SSC_EOS(data->start_class);
if (uc < 0x100)
- data->start_class->flags &= ~ANYOF_UNICODE_ALL;
+ data->start_class->flags &= ~ANYOF_ABOVE_LATIN1_ALL;
}
else if (flags & SCF_DO_STCLASS_OR) {
/* false positive possible if the class is case-folded */
if (uc < 0x100)
ANYOF_BITMAP_SET(data->start_class, uc);
else
- data->start_class->flags |= ANYOF_UNICODE_ALL;
+ data->start_class->flags |= ANYOF_ABOVE_LATIN1_ALL;
CLEAR_SSC_EOS(data->start_class);
ssc_and(pRExC_state, data->start_class, and_withp);
}
int i;
if (end == UV_MAX && start <= 256) {
- ANYOF_FLAGS(node) |= ANYOF_UNICODE_ALL;
+ ANYOF_FLAGS(node) |= ANYOF_ABOVE_LATIN1_ALL;
}
/* Quit if are above what we should change */
if (change_invlist) {
_invlist_subtract(*invlist_ptr, PL_Latin1, invlist_ptr);
}
- if (ANYOF_FLAGS(node) & ANYOF_UNICODE_ALL) {
+ if (ANYOF_FLAGS(node) & ANYOF_ABOVE_LATIN1_ALL) {
_invlist_intersection(*invlist_ptr, PL_Latin1, invlist_ptr);
}
}
/* output information about the unicode matching */
- if (flags & ANYOF_UNICODE_ALL)
+ if (flags & ANYOF_ABOVE_LATIN1_ALL)
sv_catpvs(sv, "{unicode_all}");
else if (ANYOF_NONBITMAP(o)) {
SV *lv; /* Set if there is something outside the bit map. */
/* Flags for node->flags of ANYOF. These are in short supply, but there is one
* currently available. If more than this are needed, the ANYOF_LOCALE and
* ANYOF_POSIXL bits could be shared, making a space penalty for all locale nodes.
- * Also, the UNICODE_ALL bit could be freed up by resorting to creating a swash
- * containing everything above 255. This introduces a performance penalty.
- * Better would be to split it off into a separate node, which actually would
- * improve performance a bit by allowing regexec.c to test for a UTF-8
- * character being above 255 without having to call a function nor calculate
- * its code point value. However, this solution might need to have a second
- * node type, ANYOF_SYNTHETIC_ABOVE_LATIN1_ALL */
+ * Also, the ABOVE_LATIN1_ALL bit could be freed up by resorting to creating a
+ * swash containing everything above 255. This introduces a performance
+ * penalty. Better would be to split it off into a separate node, which
+ * actually would improve performance a bit by allowing regexec.c to test for a
+ * UTF-8 character being above 255 without having to call a function nor
+ * calculate its code point value. However, this solution might need to have a
+ * second node type, ANYOF_SYNTHETIC_ABOVE_LATIN1_ALL */
#define ANYOF_LOCALE 0x01 /* /l modifier */
#define ANYOF_NONBITMAP_NON_UTF8 0x20
/* Matches every code point 0x100 and above*/
-#define ANYOF_UNICODE_ALL 0x40
+#define ANYOF_ABOVE_LATIN1_ALL 0x40
+#define ANYOF_UNICODE_ALL ANYOF_ABOVE_LATIN1_ALL
/* Match all Latin1 characters that aren't ASCII when the target string is not
* in utf8. */
/* These are the flags that ANYOF_INVERT being set or not doesn't affect
* whether they are operative or not. e.g., the node still has LOCALE
- * regardless of being inverted; whereas ANYOF_UNICODE_ALL means something
+ * regardless of being inverted; whereas ANYOF_ABOVE_LATIN1_ALL means something
* different if inverted */
#define INVERSION_UNAFFECTED_FLAGS (ANYOF_LOCALE \
|ANYOF_LOC_FOLD \