Changeset 39083 in webkit for trunk/JavaScriptCore/runtime/RegExp.cpp
- Timestamp:
- Dec 7, 2008, 3:55:04 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/runtime/RegExp.cpp
r38975 r39083 38 38 #endif 39 39 40 inline RegExp::RegExp( const UString& pattern)40 inline RegExp::RegExp(JSGlobalData* globalData, 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( pattern, &m_numSubpatterns, &m_constructionError);48 m_wrecFunction = Generator::compileRegExp(globalData, pattern, &m_numSubpatterns, &m_constructionError, m_executablePool); 49 49 if (m_wrecFunction) 50 50 return; … … 55 55 } 56 56 57 PassRefPtr<RegExp> RegExp::create( const UString& pattern)57 PassRefPtr<RegExp> RegExp::create(JSGlobalData* globalData, const UString& pattern) 58 58 { 59 return adoptRef(new RegExp( pattern));59 return adoptRef(new RegExp(globalData, pattern)); 60 60 } 61 61 62 inline RegExp::RegExp( const UString& pattern, const UString& flags)62 inline RegExp::RegExp(JSGlobalData* globalData, const UString& pattern, const UString& flags) 63 63 : m_pattern(pattern) 64 64 , m_flags(flags) … … 87 87 88 88 #if ENABLE(WREC) 89 m_wrecFunction = Generator::compileRegExp( pattern, &m_numSubpatterns, &m_constructionError, (m_flagBits & IgnoreCase), (m_flagBits & Multiline));89 m_wrecFunction = Generator::compileRegExp(globalData, pattern, &m_numSubpatterns, &m_constructionError, m_executablePool, (m_flagBits & IgnoreCase), (m_flagBits & Multiline)); 90 90 if (m_wrecFunction) 91 91 return; … … 96 96 } 97 97 98 PassRefPtr<RegExp> RegExp::create( const UString& pattern, const UString& flags)98 PassRefPtr<RegExp> RegExp::create(JSGlobalData* globalData, const UString& pattern, const UString& flags) 99 99 { 100 return adoptRef(new RegExp( pattern, flags));100 return adoptRef(new RegExp(globalData, pattern, flags)); 101 101 } 102 102 … … 104 104 { 105 105 jsRegExpFree(m_regExp); 106 #if ENABLE(WREC)107 if (m_wrecFunction)108 WTF::fastFreeExecutable(reinterpret_cast<void*>(m_wrecFunction));109 #endif110 106 } 111 107
Note:
See TracChangeset
for help on using the changeset viewer.