comparison src/lisp-disunion.h @ 462:0784d089fdc9 r21-2-46

Import from CVS: tag r21-2-46
author cvs
date Mon, 13 Aug 2007 11:44:37 +0200
parents c33ae14dd6d0
children af57a77cbc92
comparison
equal deleted inserted replaced
461:120ed4009e51 462:0784d089fdc9
39 39
40 For integral Lisp types, i.e. integers and characters, the value 40 For integral Lisp types, i.e. integers and characters, the value
41 bits are the Lisp object. Some people call such Lisp_Objects "immediate". 41 bits are the Lisp object. Some people call such Lisp_Objects "immediate".
42 42
43 The object is obtained by masking off the type bits. 43 The object is obtained by masking off the type bits.
44 Bit 1 is used as a value bit by splitting the Lisp integer type 44 Bit 1 is used as a value bit by splitting the Lisp integer type
45 into two subtypes, Lisp_Type_Int_Even and Lisp_Type_Int_Odd. 45 into two subtypes, Lisp_Type_Int_Even and Lisp_Type_Int_Odd.
46 By this trickery we get 31 bits for integers instead of 30. 46 By this trickery we get 31 bits for integers instead of 30.
47 47
48 For non-integral types, the value bits of a Lisp_Object contain 48 For non-integral types, the value bits of a Lisp_Object contain
49 a pointer to a structure containing the object. The pointer is 49 a pointer to a structure containing the object. The pointer is
50 obtained by masking off the type and mark bits. 50 obtained by masking off the type and mark bits.
51 51
52 All pointer-based types are coalesced under a single type called 52 All pointer-based types are coalesced under a single type called
53 Lisp_Type_Record. The type bits for this type are required by the 53 Lisp_Type_Record. The type bits for this type are required by the
54 implementation to be 00, just like the least significant bits of 54 implementation to be 00, just like the least significant bits of
55 word-aligned struct pointers on 32-bit hardware. This requires that 55 word-aligned struct pointers on 32-bit hardware. This requires that
56 all structs implementing Lisp_Objects have an alignment of at least 4 56 all structs implementing Lisp_Objects have an alignment of at least 4
57 bytes. Because of this, Lisp_Object pointers don't have to be masked 57 bytes. Because of this, Lisp_Object pointers don't have to be masked