Changeset 75597 in webkit for trunk/Source/JavaScriptCore/yarr/YarrPattern.cpp
- Timestamp:
- Jan 12, 2011, 3:16:40 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/yarr/YarrPattern.cpp
r75595 r75597 28 28 #include "YarrPattern.h" 29 29 30 #include "Yarr.h" 31 #include "YarrParser.h" 30 #include "YarrInterpreter.h" 32 31 #include <wtf/Vector.h> 33 32 … … 931 930 }; 932 931 933 const char* YarrPattern::compile(const UString& patternString) 932 933 static const char* compile(const UString& patternString, YarrPattern& pattern) 934 934 { 935 YarrPatternConstructor constructor( *this);935 YarrPatternConstructor constructor(pattern); 936 936 937 937 if (const char* error = parse(constructor, patternString)) … … 942 942 // "Note: if the number of left parentheses is less than the number specified 943 943 // 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 945 947 constructor.reset(); 946 948 #if !ASSERT_DISABLED 947 949 const char* error = 948 950 #endif 949 parse(constructor, patternString, m_numSubpatterns);951 parse(constructor, patternString, numSubpatterns); 950 952 951 953 ASSERT(!error); 954 ASSERT(numSubpatterns == pattern.m_numSubpatterns); 952 955 } 953 956 … … 959 962 960 963 return 0; 961 } 964 }; 962 965 963 966 YarrPattern::YarrPattern(const UString& pattern, bool ignoreCase, bool multiline, const char** error) … … 977 980 , nonwordcharCached(0) 978 981 { 979 *error = compile(pattern );982 *error = compile(pattern, *this); 980 983 } 981 984
Note:
See TracChangeset
for help on using the changeset viewer.