Mercurial > hg > xemacs-beta
annotate src/general-slots.h @ 5146:88bd4f3ef8e4
make lrecord UID's have a separate UID space for each object, resurrect debug SOE code in extents.c
-------------------- ChangeLog entries follow: --------------------
src/ChangeLog addition:
2010-03-15 Ben Wing <ben@xemacs.org>
* alloc.c:
* alloc.c (c_readonly):
* alloc.c (deadbeef_memory):
* alloc.c (make_compiled_function):
* alloc.c (make_button_data):
* alloc.c (make_motion_data):
* alloc.c (make_process_data):
* alloc.c (make_timeout_data):
* alloc.c (make_magic_data):
* alloc.c (make_magic_eval_data):
* alloc.c (make_eval_data):
* alloc.c (make_misc_user_data):
* alloc.c (noseeum_make_marker):
* alloc.c (ADDITIONAL_FREE_string):
* alloc.c (common_init_alloc_early):
* alloc.c (init_alloc_once_early):
* bytecode.c (print_compiled_function):
* bytecode.c (mark_compiled_function):
* casetab.c:
* casetab.c (print_case_table):
* console.c:
* console.c (print_console):
* database.c (print_database):
* database.c (finalize_database):
* device-msw.c (sync_printer_with_devmode):
* device-msw.c (print_devmode):
* device-msw.c (finalize_devmode):
* device.c:
* device.c (print_device):
* elhash.c:
* elhash.c (print_hash_table):
* eval.c (print_multiple_value):
* eval.c (mark_multiple_value):
* events.c (deinitialize_event):
* events.c (print_event):
* events.c (event_equal):
* extents.c:
* extents.c (soe_dump):
* extents.c (soe_insert):
* extents.c (soe_delete):
* extents.c (soe_move):
* extents.c (extent_fragment_update):
* extents.c (print_extent_1):
* extents.c (print_extent):
* extents.c (vars_of_extents):
* frame.c:
* frame.c (print_frame):
* free-hook.c:
* free-hook.c (check_free):
* glyphs.c:
* glyphs.c (print_image_instance):
* glyphs.c (print_glyph):
* gui.c:
* gui.c (copy_gui_item):
* hash.c:
* hash.c (NULL_ENTRY):
* hash.c (KEYS_DIFFER_P):
* keymap.c (print_keymap):
* keymap.c (MARKED_SLOT):
* lisp.h:
* lrecord.h:
* lrecord.h (LISP_OBJECT_UID):
* lrecord.h (set_lheader_implementation):
* lrecord.h (struct old_lcrecord_header):
* lstream.c (print_lstream):
* lstream.c (finalize_lstream):
* marker.c (print_marker):
* marker.c (marker_equal):
* mc-alloc.c (visit_all_used_page_headers):
* mule-charset.c:
* mule-charset.c (print_charset):
* objects.c (print_color_instance):
* objects.c (print_font_instance):
* objects.c (finalize_font_instance):
* opaque.c (print_opaque):
* opaque.c (print_opaque_ptr):
* opaque.c (equal_opaque_ptr):
* print.c (internal_object_printer):
* print.c (enum printing_badness):
* rangetab.c (print_range_table):
* rangetab.c (range_table_equal):
* specifier.c (print_specifier):
* specifier.c (finalize_specifier):
* symbols.c:
* symbols.c (print_symbol_value_magic):
* tooltalk.c:
* tooltalk.c (print_tooltalk_message):
* tooltalk.c (print_tooltalk_pattern):
* window.c (print_window):
* window.c (debug_print_window):
(1) Make lrecord UID's have a separate UID space for each object.
Otherwise, with 20-bit UID's, we rapidly wrap around, especially
when common objects like conses and strings increment the UID value
for every object created. (Originally I tried making two UID spaces,
one for objects that always print readably and hence don't display
the UID, and one for other objects. But certain objects like markers
for which a UID is displayed are still generated rapidly enough that
UID overflow is a serious issue.) This also has the advantage of
making UID values smaller, hence easier to remember -- their main
purpose is to make it easier to keep track of different objects of
the same type when debugging code. Make sure we dump lrecord UID's
so that we don't have problems with pdumped and non-dumped objects
having the same UID.
(2) Display UID's consistently whenever an object (a) doesn't
consistently print readably (objects like cons and string, which
always print readably, can't display a UID), and (b) doesn't
otherwise have a unique property that makes objects of a
particular type distinguishable. (E.g. buffers didn't and still
don't print an ID, but the buffer name uniquely identifies the
buffer.) Some types, such as event, extent, compiled-function,
didn't always (or didn't ever) display an ID; others (such as
marker, extent, lstream, opaque, opaque-ptr, any object using
internal_object_printer()) used to display the actual machine
pointer instead.
(3) Rename NORMAL_LISP_OBJECT_UID to LISP_OBJECT_UID; make it work
over all Lisp objects and take a Lisp object, not a struct pointer.
(4) Some misc cleanups in alloc.c, elhash.c.
(5) Change code in events.c that "deinitializes" an event so that
it doesn't increment the event UID counter in the process. Also
use deadbeef_memory() to overwrite memory instead of doing the same
with custom code. In the process, make deadbeef_memory() in
alloc.c always available, and delete extraneous copy in mc-alloc.c.
Also capitalize all uses of 0xDEADBEEF. Similarly in elhash.c
call deadbeef_memory().
(6) Resurrect "debug SOE" code in extents.c. Make it conditional
on DEBUG_XEMACS and on a `debug-soe' variable, rather than on
SOE_DEBUG. Make it output to stderr, not stdout.
(7) Delete some custom print methods that were identical to
external_object_printer().
author | Ben Wing <ben@xemacs.org> |
---|---|
date | Mon, 15 Mar 2010 16:35:38 -0500 |
parents | 6afe991b8135 |
children | 1fae11d56ad2 |
rev | line source |
---|---|
442 | 1 /* Commonly-used symbols -- include file |
2 Copyright (C) 1995 Sun Microsystems. | |
1318 | 3 Copyright (C) 1995, 1996, 2000, 2001, 2002, 2003 Ben Wing. |
442 | 4 |
5 This file is part of XEmacs. | |
6 | |
7 XEmacs is free software; you can redistribute it and/or modify it | |
8 under the terms of the GNU General Public License as published by the | |
9 Free Software Foundation; either version 2, or (at your option) any | |
10 later version. | |
11 | |
12 XEmacs is distributed in the hope that it will be useful, but WITHOUT | |
13 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
14 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | |
15 for more details. | |
16 | |
17 You should have received a copy of the GNU General Public License | |
18 along with XEmacs; see the file COPYING. If not, write to | |
19 the Free Software Foundation, Inc., 59 Temple Place - Suite 330, | |
20 Boston, MA 02111-1307, USA. */ | |
21 | |
22 /* Synched up with: Not in FSF. */ | |
23 | |
24 /* The purpose of this file is as a central place to stick symbols | |
25 that don't have any obvious connection to any particular module | |
26 and might be used in many different contexts. | |
27 | |
1632 | 28 Four types of declarations are allowed here: |
442 | 29 |
30 SYMBOL (Qfoo); declares a symbol "foo" | |
1632 | 31 SYMBOL_MODULE_API (Qfoo); declares a symbol "foo" that is visible to modules |
442 | 32 SYMBOL_KEYWORD (Q_foo); declares a keyword symbol ":foo" |
33 SYMBOL_GENERAL (Qfoo, "bar"); declares a symbol named "bar" but stored in | |
34 the variable Qfoo | |
35 | |
36 To sort the crap in this file, use the following: | |
37 | |
38 (sort-regexp-fields nil | |
39 "^.*(Q_?\\(.*\\));$" "\\1" | |
40 (progn | |
41 (search-forward "SYMBOL") | |
42 (match-beginning 0)) | |
43 (point-max)) | |
44 */ | |
45 | |
46 SYMBOL (Qabort); | |
47 SYMBOL_KEYWORD (Q_accelerator); | |
48 SYMBOL_KEYWORD (Q_active); | |
49 SYMBOL (Qactually_requested); | |
50 SYMBOL (Qafter); | |
51 SYMBOL (Qall); | |
5084
6afe991b8135
Add a PARSE_KEYWORDS macro, use it in #'make-hash-table.
Aidan Kehoe <kehoea@parhasard.net>
parents:
4995
diff
changeset
|
52 SYMBOL_KEYWORD (Q_allow_other_keys); |
442 | 53 SYMBOL (Qand); |
54 SYMBOL (Qappend); | |
771 | 55 SYMBOL (Qascii); |
442 | 56 SYMBOL (Qassoc); |
57 SYMBOL (Qat); | |
58 SYMBOL (Qautodetect); | |
59 SYMBOL (Qbad_variable); | |
60 SYMBOL (Qbefore); | |
1983 | 61 SYMBOL (Qbigfloat); |
442 | 62 SYMBOL (Qbinary); |
63 SYMBOL (Qbitmap); | |
64 SYMBOL (Qboolean); | |
65 SYMBOL_KEYWORD (Q_border); | |
66 SYMBOL (Qbottom); | |
67 SYMBOL (Qbottom_margin); | |
68 SYMBOL (Qbuffer); | |
1318 | 69 SYMBOL (Qbuffers); |
442 | 70 SYMBOL (Qbuilt_in); |
71 SYMBOL (Qbutton); | |
72 SYMBOL_KEYWORD (Q_buttons); | |
73 SYMBOL_KEYWORD (Q_callback); | |
74 SYMBOL_KEYWORD (Q_callback_ex); | |
75 SYMBOL (Qcancel); | |
76 SYMBOL (Qcategory); | |
3439 | 77 SYMBOL (Qccl_program); |
442 | 78 SYMBOL (Qcenter); |
771 | 79 SYMBOL (Qchain); |
1333 | 80 SYMBOL (Qchange); |
442 | 81 SYMBOL (Qchannel); |
82 SYMBOL (Qchar); | |
83 SYMBOL (Qcharacter); | |
84 SYMBOL (Qchars); | |
771 | 85 SYMBOL (Qcode_page); |
86 SYMBOL (Qcoding_system); | |
4995
8431b52e43b1
Move the various map* functions to C; add #'map-into.
Aidan Kehoe <kehoea@parhasard.net>
parents:
4691
diff
changeset
|
87 SYMBOL (Qcoerce); |
442 | 88 SYMBOL (Qcolor); |
89 SYMBOL (Qcolumns); | |
90 SYMBOL (Qcommand); | |
91 SYMBOL_KEYWORD (Q_config); | |
92 SYMBOL (Qconsole); | |
771 | 93 SYMBOL (Qcontrol_1); |
442 | 94 SYMBOL (Qcopies); |
1927 | 95 SYMBOL_MODULE_API (Qcritical); |
442 | 96 SYMBOL (Qctext); |
771 | 97 SYMBOL (Qcurrent); |
442 | 98 SYMBOL (Qcursor); |
99 SYMBOL (Qdata); | |
903 | 100 SYMBOL (Qdde); |
442 | 101 SYMBOL (Qdead); |
793 | 102 SYMBOL (Qdebug); |
442 | 103 SYMBOL (Qdefault); |
1927 | 104 SYMBOL_MODULE_API (Qdelete); |
442 | 105 SYMBOL (Qdelq); |
771 | 106 SYMBOL (Qdescription); |
442 | 107 SYMBOL_KEYWORD (Q_descriptor); |
108 SYMBOL (Qdevice); | |
1318 | 109 SYMBOL (Qdevices); |
442 | 110 SYMBOL_KEYWORD (Q_device); |
111 SYMBOL (Qdialog); | |
673 | 112 SYMBOL (Qdirectory); |
442 | 113 SYMBOL (Qdimension); |
114 SYMBOL (Qdisplay); | |
115 SYMBOL (Qdoc_string); | |
771 | 116 SYMBOL (Qdocumentation); |
442 | 117 SYMBOL (Qduplex); |
118 SYMBOL (Qdynarr_overhead); | |
793 | 119 SYMBOL (Qemergency); |
442 | 120 SYMBOL (Qempty); |
3439 | 121 SYMBOL (Qencode_as_utf_8); |
442 | 122 SYMBOL (Qeq); |
123 SYMBOL (Qeql); | |
124 SYMBOL (Qequal); | |
125 SYMBOL (Qeval); | |
853 | 126 SYMBOL (Qevent); |
442 | 127 SYMBOL (Qextents); |
563 | 128 SYMBOL (Qexternal); |
442 | 129 SYMBOL (Qface); |
1318 | 130 SYMBOL (Qfaces); |
442 | 131 SYMBOL (Qfallback); |
132 SYMBOL (Qfile); | |
1632 | 133 SYMBOL_MODULE_API (Qfile_name); |
442 | 134 SYMBOL_KEYWORD (Q_filter); |
3659 | 135 SYMBOL (Qfinal); |
1983 | 136 SYMBOL (Qfixnum); |
137 SYMBOL (Qfloat); | |
442 | 138 SYMBOL (Qfont); |
139 SYMBOL (Qframe); | |
1318 | 140 SYMBOL (Qframes); |
442 | 141 SYMBOL (Qfrom_page); |
4691
3ba90c659d01
Move Qfrom_unicode to general-slots.h, fix the native Win32 build.
Aidan Kehoe <kehoea@parhasard.net>
parents:
4690
diff
changeset
|
142 SYMBOL (Qfrom_unicode); |
442 | 143 SYMBOL (Qfull_assoc); |
144 SYMBOL (Qfuncall); | |
145 SYMBOL (Qfunction); | |
146 SYMBOL (Qgap_overhead); | |
1333 | 147 SYMBOL (Qgarbage_collection); |
442 | 148 SYMBOL (Qgeneric); |
149 SYMBOL (Qgeometry); | |
150 SYMBOL (Qglobal); | |
853 | 151 SYMBOL (Qglyph); |
462 | 152 SYMBOL (Qgtk); |
853 | 153 SYMBOL (Qgui_item); |
442 | 154 SYMBOL (Qgutter); |
155 SYMBOL (Qheight); | |
156 SYMBOL_KEYWORD (Q_height); | |
157 SYMBOL (Qhelp); | |
771 | 158 SYMBOL (Qhigh); |
442 | 159 SYMBOL (Qhighlight); |
160 SYMBOL (Qhorizontal); | |
161 SYMBOL (Qicon); | |
162 SYMBOL (Qid); | |
163 SYMBOL (Qignore); | |
3659 | 164 SYMBOL (Qinitial); |
442 | 165 SYMBOL (Qimage); |
166 SYMBOL_KEYWORD (Q_image); | |
167 SYMBOL_KEYWORD (Q_included); | |
168 SYMBOL (Qinfo); | |
169 SYMBOL (Qinherit); | |
170 SYMBOL_KEYWORD (Q_initial_focus); | |
171 SYMBOL (Qinteger); | |
172 SYMBOL (Qinternal); | |
173 SYMBOL_KEYWORD (Q_items); | |
174 SYMBOL_KEYWORD (Q_justify); | |
863 | 175 SYMBOL_KEYWORD (Q_vertically_justify); |
176 SYMBOL_KEYWORD (Q_horizontally_justify); | |
442 | 177 SYMBOL (Qkey); |
178 SYMBOL (Qkey_assoc); | |
2842 | 179 SYMBOL (Qkey_mapping); |
442 | 180 SYMBOL_KEYWORD (Q_key_sequence); |
181 SYMBOL (Qkeyboard); | |
182 SYMBOL (Qkeymap); | |
183 SYMBOL_KEYWORD (Q_keys); | |
184 SYMBOL_KEYWORD (Q_label); | |
185 SYMBOL (Qlandscape); | |
186 SYMBOL (Qlast_command); | |
187 SYMBOL (Qleft); | |
188 SYMBOL (Qleft_margin); | |
189 SYMBOL (Qlet); | |
771 | 190 SYMBOL (Qlevel); |
442 | 191 SYMBOL (Qlist); |
771 | 192 SYMBOL (Qlittle_endian); |
193 SYMBOL (Qlocale); | |
194 SYMBOL (Qlow); | |
442 | 195 SYMBOL (Qmagic); |
196 SYMBOL (Qmalloc_overhead); | |
197 SYMBOL_KEYWORD (Q_margin_width); | |
198 SYMBOL (Qmarkers); | |
199 SYMBOL (Qmax); | |
200 SYMBOL (Qmemory); | |
201 SYMBOL (Qmenubar); | |
202 SYMBOL (Qmessage); | |
203 SYMBOL_GENERAL (Qminus, "-"); | |
204 SYMBOL (Qmodifiers); | |
205 SYMBOL (Qmotion); | |
206 SYMBOL (Qmsprinter); | |
207 SYMBOL (Qmswindows); | |
208 SYMBOL (Qname); | |
1632 | 209 SYMBOL_MODULE_API (Qnative); |
442 | 210 SYMBOL (Qnatnum); |
211 SYMBOL (Qno); | |
212 SYMBOL (Qnone); | |
213 SYMBOL (Qnot); | |
214 SYMBOL (Qnothing); | |
1632 | 215 SYMBOL_MODULE_API (Qnotice); |
442 | 216 SYMBOL (Qobject); |
217 SYMBOL (Qok); | |
218 SYMBOL (Qold_assoc); | |
219 SYMBOL (Qold_delete); | |
220 SYMBOL (Qold_delq); | |
221 SYMBOL (Qold_rassoc); | |
222 SYMBOL (Qold_rassq); | |
223 SYMBOL (Qonly); | |
224 SYMBOL (Qor); | |
225 SYMBOL (Qorientation); | |
226 SYMBOL_KEYWORD (Q_orientation); | |
227 SYMBOL (Qother); | |
228 SYMBOL (Qpage_setup); | |
510 | 229 SYMBOL (Qpages); |
442 | 230 SYMBOL (Qpeer); |
231 SYMBOL (Qpointer); | |
232 SYMBOL (Qpopup); | |
233 SYMBOL (Qportrait); | |
234 SYMBOL (Qprepend); | |
235 SYMBOL (Qprint); | |
236 SYMBOL (Qprinter); | |
237 SYMBOL_KEYWORD (Q_printer_settings); | |
238 SYMBOL (Qprocess); | |
239 SYMBOL_KEYWORD (Q_properties); | |
240 SYMBOL (Qprovide); | |
4690
257b468bf2ca
Move the #'query-coding-region implementation to C.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3767
diff
changeset
|
241 SYMBOL (Qquery_coding_clear_highlights); |
257b468bf2ca
Move the #'query-coding-region implementation to C.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3767
diff
changeset
|
242 SYMBOL (Qquery_coding_warning_face); |
442 | 243 SYMBOL (Qquestion); |
244 SYMBOL_KEYWORD (Q_question); | |
245 SYMBOL (Qradio); | |
246 SYMBOL (Qrassoc); | |
247 SYMBOL (Qrassq); | |
1983 | 248 SYMBOL (Qratio); |
1318 | 249 SYMBOL (Qredisplay); |
442 | 250 SYMBOL (Qremove_all); |
251 SYMBOL (Qrequire); | |
252 SYMBOL (Qresource); | |
253 SYMBOL (Qretry); | |
254 SYMBOL (Qreturn); | |
255 SYMBOL (Qreverse); | |
256 SYMBOL (Qright); | |
257 SYMBOL (Qright_margin); | |
1927 | 258 SYMBOL_MODULE_API (Qsearch); |
442 | 259 SYMBOL (Qselected); |
260 SYMBOL_KEYWORD (Q_selected); | |
510 | 261 SYMBOL (Qselection); |
442 | 262 SYMBOL (Qset_glyph_image); |
263 SYMBOL (Qsignal); | |
1927 | 264 SYMBOL_MODULE_API (Qsimple); |
442 | 265 SYMBOL (Qsize); |
563 | 266 SYMBOL (Qsound); |
442 | 267 SYMBOL (Qspace); |
268 SYMBOL (Qspecifier); | |
269 SYMBOL (Qstandard); | |
270 SYMBOL (Qstream); | |
271 SYMBOL (Qstring); | |
272 SYMBOL_KEYWORD (Q_style); | |
273 SYMBOL_KEYWORD (Q_suffix); | |
771 | 274 SYMBOL (Qsubtype); |
4690
257b468bf2ca
Move the #'query-coding-region implementation to C.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3767
diff
changeset
|
275 SYMBOL (Qsucceeded); |
442 | 276 SYMBOL (Qsymbol); |
277 SYMBOL (Qsyntax); | |
771 | 278 SYMBOL (Qsystem_default); |
442 | 279 SYMBOL (Qterminal); |
280 SYMBOL (Qtest); | |
281 SYMBOL (Qtext); | |
282 SYMBOL_KEYWORD (Q_text); | |
283 SYMBOL (Qthis_command); | |
284 SYMBOL (Qtimeout); | |
285 SYMBOL (Qtimestamp); | |
286 SYMBOL_KEYWORD (Q_title); | |
287 SYMBOL (Qto_page); | |
288 SYMBOL (Qtoggle); | |
289 SYMBOL (Qtoolbar); | |
290 SYMBOL (Qtop); | |
291 SYMBOL (Qtop_margin); | |
292 SYMBOL (Qtty); | |
293 SYMBOL (Qtype); | |
294 SYMBOL (Qundecided); | |
295 SYMBOL (Qundefined); | |
4690
257b468bf2ca
Move the #'query-coding-region implementation to C.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3767
diff
changeset
|
296 SYMBOL (Qunencodable); |
257b468bf2ca
Move the #'query-coding-region implementation to C.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3767
diff
changeset
|
297 SYMBOL (Qinvalid_sequence); |
442 | 298 SYMBOL (Qunimplemented); |
3659 | 299 SYMBOL (Qunicode_registries); |
3767 | 300 SYMBOL (Qunicode_type); |
771 | 301 SYMBOL (Quser_default); |
442 | 302 SYMBOL_KEYWORD (Q_value); |
303 SYMBOL (Qvalue_assoc); | |
304 SYMBOL (Qvertical); | |
305 SYMBOL (Qwarning); | |
306 SYMBOL (Qwidget); | |
307 SYMBOL (Qwidth); | |
308 SYMBOL_KEYWORD (Q_width); | |
309 SYMBOL (Qwindow); | |
1318 | 310 SYMBOL (Qwindows); |
311 SYMBOL (Qwindow_id); | |
442 | 312 SYMBOL (Qwindow_system); |
313 SYMBOL (Qx); | |
314 SYMBOL (Qy); | |
315 SYMBOL (Qyes); |