4 * File name: ir/external/read.h
5 * Purpose: Read descriptions of external effects
7 * Modified by: Boris Boesler
10 * Copyright: (c) 1999-2004 Universität Karlsruhe
11 * Licence: This file is protected by GPL - GNU GENERAL PUBLIC LICENSE.
17 #include "firm_types.h"
19 /* first, the xml structures */
21 typedef struct type_str
24 ident *id; /* id for references */
25 ir_type *f_tp; /* firm type */
26 struct type_str *prev;
29 typedef struct entity_str
31 ident *ent_ident; /* name of entity */
32 ident *tp_ident; /* name of type/class */
33 ident *id; /* id for references */
34 ident *owner; /* id of owner */
35 entity *f_ent; /* firm entity */
36 struct entity_str *prev;
39 /* now the xml nodes */
40 typedef enum eff_node_kind {
42 eff_valref, // eliminated
43 eff_select, // eliminated
55 typedef struct arg_str
61 typedef struct valref_str
66 typedef struct select_str
71 typedef struct load_str
73 ident *ptrrefid; /* id of valref node enclosed in select, or -1 */
77 typedef struct store_str
79 ident *ptrrefid; /* id of ptr valref node enclosed in select, or -1 */
80 ident *valrefid; /* id of val valref node enclosed in select, or -1 */
84 typedef struct alloc_str
89 typedef struct call_str
91 ident *valrefid; /* id of enclosed valref node, or -1 */
92 entity_t *ent; /* called entity */
97 typedef struct unknown_str
102 typedef struct join_str
108 typedef struct ret_str
111 } ret_t; /* returned value, or NO_ID */
113 typedef struct raise_str
115 ident *valref; /* what was that one for? */
119 /* dummy type for all other effects */
120 typedef struct eff_str
122 eff_node_kind_t kind;
123 ident *id; /* identifier to access this node */
138 struct eff_str *next; /* effects with values are stored in proc.values */
141 typedef struct proc_str
143 ident *proc_ident; /* name of procedure */
147 struct proc_str *next;
148 eff_t *values; /* @@@ TODO hash set */
152 typedef struct mod_str
155 type_t *types; /* types in module *//* @@@ TODO hash set */
156 entity_t *entities; /* entities in module *//* @@@ TODO hash set */
157 proc_t *procs; /* methods with effects */
158 struct mod_str *next; /* unused - only one module possible */
162 #endif /* defined _READ_T_H_ */
166 Revision 1.4 2006/12/15 12:37:40 matze
169 Revision 1.3 2006/06/09 11:26:35 firm
170 renamed type to ir_type
172 Revision 1.2 2004/12/10 15:14:16 beck
173 Removed unused header files
174 move xml macros to read.c, freeing the header from libxml depency
176 Revision 1.1 2004/10/25 13:52:24 boesler
177 seperated read.h (public interface) and read_t.h (types)
179 Revision 1.6 2004/10/22 13:13:27 boesler
180 replaced char* by idents, minor fix in Firm codegen for call
182 Revision 1.5 2004/10/21 15:31:55 boesler
184 - build abstract syntax trees
185 - build Firm graphs for many effects, still todos
187 Revision 1.1 2004/10/11 09:31:06 liekweg
188 First Import of XML reading procs --flo