The BackTrackInfoParentheses struct in YARR Interpreter stores two members (prevBegin, prevEnd) which are unnecessary for the current matching logic. These are storing the last successful match of a parentheses. The result of match is restored from these members in case of backtrack but this isn't needed because the recordParenthesesMatch() or the resetMatches() function updates the result of match in every case. NOTE: This modification is needed just in the Interpreter because the JIT doesn't store backtrack information of iterative parentheses for the time being.
Created attachment 73615 [details] proposed patch
This is a patch for gbarra. :)
Comment on attachment 73615 [details] proposed patch Hmmm, think I added these at an early state of development, thinking PCRE's behaviour of coalescing results across repeated iterations of karen matching was correct (ie. /(?:(a)|(b))/.exec(ab) as ["ab", "a", "b"], rather than ["ab", , "b"]). Anyway, good catch, yes, these look like garbage now.
Comment on attachment 73615 [details] proposed patch Rejecting attachment 73615 [details] from commit-queue. Failed to run "['./WebKitTools/Scripts/webkit-patch', '--status-host=queues.webkit.org', '--bot-id=eseidel-cq-sl', 'apply-attachment', '--non-interactive', 73615]" exit_code: 2 Last 500 characters of output: d at 1 with fuzz 3. patching file JavaScriptCore/yarr/RegexInterpreter.cpp Hunk #1 succeeded at 68 (offset 2 lines). Hunk #2 succeeded at 839 (offset 71 lines). Hunk #3 succeeded at 920 (offset 82 lines). patching file JavaScriptCore/yarr/RegexPattern.h Hunk #1 FAILED at 41. 1 out of 1 hunk FAILED -- saving rejects to file JavaScriptCore/yarr/RegexPattern.h.rej Failed to run "[u'/Projects/CommitQueue/WebKitTools/Scripts/svn-apply', u'--reviewer', u'Gavin Barraclough', u'--force']" exit_code: 1 Full output: http://queues.webkit.org/results/6899047
Updated patch landed in http://trac.webkit.org/changeset/73903.
Comment on attachment 73615 [details] proposed patch Clearing flags.