mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2024-11-26 07:33:47 +00:00
Make lambda-lifting work again
* lisp/emacs-lisp/cconv.el (cconv--analyze-use): Fix typo. * test/lisp/emacs-lisp/cconv-tests.el (cconv-convert-lambda-lifted): Add test case.
This commit is contained in:
parent
1ff46018f6
commit
1362a9fec4
@ -612,7 +612,7 @@ FORM is the parent form that binds this var."
|
||||
(push (cons (cons binder form) :captured+mutated)
|
||||
cconv-var-classification))
|
||||
(`(,(and binder `(,_ (function (lambda . ,_)))) nil nil nil t)
|
||||
(push (cons (cons binder form) :lambda-candidates)
|
||||
(push (cons (cons binder form) :lambda-candidate)
|
||||
cconv-var-classification))))
|
||||
|
||||
(defun cconv--analyze-function (args body env parentform)
|
||||
|
@ -182,7 +182,14 @@
|
||||
(should (eq (cconv-tests-cl-defsubst) 'cl-defsubst-result)))
|
||||
|
||||
(ert-deftest cconv-convert-lambda-lifted ()
|
||||
"Bug#30872."
|
||||
;; Verify that lambda-lifting is actually performed at all.
|
||||
(should (equal (cconv-closure-convert
|
||||
'#'(lambda (x) (let ((f #'(lambda () (+ x 1))))
|
||||
(funcall f))))
|
||||
'#'(lambda (x) (let ((f #'(lambda (x) (+ x 1))))
|
||||
(funcall f x)))))
|
||||
|
||||
;; Bug#30872.
|
||||
(should
|
||||
(equal (funcall
|
||||
(byte-compile
|
||||
|
Loading…
Reference in New Issue
Block a user