1
0
Fork 0
mirror of https://github.com/LadybirdBrowser/ladybird.git synced 2025-06-08 05:27:14 +09:00

LibRegex: Use an interned string table for capture group names

This avoids messing around with unsafe string pointers and removes the
only non-FlyString-able user of DeprecatedFlyString.
This commit is contained in:
Ali Mohammad Pur 2025-04-01 16:49:07 +02:00 committed by Andreas Kling
parent 6bb0d585e3
commit 4136d8d13e
Notes: github-actions[bot] 2025-04-02 09:44:16 +00:00
6 changed files with 103 additions and 24 deletions

View file

@ -999,6 +999,8 @@ void Optimizer::append_alternation(ByteCode& target, Span<ByteCode> alternatives
if (alternatives.size() == 0)
return;
target.merge_string_tables_from(alternatives);
if (alternatives.size() == 1)
return target.extend(move(alternatives[0]));