]> git.eshelyaron.com Git - emacs.git/commit
* src/regex-emacs.c (analyze_first): Fix incorrect optimization
authorStefan Monnier <monnier@iro.umontreal.ca>
Wed, 27 Sep 2023 17:29:50 +0000 (13:29 -0400)
committerStefan Monnier <monnier@iro.umontreal.ca>
Wed, 27 Sep 2023 17:29:50 +0000 (13:29 -0400)
commitbc52fdd1d153b36a9da74d7aa7f1e6150ff6b2eb
treea302e300d15378c840b9eab4f49861c375dd52f7
parent9a67540e51edca00b17de639af18989f9ecc9be9
* src/regex-emacs.c (analyze_first): Fix incorrect optimization

The optimization was incorrect in a particular corner case.
In this fix I just disable it conservatively for more cases because
it's not obvious how to fix it while preserving the "good" cases.

We may find a better fix by using an approach like the one
in `mutually_exhaustive_aux`, but for now this is good enough,
especially since \{..\} repetitions are not used very frequently.

* test/src/regex-resources/PTESTS: New test.
src/regex-emacs.c
test/src/regex-resources/PTESTS