2 * Copyright (C) 1995-2007 University of Karlsruhe. All right reserved.
4 * This file is part of libFirm.
6 * This file may be distributed and/or modified under the terms of the
7 * GNU General Public License version 2 as published by the Free Software
8 * Foundation and appearing in the file LICENSE.GPL included in the
9 * packaging of this file.
11 * Licensees holding valid libFirm Professional Edition licenses may use
12 * this file in accordance with the libFirm Commercial License.
13 * Agreement provided with the Software.
15 * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
16 * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR
22 * @brief Helper functions for jack exceptions.
23 * @author Florian Liekweg
32 Helper functions for exceptions
53 exc_invalid = 0, /* not yet computed */
54 exc_normal, /* normal CF */
56 /* must push a new exc context at entry of block: */
57 exc_region, /* region entry */
59 /* must pop current exc context at EXIT of block */
60 exc_exit, /* region exit */
62 /* must pop current exc context at entry of block */
63 exc_handler, /* handler entry */
65 exc_max /* maximum value of enum for 'bounds checking' */
70 const char *exc_to_string (exc_t);
72 bool is_handler_entry (ir_graph*, ir_node*);
73 bool is_region_entry (ir_graph*, ir_node*);
74 bool is_handler_block (ir_graph*, ir_node*);
75 bool is_cont_entry (ir_graph*, ir_node*);
77 void set_Block_exc (ir_node*, exc_t);
78 exc_t get_Block_exc (ir_node*);
80 void set_Node_exc (ir_node*, exc_t);
81 exc_t get_Node_exc (ir_node*);
83 /* handler handling @@@ ajacs specific -- not supported */
84 void set_Block_handler (ir_node*, ir_node*);
85 ir_node* get_Block_handler (ir_node*);
87 void set_Node_handler (ir_node*, ir_node*);
88 ir_node* get_Node_handler (ir_node*);
94 # endif /* def _EXC_H_ */