Mercurial > emacs
comparison src/eval.c @ 26297:4d1e267efd41
[DEBUG_GCPRO] (gcpro_level): New variable.
(init_eval) [DEBUG_GCPRO]: Initialize it.
(unwind_to_catch) [DEBUG_GCPRO]: Set gcpro_level
from remaining gcprolist.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Mon, 01 Nov 1999 23:19:20 +0000 |
parents | b7aa6ac26872 |
children | 155d5adcdff4 |
comparison
equal
deleted
inserted
replaced
26296:e5c745f5a9fc | 26297:4d1e267efd41 |
---|---|
83 int poll_suppress_count; | 83 int poll_suppress_count; |
84 }; | 84 }; |
85 | 85 |
86 struct catchtag *catchlist; | 86 struct catchtag *catchlist; |
87 | 87 |
88 #ifdef DEBUG_GCPRO | |
89 /* Count levels of GCPRO to detect failure to UNGCPRO. */ | |
90 int gcpro_level; | |
91 #endif | |
92 | |
88 Lisp_Object Qautoload, Qmacro, Qexit, Qinteractive, Qcommandp, Qdefun; | 93 Lisp_Object Qautoload, Qmacro, Qexit, Qinteractive, Qcommandp, Qdefun; |
89 Lisp_Object Qinhibit_quit, Vinhibit_quit, Vquit_flag; | 94 Lisp_Object Qinhibit_quit, Vinhibit_quit, Vquit_flag; |
90 Lisp_Object Qmocklisp_arguments, Vmocklisp_arguments, Qmocklisp; | 95 Lisp_Object Qmocklisp_arguments, Vmocklisp_arguments, Qmocklisp; |
91 Lisp_Object Qand_rest, Qand_optional; | 96 Lisp_Object Qand_rest, Qand_optional; |
92 Lisp_Object Qdebug_on_error; | 97 Lisp_Object Qdebug_on_error; |
183 handlerlist = 0; | 188 handlerlist = 0; |
184 backtrace_list = 0; | 189 backtrace_list = 0; |
185 Vquit_flag = Qnil; | 190 Vquit_flag = Qnil; |
186 debug_on_next_call = 0; | 191 debug_on_next_call = 0; |
187 lisp_eval_depth = 0; | 192 lisp_eval_depth = 0; |
193 gcpro_level = 0; | |
188 /* This is less than the initial value of num_nonmacro_input_events. */ | 194 /* This is less than the initial value of num_nonmacro_input_events. */ |
189 when_entered_debugger = -1; | 195 when_entered_debugger = -1; |
190 } | 196 } |
191 | 197 |
192 Lisp_Object | 198 Lisp_Object |
965 catchlist = catchlist->next; | 971 catchlist = catchlist->next; |
966 } | 972 } |
967 while (! last_time); | 973 while (! last_time); |
968 | 974 |
969 gcprolist = catch->gcpro; | 975 gcprolist = catch->gcpro; |
976 #ifdef DEBUG_GCPRO | |
977 if (gcprolist != 0) | |
978 gcpro_level = gcprolist->level + 1; | |
979 else | |
980 gcpro_level = 0; | |
981 #endif | |
970 backtrace_list = catch->backlist; | 982 backtrace_list = catch->backlist; |
971 lisp_eval_depth = catch->lisp_eval_depth; | 983 lisp_eval_depth = catch->lisp_eval_depth; |
972 | 984 |
973 _longjmp (catch->jmp, 1); | 985 _longjmp (catch->jmp, 1); |
974 } | 986 } |