Commit c9c81959 authored by abecsi@webkit.org's avatar abecsi@webkit.org

2010-12-13 Peter Varga <pvarga@inf.u-szeged.hu>

        Reviewed by Gavin Barraclough.

        Reduce the size of the RegexStackSpaceForBackTrackInfoParentheses in YARR
        https://bugs.webkit.org/show_bug.cgi?id=49385

        Remove the BackTrackInfoParentheses struct prevBegin and prevEnd members.

        * yarr/RegexInterpreter.cpp:
        (JSC::Yarr::Interpreter::matchParentheses):
        (JSC::Yarr::Interpreter::backtrackParentheses):
        * yarr/RegexPattern.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@73903 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 594da2e1
2010-12-13 Peter Varga <pvarga@inf.u-szeged.hu>
Reviewed by Gavin Barraclough.
Reduce the size of the RegexStackSpaceForBackTrackInfoParentheses in YARR
https://bugs.webkit.org/show_bug.cgi?id=49385
Remove the BackTrackInfoParentheses struct prevBegin and prevEnd members.
* yarr/RegexInterpreter.cpp:
(JSC::Yarr::Interpreter::matchParentheses):
(JSC::Yarr::Interpreter::backtrackParentheses):
* yarr/RegexPattern.h:
2010-12-10 Michael Saboff <msaboff@apple.com>
Reviewed by Gavin Barraclough.
......
......@@ -68,8 +68,6 @@ public:
struct BackTrackInfoParentheses {
uintptr_t matchAmount;
ParenthesesDisjunctionContext* lastContext;
uintptr_t prevBegin;
uintptr_t prevEnd;
};
static inline void appendParenthesesDisjunctionContext(BackTrackInfoParentheses* backTrack, ParenthesesDisjunctionContext* context)
......@@ -841,13 +839,8 @@ public:
ASSERT(term.type == ByteTerm::TypeParenthesesSubpattern);
BackTrackInfoParentheses* backTrack = reinterpret_cast<BackTrackInfoParentheses*>(context->frame + term.frameLocation);
unsigned subpatternId = term.atom.subpatternId;
ByteDisjunction* disjunctionBody = term.atom.parenthesesDisjunction;
backTrack->prevBegin = output[(subpatternId << 1)];
backTrack->prevEnd = output[(subpatternId << 1) + 1];
backTrack->matchAmount = 0;
backTrack->lastContext = 0;
......@@ -927,13 +920,6 @@ public:
ASSERT(term.type == ByteTerm::TypeParenthesesSubpattern);
BackTrackInfoParentheses* backTrack = reinterpret_cast<BackTrackInfoParentheses*>(context->frame + term.frameLocation);
if (term.capture()) {
unsigned subpatternId = term.atom.subpatternId;
output[(subpatternId << 1)] = backTrack->prevBegin;
output[(subpatternId << 1) + 1] = backTrack->prevEnd;
}
ByteDisjunction* disjunctionBody = term.atom.parenthesesDisjunction;
switch (term.atom.quantityType) {
......
......@@ -39,7 +39,7 @@ namespace JSC { namespace Yarr {
#define RegexStackSpaceForBackTrackInfoParentheticalAssertion 1
#define RegexStackSpaceForBackTrackInfoParenthesesOnce 1 // Only for !fixed quantifiers.
#define RegexStackSpaceForBackTrackInfoParenthesesTerminal 1
#define RegexStackSpaceForBackTrackInfoParentheses 4
#define RegexStackSpaceForBackTrackInfoParentheses 2
struct PatternDisjunction;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment