From 5f5c35d3ce139755d02fa07de26229cd08d3c8cd Mon Sep 17 00:00:00 2001 From: Yves Orton Date: Mon, 6 Feb 2023 11:03:06 +0100 Subject: regcomp.c - remove (**{ ... }) from the regex engine Dave M pointed out that this idea was flawed, and after some testing I have come to agree with him. This removes it. It was only available for 5.37.8, so no deprecation cycle involved. The point of (**{ ... }) was to have a postponed eval that does not disable optimizations. But some of the optimizations are disabled because if they are not we do not match correctly as the optimizations will make unwarranted assumptions about the pattern, assumptions which can be incorrect depending on what pattern is returned from the codeblock. The original idea was proposed because (?{ ... }) was treated as though it was (??{ ... }) and disabled many optimizations, when in fact it doesn't interact with optimizations at all. When I added (*{ ... }) as the optimistic version of (?{ ... }) I used "completeness" as the justification for also adding (**{ ... }) when it does not make sense to do so. --- regcomp.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'regcomp.c') diff --git a/regcomp.c b/regcomp.c index 82d89b6161..7eebcaca95 100644 --- a/regcomp.c +++ b/regcomp.c @@ -3008,15 +3008,10 @@ S_reg(pTHX_ RExC_state_t *pRExC_state, I32 paren, I32 *flagp, U32 depth) goto parse_rest; } else if ( *RExC_parse == '*') { /* (*VERB:ARG), (*construct:...) */ - if (RExC_parse[1] == '{') { + if (RExC_parse[1] == '{') { /* (*{ ... }) optimistic EVAL */ fake_eval = '{'; goto handle_qmark; } - else - if ( RExC_parse[1] == '*' && RExC_parse[2] == '{' ) { - fake_eval = '?'; - goto handle_qmark; - } char *start_verb = RExC_parse + 1; STRLEN verb_len; -- cgit v1.2.1