Simplify Split regex op handling by swapping target
This commit is contained in:
parent
84fc2844a1
commit
e06acd3dc8
|
@ -408,18 +408,14 @@ private:
|
|||
thread.inst = inst.param.jump_target;
|
||||
break;
|
||||
case CompiledRegex::Split:
|
||||
if (instructions[inst.param.split.target].last_step == current_step)
|
||||
break;
|
||||
|
||||
if (auto target = inst.param.split.target;
|
||||
instructions[target].last_step != current_step)
|
||||
{
|
||||
if (thread.saves >= 0)
|
||||
++m_saves[thread.saves].refcount;
|
||||
|
||||
if (inst.param.split.prioritize_parent)
|
||||
m_threads.push_current({inst.param.split.target, thread.saves});
|
||||
else
|
||||
{
|
||||
m_threads.push_current(thread);
|
||||
thread.inst = inst.param.split.target;
|
||||
if (not inst.param.split.prioritize_parent)
|
||||
std::swap(thread.inst, target);
|
||||
m_threads.push_current({target, thread.saves});
|
||||
}
|
||||
break;
|
||||
case CompiledRegex::Save:
|
||||
|
|
Loading…
Reference in New Issue
Block a user