From: Alan Mackenzie Date: Wed, 30 Aug 2023 13:53:24 +0000 (+0000) Subject: Merge branch 'master' into feature/named-lambdas X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=db8090ebf1b09dfb66139f5722518f03a5ba09ee;p=emacs.git Merge branch 'master' into feature/named-lambdas --- db8090ebf1b09dfb66139f5722518f03a5ba09ee diff --cc lisp/emacs-lisp/comp.el index 375f003592c,ad0077dadda..b8b086b6c16 --- a/lisp/emacs-lisp/comp.el +++ b/lisp/emacs-lisp/comp.el @@@ -1304,16 -1318,26 +1321,28 @@@ clashes. (make-temp-file (comp-c-func-name function-name "freefn-") nil ".eln"))) (let* ((f (symbol-function function-name)) + (byte-code (byte-compile function-name)) (c-name (comp-c-func-name function-name "F")) - (func (make-comp-func-l :name function-name - :c-name c-name - :doc (documentation f t) - :int-spec (interactive-form f) - :command-modes (command-modes f) - :speed (comp-spill-speed function-name) - :pure (comp-spill-decl-spec function-name - 'pure) - :defining-symbol function-name))) + (func + (if (comp-lex-byte-func-p byte-code) + (make-comp-func-l :name function-name + :c-name c-name + :doc (documentation f t) + :int-spec (interactive-form f) + :command-modes (command-modes f) + :speed (comp-spill-speed function-name) + :pure (comp-spill-decl-spec function-name - 'pure)) ++ 'pure) ++ :defining-symbol function-name) + (make-comp-func-d :name function-name + :c-name c-name + :doc (documentation f t) + :int-spec (interactive-form f) + :command-modes (command-modes f) + :speed (comp-spill-speed function-name) + :pure (comp-spill-decl-spec function-name - 'pure))))) ++ 'pure) ++ :defining-symbol function-name)))) (when (byte-code-function-p f) (signal 'native-compiler-error '("can't native compile an already byte-compiled function")))