Dead
[official-gcc.git] / gomp-20050608-branch / gcc / java / java-except.h
blob255524223b730790e3ba9da7685669ea77a71a63
1 /* Definitions for exception handling for use by the GNU compiler
2 for the Java(TM) language compiler.
3 Copyright (C) 1997, 1998, 1999, 2000, 2003, 2004, 2005
4 Free Software Foundation, Inc.
6 This file is part of GCC.
8 GCC is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 2, or (at your option)
11 any later version.
13 GCC is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
18 You should have received a copy of the GNU General Public License
19 along with GCC; see the file COPYING. If not, write to
20 the Free Software Foundation, 51 Franklin Street, Fifth Floor,
21 Boston, MA 02110-1301, USA.
23 Java and all Java-based marks are trademarks or registered trademarks
24 of Sun Microsystems, Inc. in the United States and other countries.
25 The Free Software Foundation is independent of Sun Microsystems, Inc. */
27 struct eh_range
29 /* The (byte-code PC) range of the handled block. */
30 int start_pc;
31 int end_pc;
33 /* A list of handlers. For each element in the list,
34 the TREE_PURPOSE is the handled class (NULL_EXPR for a finally block),
35 and the TREE_VALUE is the LABEL_DECL of the handler. */
36 tree handlers;
38 /* Surrounding handler, if any. */
39 struct eh_range *outer;
41 /* The first child range. It is is nested inside this range
42 (i.e. this.start_pc <= first_child.end_pc
43 && this.end_pc >= first_child.end_pc).
44 The children are linked together using next_sibling, and are sorted
45 by increasing start_pc and end_pc (we do not support non-nested
46 overlapping ranges). */
47 struct eh_range *first_child;
49 /* The next child of outer, in address order. */
50 struct eh_range *next_sibling;
52 /* True if this range has already been expanded. */
53 int expanded;
55 /* The TRY_CATCH_EXPR for this EH range. */
56 tree stmt;
59 /* A dummy range that represents the entire method. */
60 extern struct eh_range whole_range;
62 #define NULL_EH_RANGE (&whole_range)
64 extern struct eh_range * find_handler (int);
65 extern void method_init_exceptions (void);
66 extern void maybe_start_try (int, int);
67 extern void add_handler (int, int, tree, tree);
68 extern void expand_end_java_handler (struct eh_range *);
69 extern bool sanity_check_exception_range (struct eh_range *);