Ignore:
Timestamp:
Nov 17, 2010, 7:52:43 AM (15 years ago)
Author:
[email protected]
Message:

2010-11-17 Sheriff Bot <[email protected]>

Unreviewed, rolling out r72197.
http://trac.webkit.org/changeset/72197
https://bugs.webkit.org/show_bug.cgi?id=49661

broke fast/regex/test1.html (Requested by stampho on #webkit).

  • runtime/JSGlobalData.h:
  • runtime/RegExp.cpp: (JSC::RegExpRepresentation::~RegExpRepresentation): (JSC::RegExp::compile): (JSC::RegExp::match):
  • tests/mozilla/expected.html:
  • wtf/Platform.h:
  • yarr/RegexCompiler.cpp:
  • yarr/RegexCompiler.h:
  • yarr/RegexInterpreter.cpp:
  • yarr/RegexInterpreter.h:
  • yarr/RegexJIT.cpp: (JSC::Yarr::jitCompileRegex):
  • yarr/RegexJIT.h: (JSC::Yarr::RegexCodeBlock::RegexCodeBlock): (JSC::Yarr::RegexCodeBlock::~RegexCodeBlock): (JSC::Yarr::RegexCodeBlock::getFallback): (JSC::Yarr::RegexCodeBlock::setFallback): (JSC::Yarr::executeRegex):
  • yarr/RegexParser.h:
  • yarr/RegexPattern.h:

2010-11-17 Sheriff Bot <[email protected]>

Unreviewed, rolling out r72197.
http://trac.webkit.org/changeset/72197
https://bugs.webkit.org/show_bug.cgi?id=49661

broke fast/regex/test1.html (Requested by stampho on #webkit).

  • fast/js/regexp-look-ahead-empty-expected.txt:
  • fast/js/regexp-overflow-expected.txt:
  • fast/js/script-tests/regexp-overflow.js:
  • fast/js/sputnik/Conformance/15_Native_Objects/15.10_RegExp/15.10.2/15.10.2.5_Term/S15.10.2.5_A1_T4-expected.txt:
  • fast/js/sputnik/Conformance/15_Native_Objects/15.10_RegExp/15.10.2/15.10.2.8_Atom/S15.10.2.8_A2_T1-expected.txt:
  • fast/js/sputnik/Conformance/15_Native_Objects/15.10_RegExp/15.10.6/15.10.6.2_RegExp.prototype.exec/S15.10.6.2_A1_T6-expected.txt:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/yarr/RegexJIT.h

    r72197 r72207  
    3030
    3131#include "MacroAssembler.h"
    32 #include "RegexInterpreter.h" // temporary, remove when fallback is removed.
    3332#include "RegexPattern.h"
    3433#include "UString.h"
     34
     35#include "pcre.h"
     36struct JSRegExp; // temporary, remove when fallback is removed.
    3537
    3638#if CPU(X86) && !COMPILER(MSVC)
     
    5254public:
    5355    RegexCodeBlock()
    54         : m_needFallback(false)
     56        : m_fallback(0)
    5557    {
    5658    }
     
    5860    ~RegexCodeBlock()
    5961    {
     62        if (m_fallback)
     63            jsRegExpFree(m_fallback);
    6064    }
    6165
    62     BytecodePattern* getFallback() { return m_fallback.get(); }
    63     bool isFallback() { return m_needFallback; }
    64     void setFallback(PassOwnPtr<BytecodePattern> fallback)
    65     {
    66         m_fallback = fallback;
    67         m_needFallback = true;
    68     }
     66    JSRegExp* getFallback() { return m_fallback; }
     67    void setFallback(JSRegExp* fallback) { m_fallback = fallback; }
    6968
    7069    bool operator!() { return (!m_ref.m_code.executableAddress() && !m_fallback); }
     
    7574        return reinterpret_cast<RegexJITCode>(m_ref.m_code.executableAddress())(input, start, length, output);
    7675    }
    77 
     76   
    7877#if ENABLE(REGEXP_TRACING)
    7978    void *getAddr() { return m_ref.m_code.executableAddress(); }
     
    8281private:
    8382    MacroAssembler::CodeRef m_ref;
    84     OwnPtr<Yarr::BytecodePattern> m_fallback;
    85     bool m_needFallback;
     83    JSRegExp* m_fallback;
    8684};
    8785
    88 void jitCompileRegex(JSGlobalData* globalData, RegexCodeBlock& jitObject, const UString& pattern, unsigned& numSubpatterns, const char*& error, BumpPointerAllocator* allocator, bool ignoreCase = false, bool multiline = false);
     86void jitCompileRegex(JSGlobalData* globalData, RegexCodeBlock& jitObject, const UString& pattern, unsigned& numSubpatterns, const char*& error, bool ignoreCase = false, bool multiline = false);
    8987
    90 inline int executeRegex(RegexCodeBlock& jitObject, const UChar* input, unsigned start, unsigned length, int* output)
     88inline int executeRegex(RegexCodeBlock& jitObject, const UChar* input, unsigned start, unsigned length, int* output, int outputArraySize)
    9189{
    92     if (jitObject.isFallback())
    93         return (interpretRegex(jitObject.getFallback(), input, start, length, output));
     90    if (JSRegExp* fallback = jitObject.getFallback())
     91        return (jsRegExpExecute(fallback, input, length, start, output, outputArraySize) < 0) ? -1 : output[0];
    9492
    9593    return jitObject.execute(input, start, length, output);
Note: See TracChangeset for help on using the changeset viewer.