Summary: | Evaluation order broken for empty alternatives in subpatterns | ||
---|---|---|---|
Product: | WebKit | Reporter: | Gavin Barraclough <barraclough> |
Component: | JavaScriptCore | Assignee: | Gavin Barraclough <barraclough> |
Status: | RESOLVED FIXED | ||
Severity: | Normal | CC: | ggaren, pvarga, zherczeg |
Priority: | P2 | ||
Version: | 528+ (Nightly build) | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Bug Depends on: | 60860 | ||
Bug Blocks: |
Description
Gavin Barraclough
2011-05-15 19:28:57 PDT
This unsafe optimization is masking further problems in the JIT, reverting the optimization causes failures in fast/regex/parentheses. These issues are fixed by 60860. rs=me to roll out that optimization with a layout test for /(|a)/.exec("a") /(a|)/.exec("b") Perhaps a non-greedy conversion? (|a) == a?? (a|) == a? Conversion to an appropriately greedy quantifier would be possible, but would limit the scope of this optimization. We would consider such a patch if it were to provide a useful performance gain on an interesting workload. |