mirror of
https://gitlab.com/embeddable-common-lisp/ecl.git
synced 2026-03-15 09:20:23 -07:00
DECLAIM + SPECIAL did not work because ECL was not looking for special declarations in the compiler environment.
This commit is contained in:
parent
557474044f
commit
c8c36d32b9
2 changed files with 7 additions and 3 deletions
|
|
@ -25,12 +25,12 @@
|
|||
(loop for name in specials
|
||||
unless (assoc name types)
|
||||
do (let ((v (c1make-global-variable name :kind 'special)))
|
||||
(setf env (cmp-env-register-var v env))))
|
||||
(setf env (cmp-env-register-var v env nil))))
|
||||
(loop for (name . type) in types
|
||||
for specialp = (or (sys:specialp name) (member name specials))
|
||||
for kind = (if specialp 'SPECIAL 'GLOBAL)
|
||||
for v = (c1make-global-variable name :type type :kind kind)
|
||||
do (setf env (cmp-env-register-var v env)))
|
||||
do (setf env (cmp-env-register-var v env nil)))
|
||||
env))
|
||||
(multiple-value-bind (body specials types ignored others doc all)
|
||||
(c1body `((DECLARE ,@args)) nil)
|
||||
|
|
|
|||
|
|
@ -101,7 +101,11 @@
|
|||
;;; value.
|
||||
|
||||
(defun check-global (name)
|
||||
(member name *global-vars* :test #'eq :key #'var-name))
|
||||
(or (member name *global-vars* :test #'eq :key #'var-name)
|
||||
(let ((v (cmp-env-search-var name)))
|
||||
;; Fixme! Revise the declamation code to ensure whether
|
||||
;; we also have to consider 'GLOBAL here.
|
||||
(and v (eq (var-kind v) 'SPECIAL)))))
|
||||
|
||||
;;;
|
||||
;;; Check if the symbol has a symbol macro
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue