Next: Type Restrictions
Up: More About Types in
Previous: Structure Types
  Contents
  Index
The Freeze-Type Declaration
freeze-type declaration
The extensions:freeze-type declaration is a CMU extension that
enables more efficient compilation of user-defined types by asserting
that the definition is not going to change. This declaration may only
be used globally (with declaim or proclaim). Currentlyfreeze-type only affects structure type testing done bytypep, typecase, etc. Here is an example:
(declaim (freeze-type foo bar))
This asserts that the types foo and bar and their
subtypes are not going to change. This allows more efficient type
testing, since the compiler can open-code a test for all possible
subtypes, rather than having to examine the type hierarchy at
run-time.
Peter Van Eynde
2000-02-08