Changeset 176553 in webkit for trunk/Source/JavaScriptCore/yarr/YarrInterpreter.cpp
- Timestamp:
- Nov 27, 2014, 4:51:32 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/yarr/YarrInterpreter.cpp
r174455 r176553 1473 1473 } 1474 1474 1475 PassOwnPtr<BytecodePattern> compile(BumpPointerAllocator* allocator)1475 std::unique_ptr<BytecodePattern> compile(BumpPointerAllocator* allocator) 1476 1476 { 1477 1477 regexBegin(m_pattern.m_numSubpatterns, m_pattern.m_body->m_callFrameSize, m_pattern.m_body->m_alternatives[0]->onceThrough()); … … 1479 1479 regexEnd(); 1480 1480 1481 return adoptPtr(new BytecodePattern(m_bodyDisjunction.release(), m_allParenthesesInfo, m_pattern, allocator));1481 return std::make_unique<BytecodePattern>(WTF::move(m_bodyDisjunction), m_allParenthesesInfo, m_pattern, allocator); 1482 1482 } 1483 1483 … … 1779 1779 void regexBegin(unsigned numSubpatterns, unsigned callFrameSize, bool onceThrough) 1780 1780 { 1781 m_bodyDisjunction = adoptPtr(new ByteDisjunction(numSubpatterns, callFrameSize));1781 m_bodyDisjunction = std::make_unique<ByteDisjunction>(numSubpatterns, callFrameSize); 1782 1782 m_bodyDisjunction->terms.append(ByteTerm::BodyAlternativeBegin(onceThrough)); 1783 1783 m_bodyDisjunction->terms[0].frameLocation = 0; … … 1921 1921 private: 1922 1922 YarrPattern& m_pattern; 1923 OwnPtr<ByteDisjunction> m_bodyDisjunction;1923 std::unique_ptr<ByteDisjunction> m_bodyDisjunction; 1924 1924 unsigned m_currentAlternativeIndex; 1925 1925 Vector<ParenthesesStackEntry> m_parenthesesStack; … … 1927 1927 }; 1928 1928 1929 PassOwnPtr<BytecodePattern> byteCompile(YarrPattern& pattern, BumpPointerAllocator* allocator)1929 std::unique_ptr<BytecodePattern> byteCompile(YarrPattern& pattern, BumpPointerAllocator* allocator) 1930 1930 { 1931 1931 return ByteCompiler(pattern).compile(allocator);
Note:
See TracChangeset
for help on using the changeset viewer.