for example: /(|a)/.exec("a"); should return ["",""], but instead returns ["a","a"]. This was broken by https://bugs.webkit.org/show_bug.cgi?id=51395, which will be reverted (this unsafe optimization does not appear significant to any benchmarks we are tracking, we should reimplement in a more restricted, safe fashion only if we can demonstrate an important workload benefitting from doing so).
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")
Fixed in r86547.
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.