Ignore:
Timestamp:
Dec 2, 2010, 5:36:45 AM (14 years ago)
Author:
[email protected]
Message:

2010-12-02 Peter Varga <[email protected]>

Reviewed by Gavin Barraclough.

Move regex parsing and fallback handling to runtime/RegExp.cpp
https://bugs.webkit.org/show_bug.cgi?id=50015

  • runtime/RegExp.cpp: (JSC::RegExp::RegExp): (JSC::RegExp::create): (JSC::RegExp::compile): (JSC::RegExp::match): (JSC::RegExp::printTraceData):
  • runtime/RegExp.h: (JSC::RegExp::pattern):
  • yarr/RegexInterpreter.cpp:
  • yarr/RegexInterpreter.h:
  • yarr/RegexJIT.cpp: (JSC::Yarr::RegexGenerator::compile): (JSC::Yarr::jitCompileRegex):
  • yarr/RegexJIT.h: (JSC::Yarr::RegexCodeBlock::RegexCodeBlock): (JSC::Yarr::RegexCodeBlock::setFallBack): (JSC::Yarr::RegexCodeBlock::isFallBack): (JSC::Yarr::executeRegex):
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/runtime/RegExp.h

    r67146 r73124  
    4242        bool multiline() const { return m_flagBits & Multiline; }
    4343
    44         const UString& pattern() const { return m_pattern; }
     44        const UString& pattern() const { return m_patternString; }
    4545
    4646        bool isValid() const { return !m_constructionError; }
     
    5757        RegExp(JSGlobalData* globalData, const UString& pattern, const UString& flags);
    5858
    59         void compile(JSGlobalData*);
     59        enum RegExpState {
     60            ParseError,
     61            JITCode,
     62            ByteCode
     63        } m_state;
     64
     65        RegExpState compile(JSGlobalData*);
    6066
    6167        enum FlagBits { Global = 1, IgnoreCase = 2, Multiline = 4 };
    62 
    63         UString m_pattern; // FIXME: Just decompile m_regExp instead of storing this.
     68        UString m_patternString;
    6469        int m_flagBits;
    6570        const char* m_constructionError;
Note: See TracChangeset for help on using the changeset viewer.