Evaluate condition default initargs once, even after redefinition
authorJan Moringen <jmoringe@techfak.uni-bielefeld.de>
Fri, 5 Apr 2013 10:24:37 +0000 (12:24 +0200)
committerChristophe Rhodes <csr21@cantab.net>
Fri, 12 Apr 2013 18:12:22 +0000 (19:12 +0100)
commit9c0c32bf94b510ea0f7bed34a91d0ddf3ea909fc
tree4ea5645f8b0330c888795782d7e2ec5e9979eb96
parent9bdd2579f980573a74daabe03120ed64b1733b11
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
NEWS
package-data-list.lisp-expr
src/code/condition.lisp
src/pcl/slots.lisp
tests/condition.impure.lisp