From cmucl-devel at common-lisp.net Fri Jul 21 02:04:22 2006 From: cmucl-devel at common-lisp.net (cmucl) Date: Fri, 21 Jul 2006 02:04:22 -0000 Subject: [cmucl-ticket] #5: Hash table entry with key and value of :EMPTY is treated as an empty entry. Message-ID: <076.1209ce90c30ae79b3e61c25cbbe81991@common-lisp.net> #5: Hash table entry with key and value of :EMPTY is treated as an empty entry. --------------------+------------------------------------------------------- Reporter: rtoy | Owner: somebody Type: defect | Status: new Priority: minor | Milestone: Component: Core | Version: 19c Keywords: | --------------------+------------------------------------------------------- {{{ (defvar *h* (make-hash-table)) (setf (gethash :empty *h*) :empty) (maphash #'(lambda (k v) (format t "~A -> ~A~%" k v)) *h*) }}} produces no output, but printing *h* indicates the hash table has one entry in it. This is a bug in how the hash tables indicate an empty slot. The key- value vector uses a key and value of :EMPTY to indicate an empty slot. A possible solution: The second slot in the key-value vector is the symbol :EMPTY, but is otherwise not used for anything. So, instead of putting :EMPTY there, we can put a gensym'ed symbol there instead, and initialize all the remaining slots of the kv vector to be this symbol. I don't think there's any impact on GC, because if the GC code needs the empty symbol, it uses kv_vector![1] to get it. The Lisp code needs to change to initialize the kv-vector appropriately. maphash and with-hash- table-iterator need to use kv_vector![1] instead of :EMPTY to determine if a slot is empty or not. I think this should work. -- Ticket URL: cmucl cmucl From cmucl-devel at common-lisp.net Fri Jul 21 02:41:40 2006 From: cmucl-devel at common-lisp.net (cmucl) Date: Fri, 21 Jul 2006 02:41:40 -0000 Subject: [cmucl-ticket] Re: #4: symbol-macrolet + ignorable causes internal compiler error. In-Reply-To: <076.be6c86014450e198a70ee5b55e187c25@common-lisp.net> References: <076.be6c86014450e198a70ee5b55e187c25@common-lisp.net> Message-ID: <085.8601fa6ddf45fd0099fb98414a063c42@common-lisp.net> #4: symbol-macrolet + ignorable causes internal compiler error. ---------------------+------------------------------------------------------ Reporter: rtoy | Owner: somebody Type: defect | Status: closed Priority: major | Milestone: Component: Core | Version: 19c Resolution: fixed | Keywords: ---------------------+------------------------------------------------------ Changes (by rtoy): * resolution: => fixed * status: new => closed Comment: Fixed in snapshot 2006-06. -- Ticket URL: cmucl cmucl From cmucl-devel at common-lisp.net Fri Jul 21 02:50:32 2006 From: cmucl-devel at common-lisp.net (cmucl) Date: Fri, 21 Jul 2006 02:50:32 -0000 Subject: [cmucl-ticket] Re: #3: without-package-locks doesn't work with defmacro In-Reply-To: <076.8488880d38e34cbd237b85c33fca5b41@common-lisp.net> References: <076.8488880d38e34cbd237b85c33fca5b41@common-lisp.net> Message-ID: <085.b40fb0ad7f7fda6bd2a2c3cc69712236@common-lisp.net> #3: without-package-locks doesn't work with defmacro ---------------------+------------------------------------------------------ Reporter: rtoy | Owner: somebody Type: defect | Status: closed Priority: major | Milestone: Component: Core | Version: 19c Resolution: fixed | Keywords: ---------------------+------------------------------------------------------ Changes (by rtoy): * resolution: => fixed * status: new => closed Comment: Fixed in snapshot 2006-06 -- Ticket URL: cmucl cmucl