Mercurial > emacs
comparison src/eval.c @ 105669:68dd71358159
* alloc.c: Do not define struct catchtag.
* eval.c: Move struct catchtag definition ...
* lisp.h: ... here.
* image.c: Move png.h #include earlier to avoid warnings.
* xterm.c:
* xsmfns.c:
* xselect.c:
* xrdb.c:
* xmenu.c:
* xftfont.c:
* xfont.c:
* xfns.c:
* xfaces.c:
* xdisp.c:
* window.c:
* widget.c:
* w32xfns.c:
* w32uniscribe.c:
* w32term.c:
* w32select.c:
* w32reg.c:
* w32proc.c:
* w32menu.c:
* w32inevt.c:
* w32heap.c:
* w32font.c:
* w32fns.c:
* w32console.c:
* w32.c:
* w16select.c:
* vm-limit.c:
* unexsol.c:
* unexec.c:
* unexcw.c:
* unexaix.c:
* undo.c:
* tparam.c:
* textprop.c:
* terminfo.c:
* terminal.c:
* termcap.c:
* term.c:
* syntax.c:
* sound.c:
* sheap.c:
* search.c:
* scroll.c:
* region-cache.c:
* regex.c:
* ralloc.c:
* process.c:
* print.c:
* msdos.c:
* minibuf.c:
* menu.c:
* marker.c:
* macros.c:
* keymap.c:
* keyboard.c:
* intervals.c:
* insdel.c:
* indent.c:
* gtkutil.c:
* ftxfont.c:
* ftfont.c:
* fringe.c:
* frame.c:
* fontset.c:
* font.c:
* fns.c:
* floatfns.c:
* filelock.c:
* fileio.c:
* emacs.c:
* editfns.c:
* dosfns.c:
* doprnt.c:
* doc.c:
* dispnew.c:
* dired.c:
* dbusbind.c:
* data.c:
* composite.c:
* coding.c:
* cmds.c:
* cm.c:
* chartab.c:
* charset.c:
* character.c:
* ccl.c:
* category.c:
* casetab.c:
* casefiddle.c:
* callproc.c:
* callint.c:
* bytecode.c:
* buffer.c:
* atimer.c: Include setjmp.h. (Bug#4643)
* xlwmenu.c:
* lwlib.c:
* lwlib-utils.c:
* lwlib-Xm.c:
* lwlib-Xlw.c:
* lwlib-Xaw.c: Include setjmp.h.
author | Dan Nicolaescu <dann@ics.uci.edu> |
---|---|
date | Mon, 19 Oct 2009 04:27:09 +0000 |
parents | 338d102432df |
children | b0a732611398 |
comparison
equal
deleted
inserted
replaced
105668:d15f2b6136f5 | 105669:68dd71358159 |
---|---|
18 You should have received a copy of the GNU General Public License | 18 You should have received a copy of the GNU General Public License |
19 along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | 19 along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ |
20 | 20 |
21 | 21 |
22 #include <config.h> | 22 #include <config.h> |
23 #include <setjmp.h> | |
23 #include "lisp.h" | 24 #include "lisp.h" |
24 #include "blockinput.h" | 25 #include "blockinput.h" |
25 #include "commands.h" | 26 #include "commands.h" |
26 #include "keyboard.h" | 27 #include "keyboard.h" |
27 #include "dispextern.h" | 28 #include "dispextern.h" |
28 #include <setjmp.h> | |
29 | 29 |
30 #if HAVE_X_WINDOWS | 30 #if HAVE_X_WINDOWS |
31 #include "xterm.h" | 31 #include "xterm.h" |
32 #endif | 32 #endif |
33 | 33 |
46 /* Nonzero means call value of debugger when done with this operation. */ | 46 /* Nonzero means call value of debugger when done with this operation. */ |
47 char debug_on_exit; | 47 char debug_on_exit; |
48 }; | 48 }; |
49 | 49 |
50 struct backtrace *backtrace_list; | 50 struct backtrace *backtrace_list; |
51 | |
52 /* This structure helps implement the `catch' and `throw' control | |
53 structure. A struct catchtag contains all the information needed | |
54 to restore the state of the interpreter after a non-local jump. | |
55 | |
56 Handlers for error conditions (represented by `struct handler' | |
57 structures) just point to a catch tag to do the cleanup required | |
58 for their jumps. | |
59 | |
60 catchtag structures are chained together in the C calling stack; | |
61 the `next' member points to the next outer catchtag. | |
62 | |
63 A call like (throw TAG VAL) searches for a catchtag whose `tag' | |
64 member is TAG, and then unbinds to it. The `val' member is used to | |
65 hold VAL while the stack is unwound; `val' is returned as the value | |
66 of the catch form. | |
67 | |
68 All the other members are concerned with restoring the interpreter | |
69 state. */ | |
70 | |
71 struct catchtag | |
72 { | |
73 Lisp_Object tag; | |
74 Lisp_Object val; | |
75 struct catchtag *next; | |
76 struct gcpro *gcpro; | |
77 jmp_buf jmp; | |
78 struct backtrace *backlist; | |
79 struct handler *handlerlist; | |
80 int lisp_eval_depth; | |
81 int pdlcount; | |
82 int poll_suppress_count; | |
83 int interrupt_input_blocked; | |
84 struct byte_stack *byte_stack; | |
85 }; | |
86 | 51 |
87 struct catchtag *catchlist; | 52 struct catchtag *catchlist; |
88 | 53 |
89 #ifdef DEBUG_GCPRO | 54 #ifdef DEBUG_GCPRO |
90 /* Count levels of GCPRO to detect failure to UNGCPRO. */ | 55 /* Count levels of GCPRO to detect failure to UNGCPRO. */ |