1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-07 06:50:23 -08:00
emacs/test/lisp/emacs-lisp
Stefan Monnier 16fc5b6c0c pcase.el (\`): Try and handle large patterns better
Large backquote patterns tend to lead to very large and deeply
nested expansions, but they also tend to contain a lot of
"constant" subpatterns that can be compiled to quote patterns.
This patch does just that.  See discussion at
https://lists.gnu.org/archive/html/emacs-devel/2024-05/msg01140.html

* lisp/emacs-lisp/pcase.el (pcase--split-pred):
Improve the handling of pred-vs-quote so it also works with
quoted objects like cons cells, vectors, and strings.
Simplify the `pcase--mutually-exclusive-p` branch accordingly.
(pcase--expand-\`): New function, extracted from the \` pcase macro.
Make it recurse internally, and optimize backquote patterns to `quote`
patterns where possible.
(\`): Use it.

* test/lisp/emacs-lisp/pcase-tests.el (pcase-tests-vectors): Add tests
that were broken by a more naïve version of the optimization.
(pcase-tests-quote-optimization): New test.
2024-06-03 13:40:39 -04:00
..
bytecomp-resources Single string literal in body is return value only, not doc string 2024-03-07 13:47:53 +01:00
edebug-resources ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
eieio-tests EIEIO: Fix regession (bug#69631) 2024-03-08 11:24:18 -05:00
ert-font-lock-resources Improve ert-font-lock assertion parser (Bug#69714) 2024-03-28 11:40:27 +02:00
faceup-resources ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
faceup-tests ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
macroexp-resources Use a dedicated type to represent interpreted-function values 2024-04-28 11:58:12 -04:00
package-resources Support Python 3 in 'package-test-update-archives-async' 2024-05-11 13:06:08 +03:00
pp-resources
shadow-resources
testcover-resources ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
backquote-tests.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
backtrace-tests.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
benchmark-tests.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
bindat-tests.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
byte-run-tests.el ; Add 2024 to copyright years 2024-01-02 10:30:05 +08:00
bytecomp-tests.el Better format string compilation warning 2024-04-22 19:27:24 +02:00
cconv-tests.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
check-declare-tests.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
checkdoc-tests.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
cl-extra-tests.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
cl-generic-tests.el Merge from origin/emacs-29 2024-03-30 04:35:24 -04:00
cl-lib-tests.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
cl-macs-tests.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
cl-preloaded-tests.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
cl-print-tests.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
cl-seq-tests.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
comp-cstr-tests.el * test/lisp/emacs-lisp/comp-cstr-tests.el (comp-cstr-test-93): Add test. 2024-03-19 11:05:40 +01:00
comp-tests.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
copyright-tests.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
derived-tests.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
easy-mmode-tests.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
edebug-tests.el (edebug-tests-trivial-comma): Avoid interaction (bug#69406) 2024-02-26 12:33:35 -05:00
ert-font-lock-tests.el Fix symbol list matching regexps. 2024-04-01 11:13:12 +02:00
ert-tests.el Fix ert-tests.el for the new handler-bind code 2024-01-04 16:34:13 -05:00
ert-x-tests.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
find-func-tests.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
float-sup-tests.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
generator-tests.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
gv-tests.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
hierarchy-tests.el ; hierarchy-tests.el: keep doc string within 80 columns 2024-01-31 17:55:53 +01:00
icons-tests.el ; Fix typos 2024-05-27 10:11:15 +02:00
let-alist-tests.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
lisp-mnt-tests.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
lisp-mode-tests.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
lisp-tests.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
macroexp-tests.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
map-tests.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
memory-report-tests.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
multisession-tests.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
nadvice-tests.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
oclosure-tests.el oclosure-tests.el: Adjust to new interpreted-function type 2024-04-29 13:35:12 -04:00
package-tests.el Support Python 3 in 'package-test-update-archives-async' 2024-05-11 13:06:08 +03:00
pcase-tests.el pcase.el (\`): Try and handle large patterns better 2024-06-03 13:40:39 -04:00
pp-tests.el pp.el: Try and fix bug#70039 2024-03-28 15:31:04 -04:00
range-tests.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
regexp-opt-tests.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
ring-tests.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
rmc-tests.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
rx-tests.el Declare the variable rx-constituents obsolete. 2024-04-29 14:29:53 +02:00
seq-tests.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
shadow-tests.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
shortdoc-tests.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
subr-x-tests.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
syntax-tests.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
tabulated-list-tests.el Add tabulated-list-groups and Buffer-menu-group-by (bug#69305) 2024-02-29 19:50:04 +02:00
testcover-tests.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
text-property-search-tests.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
thunk-tests.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
timer-tests.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
track-changes-tests.el lisp/emacs-lisp/track-changes.el: New file (bug#70077) 2024-04-13 09:43:11 -04:00
unsafep-tests.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
vtable-tests.el Make 'vtable-insert-object' more versatile 2024-05-18 11:52:33 +03:00
warnings-tests.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00