Mercurial > hg > xemacs-beta
comparison src/buffer.c @ 3092:141c2920ea48
[xemacs-hg @ 2005-11-25 01:41:31 by crestani]
Incremental Garbage Collector
author | crestani |
---|---|
date | Fri, 25 Nov 2005 01:42:08 +0000 |
parents | b7f26b2f78bd |
children | 8273ffbc92cd |
comparison
equal
deleted
inserted
replaced
3091:c22d8984148c | 3092:141c2920ea48 |
---|---|
231 static const struct memory_description buffer_text_description_1 [] = { | 231 static const struct memory_description buffer_text_description_1 [] = { |
232 { XD_LISP_OBJECT, offsetof (struct buffer_text, line_number_cache) }, | 232 { XD_LISP_OBJECT, offsetof (struct buffer_text, line_number_cache) }, |
233 { XD_END } | 233 { XD_END } |
234 }; | 234 }; |
235 | 235 |
236 #ifdef NEW_GC | |
237 DEFINE_LRECORD_IMPLEMENTATION ("buffer-text", buffer_text, | |
238 1, /*dumpable-flag*/ | |
239 0, 0, 0, 0, 0, | |
240 buffer_text_description_1, | |
241 Lisp_Buffer_Text); | |
242 #endif /* NEW_GC */ | |
243 | |
236 static const struct sized_memory_description buffer_text_description = { | 244 static const struct sized_memory_description buffer_text_description = { |
237 sizeof (struct buffer_text), | 245 sizeof (struct buffer_text), |
238 buffer_text_description_1 | 246 buffer_text_description_1 |
239 }; | 247 }; |
240 | 248 |
242 #define MARKED_SLOT(x) { XD_LISP_OBJECT, offsetof (struct buffer, x) }, | 250 #define MARKED_SLOT(x) { XD_LISP_OBJECT, offsetof (struct buffer, x) }, |
243 #include "bufslots.h" | 251 #include "bufslots.h" |
244 | 252 |
245 { XD_LISP_OBJECT, offsetof (struct buffer, extent_info) }, | 253 { XD_LISP_OBJECT, offsetof (struct buffer, extent_info) }, |
246 | 254 |
255 #ifdef NEW_GC | |
256 { XD_BLOCK_PTR, offsetof (struct buffer, text), | |
257 1, { &buffer_text_description } }, | |
258 { XD_LISP_OBJECT, offsetof (struct buffer, syntax_cache) }, | |
259 #else /* not NEW_GC */ | |
247 { XD_BLOCK_PTR, offsetof (struct buffer, text), | 260 { XD_BLOCK_PTR, offsetof (struct buffer, text), |
248 1, { &buffer_text_description } }, | 261 1, { &buffer_text_description } }, |
249 { XD_BLOCK_PTR, offsetof (struct buffer, syntax_cache), | 262 { XD_BLOCK_PTR, offsetof (struct buffer, syntax_cache), |
250 1, { &syntax_cache_description } }, | 263 1, { &syntax_cache_description } }, |
264 #endif /* not NEW_GC */ | |
251 | 265 |
252 { XD_LISP_OBJECT, offsetof (struct buffer, indirect_children) }, | 266 { XD_LISP_OBJECT, offsetof (struct buffer, indirect_children) }, |
253 { XD_LISP_OBJECT, offsetof (struct buffer, base_buffer) }, | 267 { XD_LISP_OBJECT, offsetof (struct buffer, base_buffer) }, |
254 { XD_END } | 268 { XD_END } |
255 }; | 269 }; |
1887 | 1901 |
1888 void | 1902 void |
1889 syms_of_buffer (void) | 1903 syms_of_buffer (void) |
1890 { | 1904 { |
1891 INIT_LRECORD_IMPLEMENTATION (buffer); | 1905 INIT_LRECORD_IMPLEMENTATION (buffer); |
1906 #ifdef NEW_GC | |
1907 INIT_LRECORD_IMPLEMENTATION (buffer_text); | |
1908 #endif /* NEW_GC */ | |
1892 | 1909 |
1893 DEFSYMBOL (Qbuffer_live_p); | 1910 DEFSYMBOL (Qbuffer_live_p); |
1894 DEFSYMBOL (Qbuffer_or_string_p); | 1911 DEFSYMBOL (Qbuffer_or_string_p); |
1895 DEFSYMBOL (Qmode_class); | 1912 DEFSYMBOL (Qmode_class); |
1896 DEFSYMBOL (Qrename_auto_save_file); | 1913 DEFSYMBOL (Qrename_auto_save_file); |