1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-07 06:50:23 -08:00

Run cconv for dynbound code as well

Make cconv work for dynamically bound code and always run it.
This allows later stages to benefit from transformations and
normalisations in cconv.

* lisp/emacs-lisp/bytecomp.el (byte-compile-preprocess): Always run
cconv.
* lisp/emacs-lisp/cconv.el (cconv--analyze-function)
(cconv-analyze-form): In dynbound code, treat all variable bindings
as dynamic (lambda, let, let* and condition-case).
This commit is contained in:
Mattias Engdegård 2022-06-14 19:09:20 +02:00
parent 6825e5686a
commit d6600481ae
2 changed files with 17 additions and 16 deletions

View file

@ -2557,9 +2557,7 @@ list that represents a doc string reference.
;; macroexpand-all.
;; (if (memq byte-optimize '(t source))
;; (setq form (byte-optimize-form form for-effect)))
(cond
(lexical-binding (cconv-closure-convert form))
(t form)))
(cconv-closure-convert form))
;; byte-hunk-handlers cannot call this!
(defun byte-compile-toplevel-file-form (top-level-form)