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

LibRegex: Don't immediately ignore TempInverse in optimizer

fe46b2c141 added the reset-temp-inverse flag, but set it up so all
tempinverse ops were negated at the start of the next op; this commit
makes it so these flags actually persist for one op and not zero.

Fixes #2296.
This commit is contained in:
Ali Mohammad Pur 2024-11-17 12:48:47 +01:00 committed by Tim Flynn
parent 69c84d3f63
commit 00bc22c332
Notes: github-actions[bot] 2024-11-17 14:04:21 +00:00
2 changed files with 4 additions and 2 deletions

View file

@ -227,7 +227,7 @@ static bool has_overlap(Vector<CompareTypeAndValuePair> const& lhs, Vector<Compa
break;
case CharacterCompareType::TemporaryInverse:
temporary_inverse = true;
reset_temporary_inverse = true;
reset_temporary_inverse = false;
break;
case CharacterCompareType::AnyChar:
// Special case: if not inverted, AnyChar is always in the range.
@ -349,7 +349,7 @@ static bool has_overlap(Vector<CompareTypeAndValuePair> const& lhs, Vector<Compa
break;
case CharacterCompareType::TemporaryInverse:
temporary_inverse = true;
reset_temporary_inverse = true;
reset_temporary_inverse = false;
break;
case CharacterCompareType::AnyChar:
// Special case: if not inverted, AnyChar is always in the range.