Changeset 38975 in webkit for trunk/JavaScriptCore/runtime/RegExp.cpp
- Timestamp:
- Dec 3, 2008, 4:10:53 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/runtime/RegExp.cpp
r38839 r38975 38 38 #endif 39 39 40 inline RegExp::RegExp( JSGlobalData* globalData,const UString& pattern)40 inline RegExp::RegExp(const UString& pattern) 41 41 : m_pattern(pattern) 42 42 , m_flagBits(0) … … 46 46 { 47 47 #if ENABLE(WREC) 48 m_wrecFunction = Generator::compileRegExp( globalData->interpreter,pattern, &m_numSubpatterns, &m_constructionError);48 m_wrecFunction = Generator::compileRegExp(pattern, &m_numSubpatterns, &m_constructionError); 49 49 if (m_wrecFunction) 50 50 return; 51 51 // Fall through to non-WREC case. 52 #else53 UNUSED_PARAM(globalData);54 52 #endif 55 53 m_regExp = jsRegExpCompile(reinterpret_cast<const UChar*>(pattern.data()), pattern.size(), … … 57 55 } 58 56 59 PassRefPtr<RegExp> RegExp::create( JSGlobalData* globalData,const UString& pattern)57 PassRefPtr<RegExp> RegExp::create(const UString& pattern) 60 58 { 61 return adoptRef(new RegExp( globalData,pattern));59 return adoptRef(new RegExp(pattern)); 62 60 } 63 61 64 inline RegExp::RegExp( JSGlobalData* globalData,const UString& pattern, const UString& flags)62 inline RegExp::RegExp(const UString& pattern, const UString& flags) 65 63 : m_pattern(pattern) 66 64 , m_flags(flags) … … 89 87 90 88 #if ENABLE(WREC) 91 m_wrecFunction = Generator::compileRegExp( globalData->interpreter,pattern, &m_numSubpatterns, &m_constructionError, (m_flagBits & IgnoreCase), (m_flagBits & Multiline));89 m_wrecFunction = Generator::compileRegExp(pattern, &m_numSubpatterns, &m_constructionError, (m_flagBits & IgnoreCase), (m_flagBits & Multiline)); 92 90 if (m_wrecFunction) 93 91 return; 94 92 // Fall through to non-WREC case. 95 #else96 UNUSED_PARAM(globalData);97 93 #endif 98 94 m_regExp = jsRegExpCompile(reinterpret_cast<const UChar*>(pattern.data()), pattern.size(), … … 100 96 } 101 97 102 PassRefPtr<RegExp> RegExp::create( JSGlobalData* globalData,const UString& pattern, const UString& flags)98 PassRefPtr<RegExp> RegExp::create(const UString& pattern, const UString& flags) 103 99 { 104 return adoptRef(new RegExp( globalData,pattern, flags));100 return adoptRef(new RegExp(pattern, flags)); 105 101 } 106 102
Note:
See TracChangeset
for help on using the changeset viewer.