summaryrefslogtreecommitdiff
path: root/pod/perlreguts.pod
diff options
context:
space:
mode:
authorYves Orton <demerphq@gmail.com>2022-07-30 19:42:08 +0200
committerYves Orton <demerphq@gmail.com>2022-08-03 11:07:09 +0200
commit1db310d0443729d6e2d04e8cb339e9b79089b2ad (patch)
tree482a70f14d8228493f32842c63c2890cf44c2e3f /pod/perlreguts.pod
parent19a5f8d316d541b9a9adb54c5a918787760100e1 (diff)
downloadperl-1db310d0443729d6e2d04e8cb339e9b79089b2ad.tar.gz
regex engine - integrate regnode_after() support for EXACTish nodes
This adds REGNODE_AFTER_varies() which is used when the called *knows* that the current regnode is variable length. We then use it to handle EXACTish style nodes as determined by PL_regnode_arg_len_varies. As part of this patch Perl_regnext() Perl_regnode_after() and Perl_check_regnode_after() are moved to reginline.h, which is loaded via regcomp.c only when we are compiling the regex engine.
Diffstat (limited to 'pod/perlreguts.pod')
-rw-r--r--pod/perlreguts.pod12
1 files changed, 6 insertions, 6 deletions
diff --git a/pod/perlreguts.pod b/pod/perlreguts.pod
index 3cc9e7f7ff..3b73d14355 100644
--- a/pod/perlreguts.pod
+++ b/pod/perlreguts.pod
@@ -239,12 +239,12 @@ select regnode types in the execution phase. It is also heavily used in
the code for dumping the regexp program for debugging.
There are a selection of macros which can be used to compute this as
-efficiently as possible depending on the circumstances, for instance if
-the code is dedicated to handling a specific type of regnode you can use
-C<REGNODE_AFTER_type()> to produce the most efficient code. If you have
-already extracted the nodes opcode then you can use
-C<REGNODE_AFTER_opcode()>, and if you just have a pointer to a regnode you
-can use C<REGNODE_AFTER_dynamic()>.
+efficiently as possible depending on the circumstances. The canonical
+macro is C<REGNODE_AFTER()>, which is the most powerful and should handle
+any case we have, but is also potentially the slowest. There are two
+additional macros for the special case that you KNOW the current regnode
+size is constant, and you know its type or opcode. In which case you can
+use C<REGNODE_AFTER_opcode()> or C<REGNODE_AFTER_type()>.
In older versions of the regex engine C<REGNODE_AFTER()> was called
C<NEXTOPER> but this was found to be confusing and it was renamed. There