adjusted doxygen comments
[libfirm] / ir / st / exc.h
1 /*
2  * Copyright (C) 1995-2007 University of Karlsruhe.  All right reserved.
3  *
4  * This file is part of libFirm.
5  *
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.
10  *
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.
14  *
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
17  * PURPOSE.
18  */
19
20 /**
21  * @file
22  * @brief     Helper functions for jack exceptions.
23  * @author    Florian Liekweg
24  * @date      4.3.2002
25  * @version   $Id$
26  */
27
28 /**
29    NAME
30      exc
31    PURPOSE
32      Helper functions for exceptions
33    S
34      not quite complete
35 ***/
36
37 # include "irnode.h"
38
39 # ifndef _EXC_H_
40 # define _EXC_H_
41
42 # include "st.h"
43 # include "irop.h"
44 # include "irouts.h"
45
46 #include <stdbool.h>
47
48 #ifdef __cplusplus
49         extern "C" {
50 #endif
51
52 typedef enum {
53   exc_invalid = 0,                                      /* not yet computed */
54   exc_normal,                                   /* normal CF */
55
56   /* must push a new exc context at entry of block: */
57   exc_region,                                   /* region entry */
58
59   /* must pop current exc context at EXIT of block */
60   exc_exit,                                             /* region exit */
61
62   /* must pop current exc context at entry of block */
63   exc_handler,                                  /* handler entry */
64
65   exc_max                                               /* maximum value of enum for 'bounds checking' */
66 } exc_t;
67
68
69
70 const char *exc_to_string (exc_t);
71
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*);
76
77 void     set_Block_exc     (ir_node*, exc_t);
78 exc_t    get_Block_exc     (ir_node*);
79
80 void     set_Node_exc      (ir_node*, exc_t);
81 exc_t    get_Node_exc      (ir_node*);
82
83 /* handler handling  @@@ ajacs specific -- not supported  */
84 void     set_Block_handler (ir_node*, ir_node*);
85 ir_node* get_Block_handler (ir_node*);
86
87 void     set_Node_handler  (ir_node*, ir_node*);
88 ir_node* get_Node_handler  (ir_node*);
89
90 #ifdef __cplusplus
91 }
92 #endif
93
94 # endif /* def _EXC_H_ */