Files
ladybird/Libraries/LibRegex
Andreas Kling e4008393d3 LibRegex: Extract broader required-literal prefilters
Analyze parsed patterns for literal substrings that every match
must contain and feed the longest one into the existing
required-literal hint. This lets the VM reject obvious misses
for optional-prefix extractors, literal-prefix parsers, and
common-substring alternations without adding more shape-specific
fast paths.

Use ASCII case-insensitive probes when the required literal comes
from a legacy `/i` pattern, and skip modifier groups that change
ignore-case so the hint does not over-constrain scoped flag
behavior. Keep the analysis within the same 64-code-unit budget
that the VM hint already uses so large fixed quantifiers and long
literal alternations do not blow up compile time.

Add TestRegex coverage for assignment extractors, ASCII ignore-
case prefilters, common-substring alternations, and the compile-
time regression shapes. TestRegex passes, the long-pattern js
probes behave correctly, and regex benchmark spot checks stay
fast.
2026-03-29 16:06:57 +02:00
..