Accordingly remove repr_class from entities.
FIRM_API void add_entity_additional_properties(ir_entity *ent,
mtp_additional_properties flag);
-/** Returns the class type that this type info entity represents or NULL
- if ent is no type info entity. */
-FIRM_API ir_type *get_entity_repr_class(const ir_entity *ent);
-
/**
* @page unknown_entity The Unknown entity
*
*
* - supertypes: A list of direct superclasses.
*
- * - type_info: An entity representing the type information of this class.
- * This entity can be of arbitrari type, Firm did not use it yet.
- * It allows to express the coupling of a type with an entity
- * representing this type. This information is useful for lowering
- * of InstOf and TypeChk nodes. Default: NULL
- *
* - vtable_size: The size of this class virtual function table.
* Default: 0
*
/** Finds supertype in the list of supertypes and removes it */
FIRM_API void remove_class_supertype(ir_type *clss, ir_type *supertype);
-/** Returns the type info entity of a class. */
-FIRM_API ir_entity *get_class_type_info(const ir_type *clss);
-
-/** Sets a type info entity for the class. */
-FIRM_API void set_class_type_info(ir_type *clss, ir_entity *ent);
-
/** Returns the size of the virtual function table. */
FIRM_API unsigned get_class_vtable_size(const ir_type *clss);
size_t i;
if (is_Class_type(tp)) {
- if (get_class_n_subtypes(tp) > 0 || get_class_n_supertypes(tp) > 0
- || get_class_type_info(tp) != NULL || get_class_vtable_size(tp) > 0) {
+ if (get_class_n_subtypes(tp) > 0 || get_class_n_supertypes(tp) > 0 || get_class_vtable_size(tp) > 0) {
/* sub/superclass export not implemented yet, it's unclear whether
* class types will stay in libfirm anyway */
panic("can't export class types yet");
res->offset_bit_remainder = 0;
res->alignment = 0;
res->link = NULL;
- res->repr_class = NULL;
#ifdef DEBUG_libfirm
res->nr = get_irp_new_node_nr();
#endif
ent->attr.mtd_attr.properties |= properties;
}
-ir_type *(get_entity_repr_class)(const ir_entity *ent)
-{
- return _get_entity_repr_class(ent);
-}
-
dbg_info *(get_entity_dbg_info)(const ir_entity *ent)
{
return _get_entity_dbg_info(ent);
#define mark_entity_visited(ent) _mark_entity_visited(ent)
#define entity_visited(ent) _entity_visited(ent)
#define entity_not_visited(ent) _entity_not_visited(ent)
-#define get_entity_repr_class(ent) _get_entity_repr_class(ent)
#define get_entity_dbg_info(ent) _get_entity_dbg_info(ent)
#define set_entity_dbg_info(ent, db) _set_entity_dbg_info(ent, db)
information. */
struct dbg_info *dbi; /**< A pointer to information for debug support. */
void *link; /**< To store some intermediate information. */
- ir_type *repr_class; /**< If this entity represents a class info, the
- associated class. */
ir_entity **overwrites; /**< A list of entities this entity overwrites. */
ir_entity **overwrittenby; /**< A list of entities that overwrite this
return entity->attr.parameter.number;
}
-static inline ir_type *_get_entity_repr_class(const ir_entity *ent)
-{
- assert(ent->kind == k_entity);
- return ent->repr_class;
-}
-
static inline dbg_info *_get_entity_dbg_info(const ir_entity *ent)
{
return ent->dbi;
res->attr.ca.subtypes = NEW_ARR_F (ir_type *, 0);
res->attr.ca.supertypes = NEW_ARR_F (ir_type *, 0);
res->attr.ca.peculiarity = peculiarity_existent;
- res->attr.ca.type_info = NULL;
res->attr.ca.vtable_size = 0;
res->attr.ca.clss_flags = cf_none;
res->attr.ca.dfn = 0;
/* we must iterate backward here */
for (i = get_class_n_members(clss); i > 0;)
free_entity(get_class_member(clss, --i));
- /* do NOT free the type info here. It belongs to another class */
}
void free_class_attrs(ir_type *clss)
}
}
-ir_entity *get_class_type_info(const ir_type *clss)
-{
- return clss->attr.ca.type_info;
-}
-
-void set_class_type_info(ir_type *clss, ir_entity *ent)
-{
- clss->attr.ca.type_info = ent;
- if (ent)
- ent->repr_class = clss;
-}
-
ir_peculiarity get_class_peculiarity(const ir_type *clss)
{
assert(clss && (clss->type_op == type_class));
ir_type **subtypes; /**< Array containing the direct subtypes. */
ir_type **supertypes; /**< Array containing the direct supertypes */
ir_peculiarity peculiarity; /**< The peculiarity of this class. */
- ir_entity *type_info; /**< An ir_entity representing this class, used for type info. */
int dfn; /**< A number that can be used for 'instanceof' operator. */
unsigned vtable_size; /**< The size of the vtable for this class. */
unsigned clss_flags; /**< Additional class flags. */