diff options
| author | Stefan Monnier | 2023-09-15 14:44:59 -0400 |
|---|---|---|
| committer | Stefan Monnier | 2023-09-15 14:53:24 -0400 |
| commit | e7e925f062f8d50375daa40ad7981c6d44cd7f05 (patch) | |
| tree | 8be3c2e7de3a432c72dc55ab89c24b3e23f2ab4e /test/src | |
| parent | 9610aaeb9e5f3d572616f0742fca2f5e5abc141d (diff) | |
| download | emacs-e7e925f062f8d50375daa40ad7981c6d44cd7f05.tar.gz emacs-e7e925f062f8d50375daa40ad7981c6d44cd7f05.zip | |
(mutually_exclusive_p): Fix the regression from commit 6fad73d7cc53
Commit 6fad73d7cc53 throws away some useful optimization because
it misfired in some cases (as seen in bug#657260). Here we try to
recover those useful optimizations with a slightly more careful
algorithm.
* src/regex-emacs.c (mutually_exclusive_aux): Rename from
`mutually_exclusive_p`. Add two new args. Improve the
case where we need to recurse.
(mutually_exclusive_p): New function defined on top of it.
* test/src/regex-emacs-tests.el (regexp-tests-backtrack-optimization):
Re-enable the test.
Diffstat (limited to 'test/src')
| -rw-r--r-- | test/src/regex-emacs-tests.el | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/test/src/regex-emacs-tests.el b/test/src/regex-emacs-tests.el index ed0dc4c5a9d..f2bee713864 100644 --- a/test/src/regex-emacs-tests.el +++ b/test/src/regex-emacs-tests.el | |||
| @@ -873,7 +873,6 @@ This evaluates the TESTS test cases from glibc." | |||
| 873 | (should (equal (string-match "\\`a\\{2\\}*\\'" "a") nil))) | 873 | (should (equal (string-match "\\`a\\{2\\}*\\'" "a") nil))) |
| 874 | 874 | ||
| 875 | (ert-deftest regexp-tests-backtrack-optimization () ;bug#61514 | 875 | (ert-deftest regexp-tests-backtrack-optimization () ;bug#61514 |
| 876 | :expected-result :failed | ||
| 877 | ;; Make sure we don't use up the regexp stack needlessly. | 876 | ;; Make sure we don't use up the regexp stack needlessly. |
| 878 | (with-current-buffer (get-buffer-create "*bug*") | 877 | (with-current-buffer (get-buffer-create "*bug*") |
| 879 | (erase-buffer) | 878 | (erase-buffer) |