]> code.delx.au - gnu-emacs/blobdiff - src/lisp.h
(reseat_1): Set it->area to TEXT_AREA.
[gnu-emacs] / src / lisp.h
index 0bf58c706416eb1adcd3cc287c7db80a7f85c8e7..95da9d829685c775c8a2517c0a2eb160491eba55 100644 (file)
@@ -261,21 +261,14 @@ LISP_MAKE_RVALUE (Lisp_Object o)
 /* Two flags that are set during GC.  On some machines, these flags
    are defined differently by the m- file.  */
 
-/* This is set in the car of a cons and in the plist slot of a symbol
-   to indicate it is marked.  Likewise in the plist slot of an interval,
-   the chain slot of a marker, the type slot of a float, and the name
-   slot of a buffer.
-
-   In strings, this bit in the size field indicates that the string
-   is a "large" one, one which was separately malloc'd
-   rather than being part of a string block.  */
+/* This is set in the car of a cons to indicate it is marked.
+   Likewise in the type slot of a float and in the size slot of strings.  */
 
 #ifndef MARKBIT
 #define MARKBIT ((EMACS_INT) ((EMACS_UINT) 1 << (VALBITS + GCTYPEBITS)))
 #endif /*MARKBIT */
 
-/* In the size word of a vector, this bit means the vector has been marked.
-   In the size word of a large string, likewise.  */
+/* In the size word of a vector, this bit means the vector has been marked.  */
 
 #ifndef ARRAY_MARK_FLAG
 #define ARRAY_MARK_FLAG ((MARKBIT >> 1) & ~MARKBIT)
@@ -387,10 +380,6 @@ enum pvec_type
 #define XMARKBIT(a) ((a) & MARKBIT)
 #endif
 
-#ifndef XSETMARKBIT
-#define XSETMARKBIT(a,b) ((a) = ((a) & ~MARKBIT) | ((b) ? MARKBIT : 0))
-#endif
-
 #ifndef XMARK
 #define XMARK(a) ((a) |= MARKBIT)
 #endif
@@ -440,7 +429,6 @@ extern Lisp_Object make_number ();
 
 #define XGCTYPE(a) ((a).gu.type)
 #define XMARKBIT(a) ((a).gu.markbit)
-#define XSETMARKBIT(a,b) (XMARKBIT(a) = (b))
 #define XMARK(a) (XMARKBIT(a) = 1)
 #define XUNMARK(a) (XMARKBIT(a) = 0)
 
@@ -511,7 +499,7 @@ extern size_t pure_size;
 
 /* Construct a Lisp_Object from a value or address.  */
 
-#define XSETINT(a, b) XSET (a, Lisp_Int, b)
+#define XSETINT(a, b) (a) = make_number (b)
 #define XSETCONS(a, b) XSET (a, Lisp_Cons, b)
 #define XSETVECTOR(a, b) XSET (a, Lisp_Vectorlike, b)
 #define XSETSTRING(a, b) XSET (a, Lisp_String, b)
@@ -591,6 +579,8 @@ struct interval
   } up;
   unsigned int up_obj : 1;
 
+  unsigned gcmarkbit : 1;
+
   /* The remaining components are `properties' of the interval.
      The first four are duplicates for things which can be on the list,
      for purposes of speed.  */
