summaryrefslogtreecommitdiff
path: root/regnodes.h
diff options
context:
space:
mode:
Diffstat (limited to 'regnodes.h')
-rw-r--r--regnodes.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/regnodes.h b/regnodes.h
index 3e5723d1ee..2719b8219a 100644
--- a/regnodes.h
+++ b/regnodes.h
@@ -1753,4 +1753,18 @@ EXTCONST U8 PL_simple_bitmask[] = {
};
#endif /* DOINIT */
+/* Is 'op', known to be of type EXACT, folding? */
+#define isEXACTFish(op) (__ASSERT_(PL_regkind[op] == EXACT) (PL_EXACTFish_bitmask & (1U << (op - EXACT))))
+
+/* Do only UTF-8 target strings match 'op', known to be of type EXACT? */
+#define isEXACT_REQ8(op) (__ASSERT_(PL_regkind[op] == EXACT) (PL_EXACT_REQ8_bitmask & (1U << (op - EXACT))))
+
+#ifndef DOINIT
+EXTCONST U32 PL_EXACTFish_bitmask;
+EXTCONST U32 PL_EXACT_REQ8_bitmask;
+#else
+EXTCONST U32 PL_EXACTFish_bitmask = 0x33F8;
+EXTCONST U32 PL_EXACT_REQ8_bitmask = 0x1E00;
+#endif /* DOINIT */
+
/* ex: set ro: */