Changeset 13875


Ignore:
Timestamp:
02/22/12 10:14:06 (9 years ago)
Author:
rschlatte
Message:

make slot subclasses work better

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/abcl/src/org/armedbear/lisp/SlotDefinitionClass.java

    r13273 r13875  
    7272            slotDefinitions = slotDefinitions.push(new SlotDefinition(this, instanceSlotNames[i]));
    7373        }
     74        // The Java class SlotDefinition sets the location slot to NIL
     75        // in its constructor; here we make Lisp-side subclasses of
     76        // standard-*-slot-definition do the same.
     77        LispObject locationSlot = slotDefinitions.nthcdr(8).car();
     78        SlotDefinition.SET_SLOT_DEFINITION_INITFORM.execute(locationSlot, NIL);
     79        SlotDefinition.SET_SLOT_DEFINITION_INITFUNCTION.execute(locationSlot, StandardClass.constantlyNil);
    7480        setDirectSlotDefinitions(slotDefinitions);
    7581        setSlotDefinitions(slotDefinitions);
Note: See TracChangeset for help on using the changeset viewer.