Changeset 62677 in webkit for trunk/JavaScriptCore/yarr/RegexInterpreter.cpp
- Timestamp:
- Jul 7, 2010, 9:53:49 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/yarr/RegexInterpreter.cpp
r62386 r62677 1236 1236 : m_pattern(pattern) 1237 1237 { 1238 m_bodyDisjunction = 0;1239 1238 m_currentAlternativeIndex = 0; 1240 1239 } 1241 1240 1242 BytecodePattern*compile()1241 PassOwnPtr<BytecodePattern> compile() 1243 1242 { 1244 1243 regexBegin(m_pattern.m_numSubpatterns, m_pattern.m_body->m_callFrameSize); … … 1246 1245 regexEnd(); 1247 1246 1248 return new BytecodePattern(m_bodyDisjunction, m_allParenthesesInfo, m_pattern);1247 return adoptPtr(new BytecodePattern(m_bodyDisjunction.release(), m_allParenthesesInfo, m_pattern)); 1249 1248 } 1250 1249 … … 1449 1448 void regexBegin(unsigned numSubpatterns, unsigned callFrameSize) 1450 1449 { 1451 m_bodyDisjunction = new ByteDisjunction(numSubpatterns, callFrameSize);1450 m_bodyDisjunction = adoptPtr(new ByteDisjunction(numSubpatterns, callFrameSize)); 1452 1451 m_bodyDisjunction->terms.append(ByteTerm::BodyAlternativeBegin()); 1453 1452 m_bodyDisjunction->terms[0].frameLocation = 0; … … 1569 1568 private: 1570 1569 RegexPattern& m_pattern; 1571 ByteDisjunction*m_bodyDisjunction;1570 OwnPtr<ByteDisjunction> m_bodyDisjunction; 1572 1571 unsigned m_currentAlternativeIndex; 1573 1572 Vector<ParenthesesStackEntry> m_parenthesesStack; … … 1576 1575 1577 1576 1578 BytecodePattern*byteCompileRegex(const UString& patternString, unsigned& numSubpatterns, const char*& error, bool ignoreCase, bool multiline)1577 PassOwnPtr<BytecodePattern> byteCompileRegex(const UString& patternString, unsigned& numSubpatterns, const char*& error, bool ignoreCase, bool multiline) 1579 1578 { 1580 1579 RegexPattern pattern(ignoreCase, multiline); 1581 1580 1582 1581 if ((error = compileRegex(patternString, pattern))) 1583 return 0;1582 return PassOwnPtr<BytecodePattern>(); 1584 1583 1585 1584 numSubpatterns = pattern.m_numSubpatterns;
Note:
See TracChangeset
for help on using the changeset viewer.