RESOLVED FIXED 49385
Reduce the size of the RegexStackSpaceForBackTrackInfoParentheses in YARR
https://bugs.webkit.org/show_bug.cgi?id=49385
Summary Reduce the size of the RegexStackSpaceForBackTrackInfoParentheses in YARR
Peter Varga
Reported 2010-11-11 08:03:26 PST
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.
Attachments
proposed patch (3.48 KB, patch)
2010-11-11 08:06 PST, Peter Varga
no flags
Peter Varga
Comment 1 2010-11-11 08:06:42 PST
Created attachment 73615 [details] proposed patch
Eric Seidel (no email)
Comment 2 2010-12-09 23:44:00 PST
This is a patch for gbarra. :)
Gavin Barraclough
Comment 3 2010-12-10 19:22:31 PST
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.
WebKit Commit Bot
Comment 4 2010-12-10 19:33:53 PST
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
Andras Becsi
Comment 5 2010-12-13 04:57:52 PST
Andras Becsi
Comment 6 2010-12-13 04:58:25 PST
Comment on attachment 73615 [details] proposed patch Clearing flags.
Note You need to log in before you can comment on or make changes to this bug.