Bug 67455 - Different regular expression result
Reviewed by Darin Adler.
Fix a regression introduced in r72140. A return was added to the backtracking loop for
backtrackParentheses with QuantifierNonGreedy, so it always returns after one iteration.
This is incorrect. The additional return should only trigger to force an early return if
an error has occured.
Source/JavaScriptCore:
* yarr/YarrInterpreter.cpp:
(JSC::Yarr::Interpreter::matchParentheses):
- Simplify some nested if else logic.
(JSC::Yarr::Interpreter::backtrackParentheses):
- Simplify some nested if else logic.
- Only return early from backtrackParentheses on success/error, not on failure.
LayoutTests:
* fast/regex/parentheses-expected.txt:
* fast/regex/script-tests/parentheses.js:
- Added test cases from bug.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@96479
268f45cc-cd09-0410-ab3c-
d52691b4dbfc