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)
|
||||
(plusp *inline-max-depth*))
|
||||
(return-from c1call-local
|
||||
(let ((*inline-max-depth* (1- *inline-max-depth*)))
|
||||
`(funcall #',lambda ,@args)))))
|
||||
(let ((*inline-max-depth* (1- *inline-max-depth*))
|
||||
(*cmp-env* (fun-cmp-env fun)))
|
||||
(c1expr `(funcall #',lambda ,@args))))))
|
||||
(let* ((forms (c1args* args))
|
||||
(return-type (or (get-local-return-type fun) 'T))
|
||||
(arg-types (get-local-arg-types fun)))
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue