comparison src/backtrace.h @ 771:943eaba38521

[xemacs-hg @ 2002-03-13 08:51:24 by ben] The big ben-mule-21-5 check-in! Various files were added and deleted. See CHANGES-ben-mule. There are still some test suite failures. No crashes, though. Many of the failures have to do with problems in the test suite itself rather than in the actual code. I'll be addressing these in the next day or so -- none of the test suite failures are at all critical. Meanwhile I'll be trying to address the biggest issues -- i.e. build or run failures, which will almost certainly happen on various platforms. All comments should be sent to ben@xemacs.org -- use a Cc: if necessary when sending to mailing lists. There will be pre- and post- tags, something like pre-ben-mule-21-5-merge-in, and post-ben-mule-21-5-merge-in.
author ben
date Wed, 13 Mar 2002 08:54:06 +0000
parents b39c14581166
children a5954632b187
comparison
equal deleted inserted replaced
770:336a418893b5 771:943eaba38521
146 extern struct specbinding *specpdl; 146 extern struct specbinding *specpdl;
147 extern struct specbinding *specpdl_ptr; 147 extern struct specbinding *specpdl_ptr;
148 extern struct catchtag *catchlist; 148 extern struct catchtag *catchlist;
149 extern struct backtrace *backtrace_list; 149 extern struct backtrace *backtrace_list;
150 150
151 /* Most callers should simply use specbind() and unbind_to(), but if 151 /* Most callers should simply use specbind() and unbind_to_1(), but if
152 speed is REALLY IMPORTANT, you can use the faster macros below */ 152 speed is REALLY IMPORTANT, you can use the faster macros below */
153 void specbind_magic (Lisp_Object, Lisp_Object); 153 void specbind_magic (Lisp_Object, Lisp_Object);
154 void grow_specpdl (EMACS_INT reserved); 154 void grow_specpdl (EMACS_INT reserved);
155 void unbind_to_hairy (int); 155 void unbind_to_hairy (int);
156 extern int specpdl_size; 156 extern int specpdl_size;
222 EMACS_INT SR_size = (size); \ 222 EMACS_INT SR_size = (size); \
223 if (specpdl_depth() + SR_size >= specpdl_size) \ 223 if (specpdl_depth() + SR_size >= specpdl_size) \
224 grow_specpdl (SR_size); \ 224 grow_specpdl (SR_size); \
225 } while (0) 225 } while (0)
226 226
227 /* Inline version of unbind_to(). 227 /* Inline version of unbind_to_1().
228 Use this instead of unbind_to() if speed is sufficiently important 228 [[Use this instead of unbind_to_1() if speed is sufficiently important
229 to save the overhead of even a single function call. 229 to save the overhead of even a single function call.]]
230 230 This is bogus pseudo-optimization. --ben
231 Most of the time, unbind_to() is called only on ordinary 231
232 Most of the time, unbind_to_1() is called only on ordinary
232 variables, so optimize for that. */ 233 variables, so optimize for that. */
233 #define UNBIND_TO_GCPRO(count, value) do { \ 234 #define UNBIND_TO_GCPRO(count, value) do { \
234 int UNBIND_TO_count = (count); \ 235 int UNBIND_TO_count = (count); \
235 while (specpdl_depth_counter != UNBIND_TO_count) \ 236 while (specpdl_depth_counter != UNBIND_TO_count) \
236 { \ 237 { \
251 \ 252 \
252 sym->value = specpdl_ptr->old_value; \ 253 sym->value = specpdl_ptr->old_value; \
253 } \ 254 } \
254 } while (0) 255 } while (0)
255 256
256 /* A slightly faster inline version of unbind_to, 257 /* A slightly faster inline version of unbind_to_1,
257 that doesn't offer GCPROing services. */ 258 that doesn't offer GCPROing services. */
258 #define UNBIND_TO(count) do { \ 259 #define UNBIND_TO(count) do { \
259 int UNBIND_TO_count = (count); \ 260 int UNBIND_TO_count = (count); \
260 while (specpdl_depth_counter != UNBIND_TO_count) \ 261 while (specpdl_depth_counter != UNBIND_TO_count) \
261 { \ 262 { \
282 #endif 283 #endif
283 284
284 #if 0 285 #if 0
285 /* Unused. It's too hard to guarantee that the current bindings 286 /* Unused. It's too hard to guarantee that the current bindings
286 contain only variables. */ 287 contain only variables. */
287 /* Another inline version of unbind_to(). VALUE is GC-protected. 288 /* Another inline version of unbind_to_1(). VALUE is GC-protected.
288 Caller guarantees that: 289 Caller guarantees that:
289 - all of the elements on the binding stack are variable bindings. 290 - all of the elements on the binding stack are variable bindings.
290 Else we crash. */ 291 Else we crash. */
291 #define UNBIND_TO_GCPRO_VARIABLES_ONLY(count, value) do { \ 292 #define UNBIND_TO_GCPRO_VARIABLES_ONLY(count, value) do { \
292 int UNBIND_TO_count = (count); \ 293 int UNBIND_TO_count = (count); \