|
Lines 1472-1484
public:
a/Source/JavaScriptCore/yarr/YarrInterpreter.cpp_sec1
|
| 1472 |
m_currentAlternativeIndex = 0; |
1472 |
m_currentAlternativeIndex = 0; |
| 1473 |
} |
1473 |
} |
| 1474 |
|
1474 |
|
| 1475 |
PassOwnPtr<BytecodePattern> compile(BumpPointerAllocator* allocator) |
1475 |
std::unique_ptr<BytecodePattern> compile(BumpPointerAllocator* allocator) |
| 1476 |
{ |
1476 |
{ |
| 1477 |
regexBegin(m_pattern.m_numSubpatterns, m_pattern.m_body->m_callFrameSize, m_pattern.m_body->m_alternatives[0]->onceThrough()); |
1477 |
regexBegin(m_pattern.m_numSubpatterns, m_pattern.m_body->m_callFrameSize, m_pattern.m_body->m_alternatives[0]->onceThrough()); |
| 1478 |
emitDisjunction(m_pattern.m_body); |
1478 |
emitDisjunction(m_pattern.m_body); |
| 1479 |
regexEnd(); |
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 |
|
| 1484 |
void checkInput(unsigned count) |
1484 |
void checkInput(unsigned count) |
|
Lines 1778-1784
public:
a/Source/JavaScriptCore/yarr/YarrInterpreter.cpp_sec2
|
| 1778 |
|
1778 |
|
| 1779 |
void regexBegin(unsigned numSubpatterns, unsigned callFrameSize, bool onceThrough) |
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 |
m_bodyDisjunction->terms.append(ByteTerm::BodyAlternativeBegin(onceThrough)); |
1782 |
m_bodyDisjunction->terms.append(ByteTerm::BodyAlternativeBegin(onceThrough)); |
| 1783 |
m_bodyDisjunction->terms[0].frameLocation = 0; |
1783 |
m_bodyDisjunction->terms[0].frameLocation = 0; |
| 1784 |
m_currentAlternativeIndex = 0; |
1784 |
m_currentAlternativeIndex = 0; |
|
Lines 1920-1932
public:
a/Source/JavaScriptCore/yarr/YarrInterpreter.cpp_sec3
|
| 1920 |
|
1920 |
|
| 1921 |
private: |
1921 |
private: |
| 1922 |
YarrPattern& m_pattern; |
1922 |
YarrPattern& m_pattern; |
| 1923 |
OwnPtr<ByteDisjunction> m_bodyDisjunction; |
1923 |
std::unique_ptr<ByteDisjunction> m_bodyDisjunction; |
| 1924 |
unsigned m_currentAlternativeIndex; |
1924 |
unsigned m_currentAlternativeIndex; |
| 1925 |
Vector<ParenthesesStackEntry> m_parenthesesStack; |
1925 |
Vector<ParenthesesStackEntry> m_parenthesesStack; |
| 1926 |
Vector<OwnPtr<ByteDisjunction>> m_allParenthesesInfo; |
1926 |
Vector<OwnPtr<ByteDisjunction>> m_allParenthesesInfo; |
| 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 |
return ByteCompiler(pattern).compile(allocator); |
1931 |
return ByteCompiler(pattern).compile(allocator); |
| 1932 |
} |
1932 |
} |