freenode/#sbcl - IRC Chatlog
Search
9:40:13
Krystof
after (slot-makunbound (make-instance 'foo) 'x), (make-instance 'foo), the class-slot-cell is properly updated with the new initform
9:42:35
akater
@Krystof one has to slot-makunbound for each instance? BTW, my whole detour actually started because I wanted slot values for :allocation :class without allocating new instances.
9:44:54
Krystof
:default-initargs sort-of works; you don't get a defaulted initialization argument list for update-instance-for-redefined-class, but if you make a new instance the new value will appear
9:45:55
Krystof
simplest might be (reinitialize-instance (class-prototype (find-class 'foo)) :descent-classes <new-value>)
9:46:20
Krystof
or (setf (slot-value (class-prototype (find-class 'foo)) 'descent-classes) <new-value>) if you don't have an initarg
9:47:07
scymtym
redefining the class with the slot removed and then with the new definition added seems to work as well
9:47:51
Krystof
scymtym: you need to be sure to access an instance so that u-i-f-r-c gets called at least once between the redefintions
9:48:54
scymtym
at least the cell in the metaobject reflects the change immediately on removal and re-addition
14:21:41
guicho
Is there already a function that takes a function designator, environment, and a list of arguments (or a list of types) and returns the expected return type of the function using all of the defoptimizer knowledges?