summaryrefslogtreecommitdiffstats
path: root/JavaScriptCore/runtime/RegExp.h
diff options
context:
space:
mode:
Diffstat (limited to 'JavaScriptCore/runtime/RegExp.h')
-rw-r--r--JavaScriptCore/runtime/RegExp.h30
1 files changed, 10 insertions, 20 deletions
diff --git a/JavaScriptCore/runtime/RegExp.h b/JavaScriptCore/runtime/RegExp.h
index 61ab0bc..e6e2fbc 100644
--- a/JavaScriptCore/runtime/RegExp.h
+++ b/JavaScriptCore/runtime/RegExp.h
@@ -23,26 +23,19 @@
#define RegExp_h
#include "UString.h"
-#include "WREC.h"
#include "ExecutableAllocator.h"
#include <wtf/Forward.h>
#include <wtf/RefCounted.h>
-#include "yarr/RegexJIT.h"
-#include "yarr/RegexInterpreter.h"
-
-struct JSRegExp;
namespace JSC {
+ struct RegExpRepresentation;
class JSGlobalData;
class RegExp : public RefCounted<RegExp> {
public:
- static PassRefPtr<RegExp> create(JSGlobalData* globalData, const UString& pattern);
static PassRefPtr<RegExp> create(JSGlobalData* globalData, const UString& pattern, const UString& flags);
-#if !ENABLE(YARR)
~RegExp();
-#endif
bool global() const { return m_flagBits & Global; }
bool ignoreCase() const { return m_flagBits & IgnoreCase; }
@@ -55,9 +48,12 @@ namespace JSC {
int match(const UString&, int startOffset, Vector<int, 32>* ovector = 0);
unsigned numSubpatterns() const { return m_numSubpatterns; }
+
+#if ENABLE(REGEXP_TRACING)
+ void printTraceData();
+#endif
private:
- RegExp(JSGlobalData* globalData, const UString& pattern);
RegExp(JSGlobalData* globalData, const UString& pattern, const UString& flags);
void compile(JSGlobalData*);
@@ -68,18 +64,12 @@ namespace JSC {
int m_flagBits;
const char* m_constructionError;
unsigned m_numSubpatterns;
-
-#if ENABLE(YARR_JIT)
- Yarr::RegexCodeBlock m_regExpJITCode;
-#elif ENABLE(YARR)
- OwnPtr<Yarr::BytecodePattern> m_regExpBytecode;
-#else
-#if ENABLE(WREC)
- WREC::CompiledRegExp m_wrecFunction;
- RefPtr<ExecutablePool> m_executablePool;
-#endif
- JSRegExp* m_regExp;
+#if ENABLE(REGEXP_TRACING)
+ unsigned m_rtMatchCallCount;
+ unsigned m_rtMatchFoundCount;
#endif
+
+ OwnPtr<RegExpRepresentation> m_representation;
};
} // namespace JSC