[Ecls-list] CLOS MOP bugs

Pascal Costanza pc at p-cos.net
Thu Apr 27 16:01:10 UTC 2006


Hi,

Apart from the recent bug report, here are other bugs that I think I  
have fixed:

Index: defclass.lsp
===================================================================
RCS file: /project/ecl/cvsroot/ecl/src/clos/defclass.lsp,v
retrieving revision 1.18
diff -r1.18 defclass.lsp
87c87
<       (setf options (list* option-name option-value options))))
---
 >       (setf options (list* `',option-name option-value options))))
Index: generic.lsp
===================================================================
RCS file: /project/ecl/cvsroot/ecl/src/clos/generic.lsp,v
retrieving revision 1.17
diff -r1.17 generic.lsp
78c78
<              (setf arg-list `(,option-name ',option-value , at arg- 
list))))))
---
 >              (setf arg-list `(',option-name ',option-value , at arg- 
list))))))


The option names in defclass and defgeneric forms must be quoted so  
that option names that are not symbols from the keyword package are  
handled correctly.


Index: method.lsp
===================================================================
RCS file: /project/ecl/cvsroot/ecl/src/clos/method.lsp,v
retrieving revision 1.27
diff -r1.27 method.lsp
368c368
<          (setf variable arg specializer NIL))
---
 >          (setf variable arg specializer T))
498c498
< (setf (symbol-function 'SLOT-INDEX) (symbol-function 'GETHASH))
\ No newline at end of file
---
 > (setf (symbol-function 'SLOT-INDEX) (symbol-function 'GETHASH))


That's the bug I have previously reported.


Index: standard.lsp
===================================================================
RCS file: /project/ecl/cvsroot/ecl/src/clos/standard.lsp,v
retrieving revision 1.33
diff -r1.33 standard.lsp
405,406c405,407
<   (dolist (slotd (class-slots standard-class))
<     (let* ((slot-name (slot-definition-name slotd))
---
 >   (dolist (slot-definition (class-slots standard-class))
 >     (let* ((slotd slot-definition)
 >          (slot-name (slot-definition-name slotd))


This was an especially nasty bug: Apparently, dolist is implemented  
iteratively instead of recursively, which means that slot accessors  
for a class (for the non-optimized case) closed over the same slot  
definition object, which meant that all slot accessors would access  
the last slot.



BTW, the first ContextL test case runs without errors. ;)


Pascal

-- 
Pascal Costanza, mailto:pc at p-cos.net, http://p-cos.net
Vrije Universiteit Brussel, Programming Technology Lab
Pleinlaan 2, B-1050 Brussel, Belgium








More information about the ecl-devel mailing list