]> git.eshelyaron.com Git - emacs.git/commit
regex-emacs.c: Reduce the use of backtracking a bit further
authorStefan Monnier <monnier@iro.umontreal.ca>
Tue, 21 Feb 2023 02:22:41 +0000 (21:22 -0500)
committerStefan Monnier <monnier@iro.umontreal.ca>
Tue, 21 Feb 2023 02:22:41 +0000 (21:22 -0500)
commit5a864f23eb8a36ef435136c5b41cb01b875df399
treecc7b6d2ebd44f079f0f1a2ce99783a72bcba0eaf
parente83c78b8c7784254c2c6f043530ab325c2fa7f16
regex-emacs.c: Reduce the use of backtracking a bit further

bug#61514 exhibited some undesirable backtracking in a case where
it's easy to avoid it by making `mutually_exclusive_p` just a bit
more careful.

* src/regex-emacs.c (mutually_exclusive_p): Handle `on_failure_jump`s.

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