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.h13
1 files changed, 9 insertions, 4 deletions
diff --git a/JavaScriptCore/runtime/RegExp.h b/JavaScriptCore/runtime/RegExp.h
index e6e2fbc..8f33f57 100644
--- a/JavaScriptCore/runtime/RegExp.h
+++ b/JavaScriptCore/runtime/RegExp.h
@@ -41,7 +41,7 @@ namespace JSC {
bool ignoreCase() const { return m_flagBits & IgnoreCase; }
bool multiline() const { return m_flagBits & Multiline; }
- const UString& pattern() const { return m_pattern; }
+ const UString& pattern() const { return m_patternString; }
bool isValid() const { return !m_constructionError; }
const char* errorMessage() const { return m_constructionError; }
@@ -56,11 +56,16 @@ namespace JSC {
private:
RegExp(JSGlobalData* globalData, const UString& pattern, const UString& flags);
- void compile(JSGlobalData*);
+ enum RegExpState {
+ ParseError,
+ JITCode,
+ ByteCode
+ } m_state;
- enum FlagBits { Global = 1, IgnoreCase = 2, Multiline = 4 };
+ RegExpState compile(JSGlobalData*);
- UString m_pattern; // FIXME: Just decompile m_regExp instead of storing this.
+ enum FlagBits { Global = 1, IgnoreCase = 2, Multiline = 4 };
+ UString m_patternString;
int m_flagBits;
const char* m_constructionError;
unsigned m_numSubpatterns;