mirror of
https://gitlab.com/embeddable-common-lisp/ecl.git
synced 2026-01-02 07:30:55 -08:00
Local variables can be changed by a local function
This commit is contained in:
parent
f494e7140c
commit
7afef75f7f
1 changed files with 10 additions and 2 deletions
|
|
@ -54,10 +54,17 @@
|
|||
(let ((loc (var-loc var)))
|
||||
(when (var-p loc)
|
||||
(var-changed-in-forms loc forms)))
|
||||
(let ((check-specials (or (eq kind 'SPECIAL) (eq kind 'GLOBAL))))
|
||||
(let ((check-specials (or (eq kind 'SPECIAL) (eq kind 'GLOBAL)))
|
||||
(check-lexical (or (eq kind 'LEXICAL) (eq kind 'CLOSURE))))
|
||||
(dolist (form forms)
|
||||
(when (or (member var (c1form-changed-vars form))
|
||||
(and check-specials (c1form-sp-change form)))
|
||||
(and check-specials (c1form-sp-change form))
|
||||
;; They can be modified when a local function is called
|
||||
;; FIXME! We need to add a flag to the functions telling
|
||||
;; which variables they modify!
|
||||
(and check-lexical
|
||||
(member (c1form-name form)
|
||||
'(CALL-LOCAL MULTIPLE-VALUE-CALL))))
|
||||
(return t)))))))
|
||||
|
||||
;;; Valid property names for open coded functions are:
|
||||
|
|
@ -344,6 +351,7 @@
|
|||
(args (second form-args))
|
||||
ii)
|
||||
(not (and (inline-possible fname)
|
||||
(notany #'form-causes-side-effect args)
|
||||
(setq ii (get-inline-info
|
||||
fname (mapcar #'c1form-type args)
|
||||
(c1form-type form)))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue