Modifying the Structure of Instances (original) (raw)

ANSI Common Lisp 4 Types and Classes 4.3 Classes 4.3.6 Redefining Classes

4.3.6.1 Modifying the Structure of Instances

The first step modifies the structure of instances of the redefined_class_ to conform to its new class definition. Local slots specified by the new class definition that are not specified as either local or shared by the old class are added, and slotsnot specified as either local or shared by the new class definition that are specified as local by the old class are discarded. The names of these added and discardedslots are passed as arguments to update-instance-for-redefined-classas described in the next section.

The values of local slots specified by both the new and old_classes_ are retained. If such a local slot was unbound, it remains unbound.

The value of a slot that is specified as shared in the old class and as local in the new class is retained. If such a shared slot was unbound, the local slot is unbound.