mirror of
https://gitlab.com/embeddable-common-lisp/ecl.git
synced 2026-01-25 05:51:55 -08:00
cmp: fix inlining of local closures
We have to compile the function expression in the environment in which it was defined. Fixes #577.
This commit is contained in:
parent
fc5a9ad58c
commit
58f17f6c66
1 changed files with 3 additions and 2 deletions
|
|
@ -104,8 +104,9 @@
|
||||||
(declared-inline-p fname)
|
(declared-inline-p fname)
|
||||||
(plusp *inline-max-depth*))
|
(plusp *inline-max-depth*))
|
||||||
(return-from c1call-local
|
(return-from c1call-local
|
||||||
(let ((*inline-max-depth* (1- *inline-max-depth*)))
|
(let ((*inline-max-depth* (1- *inline-max-depth*))
|
||||||
`(funcall #',lambda ,@args)))))
|
(*cmp-env* (fun-cmp-env fun)))
|
||||||
|
(c1expr `(funcall #',lambda ,@args))))))
|
||||||
(let* ((forms (c1args* args))
|
(let* ((forms (c1args* args))
|
||||||
(return-type (or (get-local-return-type fun) 'T))
|
(return-type (or (get-local-return-type fun) 'T))
|
||||||
(arg-types (get-local-arg-types fun)))
|
(arg-types (get-local-arg-types fun)))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue