1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-27 07:41:28 -08:00
emacs/test/lisp
Stefan Monnier 29c7f8c915 * lisp/emacs-lisp/cl-macs.el: Optimize self-calls in tail position
Implement a limited form of tail-call optimization for the special
case of recursive functions defined with `cl-labels`.  Only self-recursion
is optimized, no attempt is made to handle more complex cases such a mutual
recursion.

The main benefit is to reduce the use of the stack, tho in my limited
tests, this can also improve performance (about half of the way to
a hand-written `while` loop).

(cl--self-tco): New function.
(cl-labels): Use it.

* lisp/subr.el (letrec): Optimize single-binding corner case.

* test/lisp/emacs-lisp/cl-macs-tests.el (cl-macs--labels): Add tests
to check that TCO is working.
2021-01-08 19:59:31 -05:00
..
align-resources Add some tests for align.el 2020-12-29 08:38:25 +01:00
bookmark-resources Add ability to mark/unmark/delete all bookmarks 2020-08-09 15:13:05 -05:00
calc Update copyright year to 2021 2021-01-01 01:13:56 -08:00
calendar Update copyright year to 2021 2021-01-01 01:13:56 -08:00
cedet Merge from origin/emacs-27 2021-01-01 01:28:16 -08:00
custom-resources Use lexical-binding in most remaining tests 2020-05-01 13:05:26 +02:00
emacs-lisp * lisp/emacs-lisp/cl-macs.el: Optimize self-calls in tail position 2021-01-08 19:59:31 -05:00
emulation Update copyright year to 2021 2021-01-01 01:13:56 -08:00
epg-resources Move epg.el test data to follow our conventions 2020-10-24 02:36:55 +02:00
erc Update copyright year to 2021 2021-01-01 01:13:56 -08:00
eshell Update copyright year to 2021 2021-01-01 01:13:56 -08:00
faces-resources Update copyright year to 2021 2021-01-01 01:13:56 -08:00
files-resources Move some test data to follow our conventions 2020-10-23 16:29:46 +02:00
gnus Add work-around for nnmaildir encoding problem 2021-01-07 15:12:23 +01:00
hfy-cmap-resources * test/lisp/hfy-cmap-resources/rgb.txt: Add comment line. 2020-11-12 03:20:39 +01:00
image Update copyright year to 2021 2021-01-01 01:13:56 -08:00
international Update copyright year to 2021 2021-01-01 01:13:56 -08:00
mail Update copyright year to 2021 2021-01-01 01:13:56 -08:00
minibuffer-resources Move more test data to follow our conventions 2020-10-23 21:07:26 +02:00
net * test/lisp/net/tramp-tests.el (tramp-test31-interrupt-process): 2021-01-08 09:58:31 +01:00
nxml Update copyright year to 2021 2021-01-01 01:13:56 -08:00
obsolete Update copyright year to 2021 2021-01-01 01:13:56 -08:00
org Update copyright year to 2021 2021-01-01 01:13:56 -08:00
pcmpl-linux-resources Use lexical-binding in pcmpl-linux.el and add tests 2020-09-02 12:53:02 +02:00
play Update copyright year to 2021 2021-01-01 01:13:56 -08:00
progmodes Fix some failing tests in BSD systems 2021-01-06 23:07:22 +02:00
saveplace-resources Use lexical-binding in saveplace.el and add tests 2020-08-08 01:40:38 +02:00
so-long-tests Update copyright year to 2021 2021-01-01 01:13:56 -08:00
term Update copyright year to 2021 2021-01-01 01:13:56 -08:00
textmodes Revert mark-paragraph change and add tests 2021-01-07 13:08:52 +01:00
time-resources Add missed file needed by time-tests.el 2020-10-22 18:51:00 +02:00
url Update copyright year to 2021 2021-01-01 01:13:56 -08:00
vc Update copyright year to 2021 2021-01-01 01:13:56 -08:00
xdg-resources Move more test data to follow our conventions 2020-10-23 21:07:26 +02:00
abbrev-tests.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
align-tests.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
allout-tests.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
allout-widgets-tests.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
ansi-color-tests.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
apropos-tests.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
arc-mode-tests.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
auth-source-pass-tests.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
auth-source-tests.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
autoinsert-tests.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
autorevert-tests.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
battery-tests.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
bookmark-tests.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
buff-menu-tests.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
button-tests.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
char-fold-tests.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
color-tests.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
comint-tests.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
completion-tests.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
cus-edit-tests.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
custom-tests.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
dabbrev-tests.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
delim-col-tests.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
descr-text-tests.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
dired-aux-tests.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
dired-tests.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
dired-x-tests.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
dom-tests.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
electric-tests.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
elide-head-tests.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
epg-tests.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
faces-tests.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
ffap-tests.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
filenotify-tests.el * test/lisp/filenotify-tests.el (file-notify-test07-many-events-remote): 2021-01-07 16:43:27 +01:00
files-tests.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
files-x-tests.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
font-lock-tests.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
format-spec-tests.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
help-fns-tests.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
help-mode-tests.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
help-tests.el Update a substitute-command-keys test 2021-01-06 17:19:17 -08:00
hfy-cmap-tests.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
hi-lock-tests.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
htmlfontify-tests.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
ibuffer-tests.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
ido-tests.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
image-file-tests.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
image-tests.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
imenu-tests.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
info-xref-tests.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
isearch-tests.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
jit-lock-tests.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
json-tests.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
jsonrpc-tests.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
kmacro-tests.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
ls-lisp-tests.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
makesum-tests.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
man-tests.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
md4-tests.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
minibuffer-tests.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
misc-tests.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
mouse-tests.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
mwheel-tests.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
obarray-tests.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
paren-tests.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
password-cache-tests.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
pcmpl-linux-tests.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
ps-print-tests.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
register-tests.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
replace-tests.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
rot13-tests.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
saveplace-tests.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
scroll-lock-tests.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
ses-tests.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
shadowfile-tests.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
shell-tests.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
simple-tests.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
sort-tests.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
soundex-tests.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
startup-tests.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
subr-tests.el * lisp/subr.el (letrec): Optimize some non-recursive bindings 2021-01-08 18:44:13 -05:00
tabify-tests.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
tar-mode-tests.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
tempo-tests.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
term-tests.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
thingatpt-tests.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
thread-tests.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
time-stamp-tests.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
time-tests.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
timezone-tests.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
version-tests.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
wdired-tests.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
whitespace-tests.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
wid-edit-tests.el Don't skip widgets when moving backward 2021-01-04 10:02:20 -03:00
xdg-tests.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
xml-tests.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
xt-mouse-tests.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00