Skip to content

Commit

Permalink
tracks-demo: Don't redefine do-pages if it exists.
Browse files Browse the repository at this point in the history
  • Loading branch information
Andreas Franke committed Sep 27, 2024
1 parent 0c7c0d0 commit 503c874
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions tracks-demo.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,13 @@
(defun page-bits-to-kind (bits)
(cdr (assoc (logand bits 7) +page-bits-to-kind+)))

(defmacro do-pages ((i page) &body body)
(let ((total-pages (gensym "TOTAL-PAGES")))
`(let ((,total-pages sb-vm:next-free-page))
(dotimes (,i ,total-pages)
(let ((,page (deref page-table ,i)))
,@body)))))
(unless (fboundp 'do-pages)
(defmacro do-pages ((i page) &body body)
(let ((total-pages (gensym "TOTAL-PAGES")))
`(let ((,total-pages sb-vm:next-free-page))
(dotimes (,i ,total-pages)
(let ((,page (deref page-table ,i)))
,@body))))))

(defparameter *dynamic-col-keys*
#(((:boxed) "Boxed")
Expand Down

0 comments on commit 503c874

Please sign in to comment.