]> git.eshelyaron.com Git - emacs.git/commit
regex.c: Fix recent regression with mutually_exclusive_p
authorStefan Monnier <monnier@iro.umontreal.ca>
Tue, 3 Oct 2023 14:10:57 +0000 (10:10 -0400)
committerStefan Monnier <monnier@iro.umontreal.ca>
Tue, 3 Oct 2023 14:10:57 +0000 (10:10 -0400)
commit37130fd500fbf78ff0d0037aa6275f0f70a415dd
treeb17e7bc371bfff085b5edc2db2344f83d943d577
parent849de5aa1a42cae6ae1504804acf0c7fb8b13860
regex.c: Fix recent regression with mutually_exclusive_p

The new analysis code ended up increasing the scope of an optimization
a bit too far.  Reign it in.

* src/regex-emacs.c (struct mutexcl_data): Add `unconstrained` field.
(mutually_exclusive_one): Use and set it.
(mutually_exclusive_p): Initialize it.

* test/src/regex-emacs-tests.el (regexp-tests-backtrack-optimization):
Add test.
src/regex-emacs.c
test/src/regex-emacs-tests.el