summaryrefslogtreecommitdiffstats
path: root/JavaScriptCore/runtime/RegExp.cpp
diff options
context:
space:
mode:
authorSteve Block <steveblock@google.com>2010-08-27 11:02:25 +0100
committerSteve Block <steveblock@google.com>2010-09-02 17:17:20 +0100
commite8b154fd68f9b33be40a3590e58347f353835f5c (patch)
tree0733ce26384183245aaa5656af26c653636fe6c1 /JavaScriptCore/runtime/RegExp.cpp
parentda56157816334089526a7a115a85fd85a6e9a1dc (diff)
downloadexternal_webkit-e8b154fd68f9b33be40a3590e58347f353835f5c.zip
external_webkit-e8b154fd68f9b33be40a3590e58347f353835f5c.tar.gz
external_webkit-e8b154fd68f9b33be40a3590e58347f353835f5c.tar.bz2
Merge WebKit at r66079 : Initial merge by git
Change-Id: Ie2e1440fb9d487d24e52c247342c076fecaecac7
Diffstat (limited to 'JavaScriptCore/runtime/RegExp.cpp')
-rw-r--r--JavaScriptCore/runtime/RegExp.cpp31
1 files changed, 1 insertions, 30 deletions
diff --git a/JavaScriptCore/runtime/RegExp.cpp b/JavaScriptCore/runtime/RegExp.cpp
index 2b844c1..5ad9f3f 100644
--- a/JavaScriptCore/runtime/RegExp.cpp
+++ b/JavaScriptCore/runtime/RegExp.cpp
@@ -51,7 +51,6 @@ inline RegExp::RegExp(JSGlobalData* globalData, const UString& pattern, const US
, m_flagBits(0)
, m_constructionError(0)
, m_numSubpatterns(0)
- , m_lastMatchStart(-1)
{
// NOTE: The global flag is handled on a case-by-case basis by functions like
// String::match and RegExpObject::match.
@@ -96,24 +95,8 @@ int RegExp::match(const UString& s, int startOffset, Vector<int, 32>* ovector)
if (ovector)
ovector->resize(0);
- if (static_cast<unsigned>(startOffset) > s.length() || s.isNull()) {
- m_lastMatchString = UString();
- m_lastMatchStart = -1;
- m_lastOVector.shrink(0);
+ if (static_cast<unsigned>(startOffset) > s.length() || s.isNull())
return -1;
- }
-
- // Perform check to see if this match call is the same as the last match invocation
- // and if it is return the prior result.
- if ((startOffset == m_lastMatchStart) && (s.impl() == m_lastMatchString.impl())) {
- if (ovector)
- *ovector = m_lastOVector;
-
- if (m_lastOVector.isEmpty())
- return -1;
-
- return m_lastOVector.at(0);
- }
#if ENABLE(YARR_JIT)
if (!!m_regExpJITCode) {
@@ -151,21 +134,9 @@ int RegExp::match(const UString& s, int startOffset, Vector<int, 32>* ovector)
ovector->clear();
}
- m_lastMatchString = s;
- m_lastMatchStart = startOffset;
-
- if (ovector)
- m_lastOVector = *ovector;
- else
- m_lastOVector = nonReturnedOvector;
-
return result;
}
- m_lastMatchString = UString();
- m_lastMatchStart = -1;
- m_lastOVector.shrink(0);
-
return -1;
}