mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-27 11:48:59 +00:00
LibRegex: Make Fork{Jump,Stay} non-recursive
This makes very fork-heavy expressions (like `(aa)*`) not run out of stack space when matching very long strings.
This commit is contained in:
parent
a08870cc19
commit
5f342e4fa9
Notes:
sideshowbarker
2024-07-18 07:35:17 +09:00
Author: https://github.com/alimpfard
Commit: 5f342e4fa9
Pull-request: https://github.com/SerenityOS/serenity/pull/9127
3 changed files with 29 additions and 52 deletions
|
@ -65,8 +65,7 @@ public:
|
|||
}
|
||||
|
||||
private:
|
||||
Optional<bool> execute(MatchInput const& input, MatchState& state, MatchOutput& output, size_t recursion_level) const;
|
||||
ALWAYS_INLINE Optional<bool> execute_low_prio_forks(MatchInput const& input, MatchState& original_state, MatchOutput& output, Vector<MatchState> states, size_t recursion_level) const;
|
||||
Optional<bool> execute(MatchInput const& input, MatchState& state, MatchOutput& output) const;
|
||||
|
||||
Regex<Parser> const* m_pattern;
|
||||
typename ParserTraits<Parser>::OptionsType const m_regex_options;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue