X-Authentication-Warning: edgedsp4.rtp.ericsson.se: toy set sender to [EMAIL 
PROTECTED] using -f
   Sender: [EMAIL PROTECTED]
   X-PH: [EMAIL PROTECTED]
   Cc: [EMAIL PROTECTED]
   From: Raymond Toy <[EMAIL PROTECTED]>
   Date: 09 Jun 2003 12:19:55 -0400
   X-YaleITSMailFilter: Version 1.0c (attachment(s) not renamed)

   >>>>> "Drew" == Drew McDermott <[EMAIL PROTECTED]> writes:

       Drew> The reason for boxing is to maintain the constraint that all Lisp
       Drew> objects are represented as pointers to something (and hence all
       Drew> require the same number of bytes to represent).  There are a couple of
       Drew> exceptions, notably small integers (called "fixnums"), which are
       Drew> usually represented as bit strings that are illegal pointers.

   What does "illegal pointer" mean here?  Fixnums are valid pointers,
   just like all of the other lisp object pointers.

Lisp objects are generally aligned on four-byte or eight-byte
boundaries.  That means a pointer to a Lisp object must end in two or
three zeroes.  Many implementations store some information in those
bits.  For instance, if the low-order bit is 1, that might indicate
the pointer is not a real pointer, but a fixnum; its value is found by
shifting right.  That means fixnums are not 32-bit quantities, but
31-bit quantities, which shouldn't make a difference to the average
user. 

Some implementations store type information in the low-order bits, so
you don't have to follow the pointer to find out if, say, its a cons
cell.  Of course, that means to follow the pointer you have to zero
the type bits out.  I don't know what CMUCL does, but it's probably
documented somewhere.

-- 
                                             -- Drew McDermott


Reply via email to