mirror of
https://gitlab.com/embeddable-common-lisp/ecl.git
synced 2026-01-16 14:21:48 -08:00
In LOOP, propagate the unsafe declarations to the whole assignment.
This commit is contained in:
parent
ca0222fd19
commit
031e657d11
1 changed files with 8 additions and 0 deletions
|
|
@ -565,6 +565,14 @@ a LET-like macro, and a SETQ-like macro, which perform LOOP-style destructuring.
|
|||
(do ((tail var)) ((not (consp tail)) tail)
|
||||
(when (find-non-null (pop tail)) (return t))))
|
||||
(loop-desetq-internal (var val &optional temp)
|
||||
;; if the value is declared 'unsafe', then the assignemnt
|
||||
;; is also unsafe.
|
||||
(when (and (consp val)
|
||||
(eq (first val) 'LOOP-UNSAFE))
|
||||
(let ((forms (rest val)))
|
||||
(setf forms (if (rest forms) `(progn ,@forms) (first forms)))
|
||||
(return-from loop-desetq-internal
|
||||
`((LOOP-UNSAFE ,@(loop-desetq-internal var forms))))))
|
||||
;; returns a list of actions to be performed
|
||||
(typecase var
|
||||
(null
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue