[developers] [spr31181] closure change in ACL 8.0 (from 6.2)?
David Margolies
dm at franz.com
Wed Feb 22 22:07:29 CET 2006
i attach two files: `test.lisp' and `test.log', of which the latter is
dribble-bug() output from compiling, loading, and running the piece of
code that used to work and no longer does in ACL 8.0.
(in-package :cl-user)
(eval-when (:load-toplevel :compile-toplevel :execute)
(let ((n -1))
(defun reset-failure-count ()
(setf n -1))
(defstruct failure
(id (incf n))
nature type1 type2 glb path suffix context)))
(defun test ()
(make-failure))
Okay, I have reproduced the behavior in 8.0 (and the success in 7.0).
I cannot see any specific change in the relevant code, but it had
vaious minor modifications. (That is, nothing is notated as 'fixing
eval-when problem ...' Presumably something changed the behavior,
hoever, but that may have been a side effect of some other change.)
As to what should happen, well, I have asked our expert in that for an
opinion and I will tell you what he says.
As a practical matter, this works:
(in-package :cl-user)
(eval-when (:load-toplevel)
(let ((n -1))
(defun reset-failure-count ()
(setf n -1))
(defstruct failure
(id (incf n))
nature type1 type2 glb path suffix context)))
(defun test ()
(make-failure))
while adding :compile-top-level and/or :execute causes failure. Not
sure why yet, but perhaps that is a useful observation.
David Margolies
Franz Inc.
More information about the developers
mailing list