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 * File name: ir/st/exc.h
23 * Purpose: Helper functions for jack exceptions.
24 * Author: Florian Liekweg
28 * Copyright: (c) 2002-2003 Universität Karlsruhe
36 Helper functions for exceptions
57 exc_invalid = 0, /* not yet computed */
58 exc_normal, /* normal CF */
60 /* must push a new exc context at entry of block: */
61 exc_region, /* region entry */
63 /* must pop current exc context at EXIT of block */
64 exc_exit, /* region exit */
66 /* must pop current exc context at entry of block */
67 exc_handler, /* handler entry */
69 exc_max /* maximum value of enum for 'bounds checking' */
74 const char *exc_to_string (exc_t);
76 bool is_handler_entry (ir_graph*, ir_node*);
77 bool is_region_entry (ir_graph*, ir_node*);
78 bool is_handler_block (ir_graph*, ir_node*);
79 bool is_cont_entry (ir_graph*, ir_node*);
81 void set_Block_exc (ir_node*, exc_t);
82 exc_t get_Block_exc (ir_node*);
84 void set_Node_exc (ir_node*, exc_t);
85 exc_t get_Node_exc (ir_node*);
87 /* handler handling @@@ ajacs specific -- not supported */
88 void set_Block_handler (ir_node*, ir_node*);
89 ir_node* get_Block_handler (ir_node*);
91 void set_Node_handler (ir_node*, ir_node*);
92 ir_node* get_Node_handler (ir_node*);
98 # endif /* def _EXC_H_ */