/*10 2002/03/19 13:08:33
* Copyright (C) 1998 - 2000 by Universitaet Karlsruhe
* All rights reserved.
+*/
+
+/**
+* @file entity_t.h
*
-* Authors: Martin Trapp, Christian Schaefer,
-* Goetz Lindenmaier
+* entity.h: entities represent all program known objects.
*
-* entity.h: entities represent all program known objects.
+* @author Martin Trapp, Christian Schaefer, Goetz Lindenmaier
*
* An entity is the representation of program known objects in Firm.
* The primary concept of entities is to represent members of complex
* program is a universally defined class type "GlobalType". The owner
* of procedures defined in the scope of an other procedure is the
* enclosing procedure.
-*
*/
/* $Id$ */
# include "entity.h"
+/** A path in a compund graph. */
+struct compound_graph_path {
+ firm_kind kind; /**< dynamic type tag for compound graph path. */
+ type *tp;
+ int len;
+ entity *nodes[1];
+};
+
+/** the type of an entity */
struct entity {
firm_kind kind; /**< dynamic type tag for entity. */
ident *name; /**< name of this entity */
ir_node **values; /**< constant values of compound entities. Only available if
variablility not uninitialized. Must be set for variability constant
*/
- entity **val_ents; /**< entities corresponding to constant values. Only available if
+ compound_graph_path **val_paths; /**< paths corresponding to constant values. Only available if
variablility not uninitialized. Must be set for variability constant */
/* ------------- fields for entities owned by a class type ---------------*/
ir_graph *irg; /**< If (type == method_type) this is the corresponding irg.
The ir_graph constructor automatically sets this field.
Yes, it must be here. */
+#ifdef DEBUG_libfirm
+ int nr; /**< a unique node number for each node to make output
+ readable. */
+#endif
};
+INLINE long get_entity_nr(entity *ent);
# endif /* _ENTITY_T_H_ */