On 16 July 2013 04:12, Douglas Katzman <dougk@...> wrote:
> Hi all,
> Any type that is not good for discrimination, but only declaration, should
> not be given to TYPEP (and its implementation functions).
> The compiler knows not to do that but INTERPRETED-TYPECHECKFUN doesn't.
> Actually the fault in my opinion is with the structure slot setter for even
> trying. The slot setter for a type unsuitable for discrimination should be a
> different stub for funcalling purposes.
For reference, I believe with sufficient effort you can trigger this
same problem with CLOS slots, but that needs some funky interaction
with class finalization. See generate-slotd-typecheck for details.
(Plus. the *typeheck-cache** there should be useful for out of line
structure accessors as well.)