[Webkit-unassigned] [Bug 122891] Yarr does not compile Peacekeeper email validation regex

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Oct 16 10:53:23 PDT 2013


https://bugs.webkit.org/show_bug.cgi?id=122891





--- Comment #2 from Gavin Barraclough <barraclough at apple.com>  2013-10-16 10:52:09 PST ---
Yarr JIT now compiles regular expressions twice, in one of two mode – 'match-only', and 'include-subpatterns'.

Match-only is used for when the regexp is first run, to scan for the match, at which point we return a boolean result (in the case of 'test' matches), or returned as a lazily populated regexp matches array object.

Include-subpattens is used when an subpatten match is explicitly required, for example if an entry in the matches array is accessed.

The restriction referenced in the comment is that the JIT won't backtrack sub pattern matches, so we can't compile quantified captures unless we can guarantee they won't backtrack.  But this restriction doesn't apply for match-only compilations, which aren't recording the matched sub patterns anyway.

We can probably pretty much say, if (compileMode == MatchOnly) then we can compile any parens.  We'd have to look a little more closely to check whether any of the restrictions still need to apply.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the webkit-unassigned mailing list