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 Read descriptions of external effects, private header
23 * @author Florian, Boris Boesler
27 #ifndef FIRM_EXTERNAL_READ_T_H
28 #define FIRM_EXTERNAL_READ_T_H
30 #include "firm_types.h"
32 /* first, the xml structures */
34 typedef struct type_str
37 ident *id; /* id for references */
38 ir_type *f_tp; /* firm type */
39 struct type_str *prev;
42 typedef struct entity_str
44 ident *ent_ident; /* name of entity */
45 ident *tp_ident; /* name of type/class */
46 ident *id; /* id for references */
47 ident *owner; /* id of owner */
48 ir_entity *f_ent; /* firm entity */
49 struct entity_str *prev;
52 /* now the xml nodes */
53 typedef enum eff_node_kind {
55 eff_valref, // eliminated
56 eff_select, // eliminated
68 typedef struct arg_str
74 typedef struct valref_str
79 typedef struct select_str
84 typedef struct load_str
86 ident *ptrrefid; /* id of valref node enclosed in select, or -1 */
90 typedef struct store_str
92 ident *ptrrefid; /* id of ptr valref node enclosed in select, or -1 */
93 ident *valrefid; /* id of val valref node enclosed in select, or -1 */
97 typedef struct alloc_str
102 typedef struct call_str
104 ident *valrefid; /* id of enclosed valref node, or -1 */
105 entity_t *ent; /* called entity */
110 typedef struct unknown_str
115 typedef struct join_str
121 typedef struct ret_str
124 } ret_t; /* returned value, or NO_ID */
126 typedef struct raise_str
128 ident *valref; /* what was that one for? */
132 /* dummy type for all other effects */
133 typedef struct eff_str
135 eff_node_kind_t kind;
136 ident *id; /* identifier to access this node */
151 struct eff_str *next; /* effects with values are stored in proc.values */
154 typedef struct proc_str
156 ident *proc_ident; /* name of procedure */
160 struct proc_str *next;
161 eff_t *values; /* @@@ TODO hash set */
165 typedef struct mod_str
168 type_t *types; /* types in module *//* @@@ TODO hash set */
169 entity_t *entities; /* entities in module *//* @@@ TODO hash set */
170 proc_t *procs; /* methods with effects */
171 struct mod_str *next; /* unused - only one module possible */
178 Revision 1.5 2007/02/02 12:38:35 matze
179 entity is ir_entity now
181 Revision 1.4 2006/12/15 12:37:40 matze
184 Revision 1.3 2006/06/09 11:26:35 firm
185 renamed type to ir_type
187 Revision 1.2 2004/12/10 15:14:16 beck
188 Removed unused header files
189 move xml macros to read.c, freeing the header from libxml depency
191 Revision 1.1 2004/10/25 13:52:24 boesler
192 seperated read.h (public interface) and read_t.h (types)
194 Revision 1.6 2004/10/22 13:13:27 boesler
195 replaced char* by idents, minor fix in Firm codegen for call
197 Revision 1.5 2004/10/21 15:31:55 boesler
199 - build abstract syntax trees
200 - build Firm graphs for many effects, still todos
202 Revision 1.1 2004/10/11 09:31:06 liekweg
203 First Import of XML reading procs --flo