# include "entity.h"
# include "typegmod.h"
# include "mangle.h"
+# include "pseudo_irg.h"
/** A path in a compund graph. */
firm_kind kind; /**< dynamic type tag for compound graph path. */
type *tp; /**< The type this path belongs to. */
int len; /**< length of the path */
- int *arr_indicees; /**< List of array indicees. To compute position of
+ int *arr_indicees; /**< List of array indeces. To compute position of
array elements */
entity *nodes[1]; /**< List of entities of length len to express the
access path. */
ident *name; /**< name of this entity */
ident *ld_name; /**< Unique name of this entity, i.e., the mangled
name. If the field is read before written a default
- magling is applies. The name of the owner is prepended
+ mangling is applies. The name of the owner is prepended
to the name of the entity, separated by a underscore.
E.g., for a class `A' with field `a' this
is the ident for `A_a'. */
/* ------------- fields for analyses ---------------*/
- ir_node **accesses; /**< accessing nodes: loads, stores. */
#ifdef DEBUG_libfirm
int nr; /**< a unique node number for each node to make output
- readable. */
- char *c_name; /**< Since idents are ipaque, provide the name in cleartext */
+ readable. */
# endif /* DEBUG_libfirm */
};
+
+
/* ----------------------- inline functions ------------------------ */
static INLINE int
__is_entity(const void *thing) {
__set_entity_peculiarity(entity *ent, peculiarity pec) {
assert(ent && ent->kind == k_entity);
/* @@@ why peculiarity only for methods? */
- assert(is_method_type(ent->type));
+ assert(is_Method_type(ent->type));
+
ent->peculiarity = pec;
}
static INLINE ir_graph *
__get_entity_irg(const entity *ent) {
assert(ent && ent->kind == k_entity);
- assert(is_method_type(ent->type));
+ assert(ent == unknown_entity || is_Method_type(ent->type));
+ if (!get_visit_pseudo_irgs() && ent->irg && is_pseudo_ir_graph(ent->irg))
+ return NULL;
return ent->irg;
}