LibRegex: Apply atomic loop rewrite in one more case

This commit makes LibRegex's atomic loop rewrite opt also accept cases
where the follow block jumps to the end of the forking block
(which is essentially a loop without a proper header in fancy clothes)

This makes patterns like /([^x]*)x/ where the loop is not _immediately_
followed by a block significantly faster.
This commit is contained in:
Ali Mohammad Pur
2024-10-24 21:59:15 +02:00
committed by Andreas Kling
parent 0de403fede
commit 1b127ac082
3 changed files with 115 additions and 18 deletions

View File

@@ -95,7 +95,7 @@ StringView character_compare_type_name(CharacterCompareType ch_compare_type)
}
}
static StringView character_class_name(CharClass ch_class)
StringView character_class_name(CharClass ch_class)
{
switch (ch_class) {
#define __ENUMERATE_CHARACTER_CLASS(x) \