Comment 30 for bug 908508

Revision history for this message
In , Landry-openbsd (landry-openbsd) wrote :

(In reply to Chris Leary [:cdleary] from comment #19)
> (In reply to Landry Breuil from comment #18)
> > Another annoyance was the landing of bug #673188, which right now #errors
> > out if ENABLE_YARR_JIT is unset (see RegExpObject.cpp, function
> > checkSyntax()), pretty unfriendly. So far i've replaced it by a return true,
> > but it's of course ugly.
>
> It's required for lazy regular expression compilation -- you have to detect
> errors in the syntax immediately for error reporting purposes. Continuing to
> use the YARR parser to report errors when you're using the PCRE backend
> could result in a mismatch where the PCRE parser believes there to be an
> error in the pattern that YARR did not detect, which would result in
> incorrect semantics (because you have no way of reporting the error when
> you're doing the lazy compilation).
>
> Sorry, I should have put a comment in if I didn't!

The patch we're working on aims to replace PCRE interpreter by YARR interpreter.. if i get it right, we wouldn't use the PCRE parser anymore, so there would be no mismatch ? Of course, i don't see how to do syntax checking with YARR interpreter without YARR JIT, as JSC::Yarr::checkSyntax() isn't defined when !ENABLE_YARR_JIT. Help appreciated...