[armedbear-cvs] r13875 - trunk/abcl/src/org/armedbear/lisp

rschlatte at common-lisp.net rschlatte at common-lisp.net
Wed Feb 22 10:14:07 UTC 2012


Author: rschlatte
Date: Wed Feb 22 02:14:06 2012
New Revision: 13875

Log:
make slot subclasses work better

... abcl now passes the slot initialization tests of the MOP test suite.

Modified:
   trunk/abcl/src/org/armedbear/lisp/SlotDefinitionClass.java

Modified: trunk/abcl/src/org/armedbear/lisp/SlotDefinitionClass.java
==============================================================================
--- trunk/abcl/src/org/armedbear/lisp/SlotDefinitionClass.java	Wed Feb 22 01:26:50 2012	(r13874)
+++ trunk/abcl/src/org/armedbear/lisp/SlotDefinitionClass.java	Wed Feb 22 02:14:06 2012	(r13875)
@@ -71,6 +71,12 @@
         for(int i = instanceSlotNames.length - 1; i >= 0; i--) {
             slotDefinitions = slotDefinitions.push(new SlotDefinition(this, instanceSlotNames[i]));
         }
+        // The Java class SlotDefinition sets the location slot to NIL
+        // in its constructor; here we make Lisp-side subclasses of
+        // standard-*-slot-definition do the same.
+        LispObject locationSlot = slotDefinitions.nthcdr(8).car();
+        SlotDefinition.SET_SLOT_DEFINITION_INITFORM.execute(locationSlot, NIL);
+        SlotDefinition.SET_SLOT_DEFINITION_INITFUNCTION.execute(locationSlot, StandardClass.constantlyNil);
         setDirectSlotDefinitions(slotDefinitions);
         setSlotDefinitions(slotDefinitions);
 




More information about the armedbear-cvs mailing list