next up previous contents
Next: 5.2.10 Type Restrictions Up: 5.2 More About Types Previous: 5.2.8 Structure Types

The 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). Currently freeze-type only affects structure type testing done by typep, 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.



Raymond Toy
Mon Jul 14 09:11:27 EDT 1997