diff options
| author | Jean-Baptiste Queru <jbq@google.com> | 2009-11-15 12:06:13 -0800 |
|---|---|---|
| committer | Jean-Baptiste Queru <jbq@google.com> | 2009-11-15 12:06:16 -0800 |
| commit | 19b276ff1f54bed5c687bef385cb6d8c33332d56 (patch) | |
| tree | 3f24d37c741607a2f8d4b8ba40d723047bc74456 /JavaScriptCore/pcre/pcre_exec.cpp | |
| parent | a2acdcdf0059d9926f5b53c6824fe16371dd04f2 (diff) | |
| parent | ca654d632f783143435336ddc4381fbda6340a65 (diff) | |
| download | external_webkit-19b276ff1f54bed5c687bef385cb6d8c33332d56.zip external_webkit-19b276ff1f54bed5c687bef385cb6d8c33332d56.tar.gz external_webkit-19b276ff1f54bed5c687bef385cb6d8c33332d56.tar.bz2 | |
merge from eclair
Diffstat (limited to 'JavaScriptCore/pcre/pcre_exec.cpp')
| -rw-r--r-- | JavaScriptCore/pcre/pcre_exec.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/JavaScriptCore/pcre/pcre_exec.cpp b/JavaScriptCore/pcre/pcre_exec.cpp index 34e2786..16619d4 100644 --- a/JavaScriptCore/pcre/pcre_exec.cpp +++ b/JavaScriptCore/pcre/pcre_exec.cpp @@ -50,13 +50,13 @@ the JavaScript specification. There are also some supporting functions. */ #include <wtf/Vector.h> #if REGEXP_HISTOGRAM -#include <parser/DateMath.h> +#include <wtf/DateMath.h> #include <runtime/UString.h> #endif using namespace WTF; -#ifdef __GNUC__ +#if COMPILER(GCC) #define USE_COMPUTED_GOTO_FOR_MATCH_RECURSION //#define USE_COMPUTED_GOTO_FOR_MATCH_OPCODE_LOOP #endif @@ -112,7 +112,7 @@ struct BracketChainNode { const UChar* bracketStart; }; -struct MatchFrame { +struct MatchFrame : FastAllocBase { ReturnLocation returnLocation; struct MatchFrame* previousFrame; @@ -175,7 +175,7 @@ reqByte match. */ /* The below limit restricts the number of "recursive" match calls in order to avoid spending exponential time on complex regular expressions. */ -static const unsigned matchLimit = 100000; +static const unsigned matchLimit = 1000000; #ifdef DEBUG /************************************************* @@ -447,6 +447,7 @@ static int match(const UChar* subjectPtr, const unsigned char* instructionPtr, i int min; bool minimize = false; /* Initialization not really needed, but some compilers think so. */ unsigned remainingMatchCount = matchLimit; + int othercase; /* Declare here to avoid errors during jumps */ MatchStack stack; @@ -1186,7 +1187,7 @@ RECURSE: stack.currentFrame->args.instructionPtr += stack.currentFrame->locals.length; if (stack.currentFrame->locals.fc <= 0xFFFF) { - int othercase = md.ignoreCase ? jsc_pcre_ucp_othercase(stack.currentFrame->locals.fc) : -1; + othercase = md.ignoreCase ? jsc_pcre_ucp_othercase(stack.currentFrame->locals.fc) : -1; for (int i = 1; i <= min; i++) { if (*stack.currentFrame->args.subjectPtr != stack.currentFrame->locals.fc && *stack.currentFrame->args.subjectPtr != othercase) |
