mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-26 01:35:08 +02:00
LibJS: Don't rerun regexp optimizer every time a regexp literal is used
This commit is contained in:
committed by
Andreas Kling
parent
646edbdd65
commit
82fe962d96
Notes:
github-actions[bot]
2025-12-12 17:45:04 +00:00
Author: https://github.com/awesomekling Commit: https://github.com/LadybirdBrowser/ladybird/commit/82fe962d967 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/7111
@@ -9,6 +9,7 @@
|
||||
#include <AK/DistinctNumeric.h>
|
||||
#include <AK/String.h>
|
||||
#include <AK/Vector.h>
|
||||
#include <LibRegex/Regex.h>
|
||||
#include <LibRegex/RegexParser.h>
|
||||
|
||||
namespace JS::Bytecode {
|
||||
@@ -29,12 +30,12 @@ public:
|
||||
RegexTable() = default;
|
||||
|
||||
RegexTableIndex insert(ParsedRegex);
|
||||
ParsedRegex const& get(RegexTableIndex) const;
|
||||
Regex<ECMA262> const& get(RegexTableIndex) const;
|
||||
void dump() const;
|
||||
bool is_empty() const { return m_regexes.is_empty(); }
|
||||
|
||||
private:
|
||||
Vector<ParsedRegex> m_regexes;
|
||||
Vector<Regex<ECMA262>> m_regexes;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user