diff options
| author | Simon Hausmann <simon.hausmann@nokia.com> | 2012-05-07 11:21:11 +0200 |
|---|---|---|
| committer | Simon Hausmann <simon.hausmann@nokia.com> | 2012-05-07 11:21:11 +0200 |
| commit | 2cf6c8816a73e0132bd8fa3b509d62d7c51b6e47 (patch) | |
| tree | 988e8c5b116dd0466244ae2fe5af8ee9be926d76 /Source/JavaScriptCore/runtime/RegExp.h | |
| parent | dd91e772430dc294e3bf478c119ef8d43c0a3358 (diff) | |
Imported WebKit commit 7e538425aa020340619e927792f3d895061fb54b (http://svn.webkit.org/repository/webkit/trunk@116286)
Diffstat (limited to 'Source/JavaScriptCore/runtime/RegExp.h')
| -rw-r--r-- | Source/JavaScriptCore/runtime/RegExp.h | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/Source/JavaScriptCore/runtime/RegExp.h b/Source/JavaScriptCore/runtime/RegExp.h index d0201cbfb..ad1020376 100644 --- a/Source/JavaScriptCore/runtime/RegExp.h +++ b/Source/JavaScriptCore/runtime/RegExp.h @@ -22,14 +22,19 @@ #ifndef RegExp_h #define RegExp_h -#include "UString.h" #include "ExecutableAllocator.h" -#include "Structure.h" +#include "MatchResult.h" #include "RegExpKey.h" +#include "Structure.h" +#include "UString.h" #include "yarr/Yarr.h" #include <wtf/Forward.h> #include <wtf/RefCounted.h> +#if ENABLE(YARR_JIT) +#include "yarr/YarrJIT.h" +#endif + namespace JSC { struct RegExpRepresentation; @@ -53,12 +58,13 @@ namespace JSC { bool isValid() const { return !m_constructionError && m_flags != InvalidFlags; } const char* errorMessage() const { return m_constructionError; } - JS_EXPORT_PRIVATE int match(JSGlobalData&, const UString&, unsigned startOffset, Vector<int, 32>* ovector = 0); + JS_EXPORT_PRIVATE int match(JSGlobalData&, const UString&, unsigned startOffset, Vector<int, 32>& ovector); + MatchResult match(JSGlobalData&, const UString&, unsigned startOffset); unsigned numSubpatterns() const { return m_numSubpatterns; } bool hasCode() { - return m_representation; + return m_state != NotCompiled; } void invalidateCode(); @@ -95,6 +101,9 @@ namespace JSC { void compile(JSGlobalData*, Yarr::YarrCharSize); void compileIfNecessary(JSGlobalData&, Yarr::YarrCharSize); + void compileMatchOnly(JSGlobalData*, Yarr::YarrCharSize); + void compileIfNecessaryMatchOnly(JSGlobalData&, Yarr::YarrCharSize); + #if ENABLE(YARR_JIT_DEBUG) void matchCompareWithInterpreter(const UString&, int startOffset, int* offsetVector, int jitResult); #endif @@ -108,7 +117,10 @@ namespace JSC { unsigned m_rtMatchFoundCount; #endif - OwnPtr<RegExpRepresentation> m_representation; +#if ENABLE(YARR_JIT) + Yarr::YarrCodeBlock m_regExpJITCode; +#endif + OwnPtr<Yarr::BytecodePattern> m_regExpBytecode; }; } // namespace JSC |
