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.
21 /* first, the xml structures */
23 typedef struct type_str
25 const ident *type_ident;
26 const ident *id; /* id for references */
27 type *f_tp; /* firm type */
28 struct type_str *prev;
31 typedef struct entity_str
33 const ident *ent_ident; /* name of entity */
34 const ident *tp_ident; /* name of type/class */
35 const ident *id; /* id for references */
36 const ident *owner; /* id of owner */
37 entity *f_ent; /* firm entity */
38 struct entity_str *prev;
41 /* now the xml nodes */
42 typedef enum eff_node_kind {
44 eff_valref, // eliminated
45 eff_select, // eliminated
57 typedef struct arg_str
59 const ident *type_ident;
63 typedef struct valref_str
68 typedef struct select_str
73 typedef struct load_str
75 const ident *ptrrefid; /* id of valref node enclosed in select, or -1 */
79 typedef struct store_str
81 const ident *ptrrefid; /* id of ptr valref node enclosed in select, or -1 */
82 const ident *valrefid; /* id of val valref node enclosed in select, or -1 */
86 typedef struct alloc_str
91 typedef struct call_str
93 const ident *valrefid; /* id of enclosed valref node, or -1 */
94 entity_t *ent; /* called entity */
99 typedef struct unknown_str
104 typedef struct join_str
110 typedef struct ret_str
113 } ret_t; /* returned value, or NO_ID */
115 typedef struct raise_str
117 const ident *valref; /* what was that one for? */
121 /* dummy type for all other effects */
122 typedef struct eff_str
124 eff_node_kind_t kind;
125 const ident *id; /* identifier to access this node */
140 struct eff_str *next; /* effects with values are stored in proc.values */
143 typedef struct proc_str
145 const ident *proc_ident; /* name of procedure */
146 const ident *ownerid;
149 struct proc_str *next;
150 eff_t *values; /* @@@ TODO hash set */
154 typedef struct mod_str
157 type_t *types; /* types in module *//* @@@ TODO hash set */
158 entity_t *entities; /* entities in module *//* @@@ TODO hash set */
159 proc_t *procs; /* methods with effects */
160 struct mod_str *next; /* unused - only one module possible */
164 #endif /* defined _READ_T_H_ */
168 Revision 1.2 2004/12/10 15:14:16 beck
169 Removed unused header files
170 move xml macros to read.c, freeing the header from libxml depency
172 Revision 1.1 2004/10/25 13:52:24 boesler
173 seperated read.h (public interface) and read_t.h (types)
175 Revision 1.6 2004/10/22 13:13:27 boesler
176 replaced char* by idents, minor fix in Firm codegen for call
178 Revision 1.5 2004/10/21 15:31:55 boesler
180 - build abstract syntax trees
181 - build Firm graphs for many effects, still todos
183 Revision 1.1 2004/10/11 09:31:06 liekweg
184 First Import of XML reading procs --flo