mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-08 05:27:14 +09:00
LibRegex: Remove orphaned save points in nested LookAhead
This commit is contained in:
parent
a6935299eb
commit
c85df78c4c
Notes:
github-actions[bot]
2025-03-17 15:12:04 +00:00
Author: https://github.com/mikiubo
Commit: c85df78c4c
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3949
Reviewed-by: https://github.com/alimpfard
3 changed files with 27 additions and 0 deletions
|
@ -218,6 +218,15 @@ ALWAYS_INLINE ExecutionResult OpCode_FailForks::execute(MatchInput const& input,
|
|||
return ExecutionResult::Failed_ExecuteLowPrioForks;
|
||||
}
|
||||
|
||||
ALWAYS_INLINE ExecutionResult OpCode_PopSaved::execute(MatchInput const& input, MatchState&) const
|
||||
{
|
||||
if (input.saved_positions.is_empty() || input.saved_code_unit_positions.is_empty())
|
||||
return ExecutionResult::Failed_ExecuteLowPrioForks;
|
||||
input.saved_positions.take_last();
|
||||
input.saved_code_unit_positions.take_last();
|
||||
return ExecutionResult::Failed_ExecuteLowPrioForks;
|
||||
}
|
||||
|
||||
ALWAYS_INLINE ExecutionResult OpCode_Jump::execute(MatchInput const&, MatchState& state) const
|
||||
{
|
||||
state.instruction_position += offset();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue