From: Nikodemus S. <nik...@ra...> - 2007-09-07 16:33:15
|
On 9/7/07, Nikodemus Siivola <nik...@ra...> wrote: > I think the only way to fix this is to compile the slot-value into something > like > > (#:slot-value-using-permutations-<nnn> instance-vector permuation-vector > permutation-index) > > index these functions by the specializer they refer to, and cause the obsoletion > protocol to grovel over all such functions referring to specializers that are > subtypep of the redefined class, and redefine them to trap -- and then layer > on MORE MAGIC in the trap. Actually I think we can do better, if we are willing to intern permutation tables less agressively: * Intern on the tuple of specializers and slot-names-lists optimized, not instead of just the slot names. * Index on the specializers (each separately). Current slot-name indexing can be removed. * Make MAKE-INSTANCES-OBSOLETE grovel over all the permutation vectors specialized on subclasseses of the obsoleted class, and set all elements to NIL, which causes the second SLOT-VALUE to take the default path (which traps correctly.) Next call to the same method gets a new permutation vector thanks to the new wrapper. As an upside this is slightly less expensive (I think) then the current pv updating we do -- which I don't really see the point of. (Again, for posterity.) Cheers, -- Nikodemus |