Ignore:
Timestamp:
Jan 12, 2011, 3:16:40 AM (14 years ago)
Author:
Csaba Osztrogonác
Message:

Unreviewed, rolling out r75595.
http://trac.webkit.org/changeset/75595
https://bugs.webkit.org/show_bug.cgi?id=52286

Patch by Sheriff Bot <[email protected]> on 2011-01-12
It broke fast/regex/pcre-test-1.html (Requested by Ossy on
#webkit).

  • JavaScriptCore.gypi:
  • JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
  • JavaScriptCore.xcodeproj/project.pbxproj:
  • runtime/RegExp.cpp:
  • yarr/Yarr.h: Removed.
  • yarr/YarrInterpreter.cpp:
  • yarr/YarrInterpreter.h:
  • yarr/YarrJIT.cpp:

(JSC::Yarr::jitCompile):

  • yarr/YarrJIT.h:

(JSC::Yarr::execute):

  • yarr/YarrParser.h:
  • yarr/YarrPattern.cpp:

(JSC::Yarr::compile):
(JSC::Yarr::YarrPattern::YarrPattern):

  • yarr/YarrPattern.h:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/yarr/YarrPattern.cpp

    r75595 r75597  
    2828#include "YarrPattern.h"
    2929
    30 #include "Yarr.h"
    31 #include "YarrParser.h"
     30#include "YarrInterpreter.h"
    3231#include <wtf/Vector.h>
    3332
     
    931930};
    932931
    933 const char* YarrPattern::compile(const UString& patternString)
     932
     933static const char* compile(const UString& patternString, YarrPattern& pattern)
    934934{
    935     YarrPatternConstructor constructor(*this);
     935    YarrPatternConstructor constructor(pattern);
    936936
    937937    if (const char* error = parse(constructor, patternString))
     
    942942    //      "Note: if the number of left parentheses is less than the number specified
    943943    //       in \#, the \# is taken as an octal escape as described in the next row."
    944     if (containsIllegalBackReference()) {
     944    if (pattern.containsIllegalBackReference()) {
     945        unsigned numSubpatterns = pattern.m_numSubpatterns;
     946
    945947        constructor.reset();
    946948#if !ASSERT_DISABLED
    947949        const char* error =
    948950#endif
    949             parse(constructor, patternString, m_numSubpatterns);
     951            parse(constructor, patternString, numSubpatterns);
    950952
    951953        ASSERT(!error);
     954        ASSERT(numSubpatterns == pattern.m_numSubpatterns);
    952955    }
    953956
     
    959962
    960963    return 0;
    961 }
     964};
    962965
    963966YarrPattern::YarrPattern(const UString& pattern, bool ignoreCase, bool multiline, const char** error)
     
    977980    , nonwordcharCached(0)
    978981{
    979     *error = compile(pattern);
     982    *error = compile(pattern, *this);
    980983}
    981984
Note: See TracChangeset for help on using the changeset viewer.