mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-05-23 19:48:33 +00:00
LibRegex: Use a copy-on-write vector for fork state
This commit is contained in:
committed by
Ali Mohammad Pur
parent
48a4c9c1ad
commit
f1851346d3
@@ -1060,9 +1060,11 @@ ALWAYS_INLINE ExecutionResult OpCode_Checkpoint::execute(MatchInput const& input
|
||||
|
||||
ALWAYS_INLINE ExecutionResult OpCode_JumpNonEmpty::execute(MatchInput const& input, MatchState& state) const
|
||||
{
|
||||
auto current_position = state.string_position;
|
||||
u64 current_position = state.string_position;
|
||||
auto checkpoint_ip = state.instruction_position + size() + checkpoint();
|
||||
if (input.checkpoints.get(checkpoint_ip).value_or(current_position) != current_position) {
|
||||
auto checkpoint_position = input.checkpoints.find(checkpoint_ip);
|
||||
|
||||
if (checkpoint_position != input.checkpoints.end() && checkpoint_position->value != current_position) {
|
||||
auto form = this->form();
|
||||
|
||||
if (form == OpCodeId::Jump) {
|
||||
|
||||
Reference in New Issue
Block a user