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
23 * File name: ir/external/read.h
24 * Purpose: Read descriptions of external effects
26 * Modified by: Boris Boesler
29 * Copyright: (c) 1999-2004 Universität Karlsruhe
35 #include "firm_types.h"
37 /* first, the xml structures */
39 typedef struct type_str
42 ident *id; /* id for references */
43 ir_type *f_tp; /* firm type */
44 struct type_str *prev;
47 typedef struct entity_str
49 ident *ent_ident; /* name of entity */
50 ident *tp_ident; /* name of type/class */
51 ident *id; /* id for references */
52 ident *owner; /* id of owner */
53 ir_entity *f_ent; /* firm entity */
54 struct entity_str *prev;
57 /* now the xml nodes */
58 typedef enum eff_node_kind {
60 eff_valref, // eliminated
61 eff_select, // eliminated
73 typedef struct arg_str
79 typedef struct valref_str
84 typedef struct select_str
89 typedef struct load_str
91 ident *ptrrefid; /* id of valref node enclosed in select, or -1 */
95 typedef struct store_str
97 ident *ptrrefid; /* id of ptr valref node enclosed in select, or -1 */
98 ident *valrefid; /* id of val valref node enclosed in select, or -1 */
102 typedef struct alloc_str
107 typedef struct call_str
109 ident *valrefid; /* id of enclosed valref node, or -1 */
110 entity_t *ent; /* called entity */
115 typedef struct unknown_str
120 typedef struct join_str
126 typedef struct ret_str
129 } ret_t; /* returned value, or NO_ID */
131 typedef struct raise_str
133 ident *valref; /* what was that one for? */
137 /* dummy type for all other effects */
138 typedef struct eff_str
140 eff_node_kind_t kind;
141 ident *id; /* identifier to access this node */
156 struct eff_str *next; /* effects with values are stored in proc.values */
159 typedef struct proc_str
161 ident *proc_ident; /* name of procedure */
165 struct proc_str *next;
166 eff_t *values; /* @@@ TODO hash set */
170 typedef struct mod_str
173 type_t *types; /* types in module *//* @@@ TODO hash set */
174 entity_t *entities; /* entities in module *//* @@@ TODO hash set */
175 proc_t *procs; /* methods with effects */
176 struct mod_str *next; /* unused - only one module possible */
180 #endif /* defined _READ_T_H_ */
184 Revision 1.5 2007/02/02 12:38:35 matze
185 entity is ir_entity now
187 Revision 1.4 2006/12/15 12:37:40 matze
190 Revision 1.3 2006/06/09 11:26:35 firm
191 renamed type to ir_type
193 Revision 1.2 2004/12/10 15:14:16 beck
194 Removed unused header files
195 move xml macros to read.c, freeing the header from libxml depency
197 Revision 1.1 2004/10/25 13:52:24 boesler
198 seperated read.h (public interface) and read_t.h (types)
200 Revision 1.6 2004/10/22 13:13:27 boesler
201 replaced char* by idents, minor fix in Firm codegen for call
203 Revision 1.5 2004/10/21 15:31:55 boesler
205 - build abstract syntax trees
206 - build Firm graphs for many effects, still todos
208 Revision 1.1 2004/10/11 09:31:06 liekweg
209 First Import of XML reading procs --flo