@@ -879,6 +869,8 @@ enum symbol_interned
 
 struct Lisp_Symbol
 {
+  unsigned gcmarkbit : 1;
+
   /* Non-zero means symbol serves as a variable alias.  The symbol
      holding the real value is found in the value slot.  */
   unsigned indirect_variable : 1;
@@ -1088,7 +1080,8 @@ struct Lisp_Hash_Table
 struct Lisp_Free
   {
     int type : 16;     /* = Lisp_Misc_Free */
-    int spacer : 16;
+    unsigned gcmarkbit : 1;
+    int spacer : 15;
     union Lisp_Misc *chain;
   };
 
@@ -1096,7 +1089,8 @@ struct Lisp_Free
 struct Lisp_Marker
 {
   int type : 16;               /* = Lisp_Misc_Marker */
-  int spacer : 15;
+  unsigned gcmarkbit : 1;
+  int spacer : 14;
   /* 1 means normal insertion at the marker's position
      leaves the marker after the inserted text.  */
   unsigned int insertion_type : 1;
@@ -1109,7 +1103,7 @@ struct Lisp_Marker
 
   /* For markers that point somewhere,
      this is used to chain of all the markers in a given buffer.  */
-  Lisp_Object chain;
+  struct Lisp_Marker *next;
   /* This is the char position where the marker points.  */
   int charpos;
   /* This is the byte position.  */
@@ -1123,7 +1117,8 @@ struct Lisp_Marker
 struct Lisp_Intfwd
   {
     int type : 16;     /* = Lisp_Misc_Intfwd */
-    int spacer : 16;
+    unsigned gcmarkbit : 1;
+    int spacer : 15;
     EMACS_INT *intvar;
   };
 
@@ -1134,7 +1129,8 @@ struct Lisp_Intfwd
 struct Lisp_Boolfwd
   {
     int type : 16;     /* = Lisp_Misc_Boolfwd */
-    int spacer : 16;
+    unsigned gcmarkbit : 1;
+    int spacer : 15;
     int *boolvar;
   };
 
@@ -1145,7 +1141,8 @@ struct Lisp_Boolfwd
 struct Lisp_Objfwd
   {
     int type : 16;     /* = Lisp_Misc_Objfwd */
-    int spacer : 16;
+    unsigned gcmarkbit : 1;
+    int spacer : 15;
     Lisp_Object *objvar;
   };
 
@@ -1154,7 +1151,8 @@ struct Lisp_Objfwd
 struct Lisp_Buffer_Objfwd
   {
     int type : 16;     /* = Lisp_Misc_Buffer_Objfwd */
-    int spacer : 16;
+    unsigned gcmarkbit : 1;
+    int spacer : 15;
     int offset;
   };
 
@@ -1188,7 +1186,8 @@ struct Lisp_Buffer_Local_Value
   {
     int type : 16;      /* = Lisp_Misc_Buffer_Local_Value
                           or Lisp_Misc_Some_Buffer_Local_Value */
-    int spacer : 13;
+    unsigned gcmarkbit : 1;
+    int spacer : 12;
 
     /* 1 means this variable is allowed to have frame-local bindings,
        so check for them when looking for the proper binding.  */
@@ -1224,7 +1223,8 @@ struct Lisp_Buffer_Local_Value
 struct Lisp_Overlay
   {
     int type : 16;     /* = Lisp_Misc_Overlay */
-    int spacer : 16;
+    unsigned gcmarkbit : 1;
+    int spacer : 15;
     Lisp_Object start, end, plist;
   };
 
@@ -1233,7 +1233,8 @@ struct Lisp_Overlay
 struct Lisp_Kboard_Objfwd
   {
     int type : 16;     /* = Lisp_Misc_Kboard_Objfwd */
-    int spacer : 16;
+    unsigned gcmarkbit : 1;
+    int spacer : 15;
     int offset;
   };
 
@@ -1242,7 +1243,8 @@ struct Lisp_Kboard_Objfwd
 struct Lisp_Save_Value
   {
     int type : 16;     /* = Lisp_Misc_Save_Value */
-    int spacer : 16;
+    unsigned gcmarkbit : 1;
+    int spacer : 15;
     void *pointer;
     int integer;
   };
@@ -1268,8 +1270,6 @@ union Lisp_Misc
 /* Lisp floating point type */
 struct Lisp_Float
   {
-    Lisp_Object type;          /* essentially used for mark-bit
-                                  and chaining when on free-list */
 #ifdef HIDE_LISP_IMPLEMENTATION
     double data_;
 #else
@@ -2430,7 +2430,7 @@ extern void malloc_warning P_ ((char *));
 extern void memory_full P_ ((void));
 extern void buffer_memory_full P_ ((void));
 extern int survives_gc_p P_ ((Lisp_Object));
-extern void mark_object P_ ((Lisp_Object *));
+extern void mark_object P_ ((Lisp_Object));
 extern Lisp_Object Vpurify_flag;
 extern Lisp_Object Vmemory_full;
 EXFUN (Fcons, 2);
@@ -2727,7 +2727,7 @@ extern void clear_charpos_cache P_ ((struct buffer *));
 extern int charpos_to_bytepos P_ ((int));
 extern int buf_charpos_to_bytepos P_ ((struct buffer *, int));
 extern int buf_bytepos_to_charpos P_ ((struct buffer *, int));
-extern void unchain_marker P_ ((Lisp_Object));
+extern void unchain_marker P_ ((struct Lisp_Marker *marker));
 extern Lisp_Object set_marker_restricted P_ ((Lisp_Object, Lisp_Object, Lisp_Object));
 extern Lisp_Object set_marker_both P_ ((Lisp_Object, Lisp_Object, int, int));
 extern Lisp_Object set_marker_restricted_both P_ ((Lisp_Object, Lisp_Object,