summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/bytecomp.el
diff options
context:
space:
mode:
authorMattias EngdegÄrd <mattiase@acm.org>2022-06-06 11:10:05 +0200
committerMattias EngdegÄrd <mattiase@acm.org>2022-06-14 20:19:59 +0200
commit1ac74e28622e3ebbe76daf84f0a6f310a8ea3c45 (patch)
tree964a6252a41b5506d88910886067d606c5759900 /lisp/emacs-lisp/bytecomp.el
parentd6600481ae9423eb2c51150967050afb05c301b8 (diff)
downloademacs-1ac74e28622e3ebbe76daf84f0a6f310a8ea3c45.tar.gz
emacs-1ac74e28622e3ebbe76daf84f0a6f310a8ea3c45.tar.bz2
emacs-1ac74e28622e3ebbe76daf84f0a6f310a8ea3c45.zip
Simplify byte-compiler assuming cconv normalisations
* lisp/emacs-lisp/byte-opt.el (byte-optimize-form-code-walker) (byte-optimize-let-form, byte-optimize-letX): * lisp/emacs-lisp/bytecomp.el (byte-compile-unwind-protect): Simplify source optimisation and codegen code that can now rely on normalised let/let* and unwind-protect forms.
Diffstat (limited to 'lisp/emacs-lisp/bytecomp.el')
-rw-r--r--lisp/emacs-lisp/bytecomp.el7
1 files changed, 2 insertions, 5 deletions
diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el
index af74c0699b9..d28ec0be16d 100644
--- a/lisp/emacs-lisp/bytecomp.el
+++ b/lisp/emacs-lisp/bytecomp.el
@@ -4806,11 +4806,8 @@ binding slots have been popped."
(byte-compile-out-tag endtag)))
(defun byte-compile-unwind-protect (form)
- (pcase (cddr form)
- (`(:fun-body ,f)
- (byte-compile-form f))
- (handlers
- (byte-compile-form `#'(lambda () ,@handlers))))
+ (cl-assert (eq (caddr form) :fun-body))
+ (byte-compile-form (nth 3 form))
(byte-compile-out 'byte-unwind-protect 0)
(byte-compile-form-do-effect (car (cdr form)))
(byte-compile-out 'byte-unbind 1))