1 /* Definitions for exception handling for use by the GNU compiler
2 for the Java(TM) language compiler.
3 Copyright (C) 1997, 1998, 1999 Free Software Foundation, Inc.
5 This file is part of GNU CC.
7 GNU CC is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 2, or (at your option)
12 GNU CC is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with GNU CC; see the file COPYING. If not, write to
19 the Free Software Foundation, 59 Temple Place - Suite 330,
20 Boston, MA 02111-1307, USA.
22 Java and all Java-based marks are trademarks or registered trademarks
23 of Sun Microsystems, Inc. in the United States and other countries.
24 The Free Software Foundation is independent of Sun Microsystems, Inc. */
28 /* The (byte-code PC) range of the handled block. */
32 /* A list of handlers. For each element in the list,
33 the TREE_PURPOSE is the handled class (NULL_EXPR for a finally block),
34 and the TREE_VALUE is the LABEL_DECL of the handler. */
37 /* Surrunding handler, if any. */
38 struct eh_range
*outer
;
40 /* The first child range. It is is nested inside this range
41 (i.e. this.start_pc <= first_child.end_pc
42 && this.end_pc >= first_child.end_pc).
43 The children are linked together using next_sibling, and are sorted
44 by increasing start_pc and end_pc (we do not support non-nested
45 overlapping ranges). */
46 struct eh_range
*first_child
;
48 /* The next child of outer, in address order. */
49 struct eh_range
*next_sibling
;
52 /* A dummy range that represents the entire method. */
53 extern struct eh_range whole_range
;
55 #define NULL_EH_RANGE (&whole_range)
57 extern struct eh_range
* find_handler
PROTO ((int));
59 extern void method_init_exceptions
PROTO ((void));
61 extern void emit_handlers
PROTO ((void));
63 extern void maybe_start_try
PROTO ((int));
65 extern void maybe_end_try
PROTO ((int));
67 extern void add_handler
PROTO ((int, int, tree
, tree
));
69 extern void handle_nested_ranges
PROTO ((void));
71 extern void expand_resume_after_catch
PROTO ((void));