Bug 39795

Summary: Add support for YARR JIT generation of greedy quantified parens at the end of the main disjunction.
Product: WebKit Reporter: Gavin Barraclough <barraclough>
Component: JavaScriptCoreAssignee: Gavin Barraclough <barraclough>
Status: RESOLVED FIXED    
Severity: Normal    
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: OS X 10.5   
Attachments:
Description Flags
The patch oliver: review+

Gavin Barraclough
Reported 2010-05-26 15:41:10 PDT
If the last item in a main disjunction is a quantified set of parentheses, this is easier to code generate for than the general case for quantified parentheses. This is because we never need to backtrack into the parentheses - the first match will be the final and accepted match. This patch also somewhat reverts a recent change to when fallback to PCRE occurs. At the minute the compiler is tracking on patterns which will require JIT fallback. This is handy from a performance perspective (it saves the failed attempt at JIT compilation), but it means introducing knowledge of the JITs capabilities into the other layers of the regex compilers. For the specific feature of back-references, add a flag tracking their presence on the pattern, and make these expressions fallback without attempting to JIT. For parentheses, return to detecting which cases are have or have not been handled during JIT compilation.
Attachments
The patch (10.36 KB, patch)
2010-05-26 15:44 PDT, Gavin Barraclough
oliver: review+
Gavin Barraclough
Comment 1 2010-05-26 15:44:20 PDT
Created attachment 57175 [details] The patch
Oliver Hunt
Comment 2 2010-05-26 15:46:59 PDT
Comment on attachment 57175 [details] The patch r=me
Gavin Barraclough
Comment 3 2010-05-26 20:44:51 PDT
commited r60267
Note You need to log in before you can comment on or make changes to this bug.