1.0.46.11: faster slot-accesses in the presence of SLOT-VALUE-USING-CLASS &co
* Introducing SLOT-INFO: a structure we save into the each
EFFECTIVE-SLOT-DEFINITION object, which provides us with fast-accesses to
typecheck, reader, writer, and boundp functions for that slot. (These
functions already pre-exist, and currently live directly in the slot
definition objects.)
This replaces typecheckfuns in permutation vectors, and both the
typecheckfun and slotd in slot-tables.
Given this, when we run into SLOT-VALUE in a method body when there is an
applicable non-standard SLOT-VALUE-USING-CLASS, we don't have to punt to
the slow path, but can instead replace the SLOT-VALUE form with
`(funcall (slot-info-reader (svref .pv. (1+ ,pv-offset))) ,parameter)
which is pretty snappy as these things go. Analogously for SET-SLOT-VALUE,
and SLOT-BOUNDP.
* Previously slot typechecking functions were generated as part of the
DEFCLASS expansion and made part of DIRECT-SLOT-DEFINITION objects. This
was a bit wasteful, as (1) we don't need them for direct slot definitions,
and (2) we used to get a separate typechecking function for each slot in
each safe class, even if they all had the same type.
Now there's only one typechecking function per type, and that is saved only
in the SLOT-INFO structure of the relevant effective slot definitions.
* In a couple of places finalize the class a bit earlier if possible to have
a better idea of how to best implement slot
accesses. TRY-FINALIZE-INHERITANCE tries, but refuses if there are forward
referenced superclasses. CAN-OPTIMIZE-ACCESS will signal a compiler-note
about such cases.
* WRAPPER-INSTANCE-SLOTS-LAYOUT now also includes slot-types, and we consider
the instance to be obsoleted when slot-type changes. (This was a bug that
our previous type-check-function setup accidentally worked around.)
Detect slot-type violations while updating instances of safe classes.
Similarly for CHANGE-CLASS.
14 files changed: