remove remains of wrec support from JSC

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
Ivailo Monev 2016-01-14 22:59:38 +02:00
parent 06ba536c6d
commit 0b7dd6084f
2 changed files with 0 additions and 49 deletions

View file

@ -40,20 +40,12 @@
#else
#if ENABLE(WREC)
#include "JIT.h"
#include "WRECGenerator.h"
#endif
#include <pcre/pcre.h>
#endif
namespace JSC {
#if ENABLE(WREC)
using namespace WREC;
#endif
inline RegExp::RegExp(JSGlobalData* globalData, const UString& pattern)
: m_pattern(pattern)
, m_flagBits(0)
@ -182,14 +174,7 @@ int RegExp::match(const UString& s, int startOffset, Vector<int, 32>* ovector)
void RegExp::compile(JSGlobalData* globalData)
{
m_regExp = 0;
#if ENABLE(WREC)
m_wrecFunction = Generator::compileRegExp(globalData, m_pattern, &m_numSubpatterns, &m_constructionError, m_executablePool, ignoreCase(), multiline());
if (m_wrecFunction || m_constructionError)
return;
// Fall through to non-WREC case.
#else
UNUSED_PARAM(globalData);
#endif
JSRegExpIgnoreCaseOption ignoreCaseOption = ignoreCase() ? JSRegExpIgnoreCase : JSRegExpDoNotIgnoreCase;
JSRegExpMultilineOption multilineOption = multiline() ? JSRegExpMultiline : JSRegExpSingleLine;
@ -206,36 +191,6 @@ int RegExp::match(const UString& s, int startOffset, Vector<int, 32>* ovector)
if (static_cast<unsigned>(startOffset) > s.size() || s.isNull())
return -1;
#if ENABLE(WREC)
if (m_wrecFunction) {
int offsetVectorSize = (m_numSubpatterns + 1) * 2;
int* offsetVector;
Vector<int, 32> nonReturnedOvector;
if (ovector) {
ovector->resize(offsetVectorSize);
offsetVector = ovector->data();
} else {
nonReturnedOvector.resize(offsetVectorSize);
offsetVector = nonReturnedOvector.data();
}
ASSERT(offsetVector);
for (int j = 0; j < offsetVectorSize; ++j)
offsetVector[j] = -1;
int result = m_wrecFunction(s.data(), startOffset, s.size(), offsetVector);
if (result < 0) {
#ifndef NDEBUG
// TODO: define up a symbol, rather than magic -1
if (result != -1)
fprintf(stderr, "jsRegExpExecute failed with result %d\n", result);
#endif
if (ovector)
ovector->clear();
}
return result;
} else
#endif
if (m_regExp) {
// Set up the offset vector for the result.
// First 2/3 used for result, the last third used by PCRE.

View file

@ -73,10 +73,6 @@ namespace JSC {
#elif ENABLE(YARR)
OwnPtr<Yarr::BytecodePattern> m_regExpBytecode;
#else
#if ENABLE(WREC)
WREC::CompiledRegExp m_wrecFunction;
RefPtr<ExecutablePool> m_executablePool;
#endif
JSRegExp* m_regExp;
#endif
};