Commit [9c0c32] Maximize Restore History

Evaluate condition default initargs once, even after redefinition

There were two causes of this failure

* %DEFINE-CONDITION did not clear CONDITION-CLASSOID-HAIRY-SLOTS when
a condition was redefined. This led to multiple copies of slots in
CONDITION-CLASSOID-HAIRY-SLOTS and thus to initforms being evaluated
multiple times. %DEFINE-CONDITION now clears
CONDITION-CLASSOID-HAIRY-SLOTS before populating it again.

* (MAKE-INSTANCE CONDITION-CLASS) produced the call tree
MAKE-INSTANCE
+ ALLOCATE-INSTANCE SLOT-OBJECT
+ MAKE-CONDITION
+ INITIALIZE-INSTANCE SLOT-OBJECT
+ SHARED-INITIALIZE SLOT-OBJECT
MAKE-CONDITION and SHARED-INITIALIZE both called initfunctions
leading to multiple evaluations

A test case has been added.

fixes lp#1164969

Jan Moringen Jan Moringen 2013-04-05

Christophe Rhodes Christophe Rhodes 2013-04-12

changed src/code/condition.lisp
changed src/pcl/slots.lisp
changed tests/condition.impure.lisp
changed NEWS
changed package-data-list.lisp-expr
src/code/condition.lisp Diff Switch to side-by-side view
Loading...
src/pcl/slots.lisp Diff Switch to side-by-side view
Loading...
tests/condition.impure.lisp Diff Switch to side-by-side view
Loading...
NEWS Diff Switch to side-by-side view
Loading...
package-data-list.lisp-expr Diff Switch to side-by-side view
Loading...