]> git.eshelyaron.com Git - emacs.git/commit
With `native-compile', compile lambdas in a defun or lambda too
authorAlan Mackenzie <acm@muc.de>
Wed, 8 Nov 2023 20:49:48 +0000 (20:49 +0000)
committerAlan Mackenzie <acm@muc.de>
Wed, 8 Nov 2023 20:49:48 +0000 (20:49 +0000)
commit06e4ebc81a44c709b08ce72c746629c6c77e6f6e
tree446db534f18b702256c39d2ce2001294d326ca34
parentbf9cbc2354124a1e9eb3327007468ba384ba2945
With `native-compile', compile lambdas in a defun or lambda too

This fixes bug#64646.  Also refactor two functions to reduce
code duplication.

* lisp/emacs-lisp/comp.el (comp-spill-lap-function/symbol)
(comp-spill-lap-function/list): Add all functions found by the
byte compiler (including lambdas) to the native compiler's
context, thus making them be native compiled.  Refactor to use
comp-intern-func-in-ctxt.  Make comp-spill-lap-function/list
also compile closures.

* test/src/comp-resources/comp-test-funcs.el
(comp-tests-lambda-return-f2): New function

* test/src/comp-tests.el (comp-test-lambda-return2)
(comp-tests-free-fun-f2): New functions to test that internal
lambdas get native compiled.
lisp/emacs-lisp/comp.el
test/src/comp-resources/comp-test-funcs.el
test/src/comp-tests.el