X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcode%2Fdefboot.lisp;h=ccc2c4b0e8020fd7b51a2edef542da355f0eef01;hb=ea36d3d79b9dfe3598faca5e267efd5980b94d4a;hp=f91b7909a73bdd69a5be7cf9050cf77deb2534ea;hpb=3bd7a97d1b11a2b0aee086ef211cae807f3dfc35;p=sbcl.git diff --git a/src/code/defboot.lisp b/src/code/defboot.lisp index f91b790..ccc2c4b 100644 --- a/src/code/defboot.lisp +++ b/src/code/defboot.lisp @@ -264,12 +264,13 @@ allowing RETURN to be used as an laternate exit mechanism." (do-do-body varlist endlist body 'let* 'setq 'do* nil)) -;;; DOTIMES and DOLIST could be defined more concisely using destructuring -;;; macro lambda lists or DESTRUCTURING-BIND, but then it'd be tricky to use -;;; them before those things were defined. They're used enough times before -;;; destructuring mechanisms are defined that it looks as though it's worth -;;; just implementing them ASAP, at the cost of being unable to use the -;;; standard destructuring mechanisms. +;;; DOTIMES and DOLIST could be defined more concisely using +;;; destructuring macro lambda lists or DESTRUCTURING-BIND, but then +;;; it'd be tricky to use them before those things were defined. +;;; They're used enough times before destructuring mechanisms are +;;; defined that it looks as though it's worth just implementing them +;;; ASAP, at the cost of being unable to use the standard +;;; destructuring mechanisms. (defmacro-mundanely dotimes (var-count-result &body body) (multiple-value-bind ; to roll our own destructuring (var count result) @@ -292,13 +293,14 @@ (apply (lambda (var list &optional (result nil)) (values var list result)) var-list-result) - ;; We repeatedly bind the var instead of setting it so that we never have - ;; to give the var an arbitrary value such as NIL (which might conflict - ;; with a declaration). If there is a result form, we introduce a - ;; gratuitous binding of the variable to NIL w/o the declarations, then - ;; evaluate the result form in that environment. We spuriously reference - ;; the gratuitous variable, since we don't want to use IGNORABLE on what - ;; might be a special var. + ;; We repeatedly bind the var instead of setting it so that we + ;; never have to give the var an arbitrary value such as NIL + ;; (which might conflict with a declaration). If there is a result + ;; form, we introduce a gratuitous binding of the variable to NIL + ;; without the declarations, then evaluate the result form in that + ;; environment. We spuriously reference the gratuitous variable, + ;; since we don't want to use IGNORABLE on what might be a special + ;; var. (let ((n-list (gensym))) `(do ((,n-list ,list (cdr ,n-list))) ((endp ,n-list)