mirror of
https://gitlab.com/embeddable-common-lisp/ecl.git
synced 2026-01-17 14:51:20 -08:00
Do not complain when a global function is closed over.
This commit is contained in:
parent
6b1e70042e
commit
7f52387b73
4 changed files with 12 additions and 12 deletions
|
|
@ -141,8 +141,8 @@
|
|||
;; All external, non-global variables become of type closure
|
||||
(when (eq new-type 'CLOSURE)
|
||||
(when (fun-global fun)
|
||||
(cmperr "Function ~A is global but is closed over some variables.~%~{~A ~}"
|
||||
(fun-name fun) (mapcar #'var-name (fun-referred-vars fun))))
|
||||
(cmpnote "Function ~A is global but is closed over some variables.~%~{~A ~}"
|
||||
(fun-name fun) (mapcar #'var-name (fun-referred-vars fun))))
|
||||
(dolist (var (fun-referred-local-vars fun))
|
||||
(setf (var-ref-clb var) nil
|
||||
(var-ref-ccb var) t
|
||||
|
|
|
|||
|
|
@ -138,10 +138,10 @@ The function thus belongs to the type of functions that ecl_make_cfun accepts."
|
|||
(setf finish nil))))
|
||||
(compute-fun-closure-type fun)
|
||||
(when global
|
||||
(when (fun-closure fun)
|
||||
(cmperr "Function ~A is global but is closed over some variables.~%~{~A ~}"
|
||||
(fun-name fun) (mapcar #'var-name (fun-referred-vars fun))))
|
||||
(new-defun fun (fun-no-entry fun))))
|
||||
(if (fun-closure fun)
|
||||
(cmpnote "Function ~A is global but is closed over some variables.~%~{~A ~}"
|
||||
(fun-name fun) (mapcar #'var-name (fun-referred-vars fun)))
|
||||
(new-defun fun (fun-no-entry fun)))))
|
||||
fun)
|
||||
|
||||
(defun cmp-process-lambda-list (list)
|
||||
|
|
|
|||
|
|
@ -174,8 +174,8 @@
|
|||
;; All external, non-global variables become of type closure
|
||||
(when (eq new-type 'CLOSURE)
|
||||
(when (fun-global fun)
|
||||
(cmperr "Function ~A is global but is closed over some variables.~%~{~A ~}"
|
||||
(fun-name fun) (mapcar #'var-name (fun-referred-vars fun))))
|
||||
(cmpnote "Function ~A is global but is closed over some variables.~%~{~A ~}"
|
||||
(fun-name fun) (mapcar #'var-name (fun-referred-vars fun))))
|
||||
(dolist (var (fun-referred-local-vars fun))
|
||||
(setf (var-ref-clb var) nil
|
||||
(var-ref-ccb var) t
|
||||
|
|
|
|||
|
|
@ -141,10 +141,10 @@
|
|||
(setf finish nil))))
|
||||
(compute-fun-closure-type fun)
|
||||
(when (fun-global fun)
|
||||
(when (fun-closure fun)
|
||||
(cmperr "Function ~A is global but is closed over some variables.~%~{~A ~}"
|
||||
(fun-name fun) (mapcar #'var-name (fun-referred-vars fun))))
|
||||
(new-defun fun (fun-no-entry fun)))))
|
||||
(if (fun-closure fun)
|
||||
(cmpnote "Function ~A is global but is closed over some variables.~%~{~A ~}"
|
||||
(fun-name fun) (mapcar #'var-name (fun-referred-vars fun)))
|
||||
(new-defun fun (fun-no-entry fun))))))
|
||||
|
||||
|
||||
(defun c1lambda-expr (fun lambda-expr CB/LB
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue