From: Götz Lindenmaier Date: Wed, 11 Sep 2002 16:42:06 +0000 (+0000) Subject: removed entity_visited flag - use type_visited instead X-Git-Url: http://nsz.repo.hu/git/?a=commitdiff_plain;h=aa430d14a092961d948a4a15effca64e51375938;p=libfirm removed entity_visited flag - use type_visited instead this corresponds to the documentation [r475] --- diff --git a/ir/tr/entity.c b/ir/tr/entity.c index d615c3ccf..167a9920f 100644 --- a/ir/tr/entity.c +++ b/ir/tr/entity.c @@ -27,8 +27,6 @@ /** general **/ /*******************************************************************/ -unsigned long entity_visited; - void init_entity (void) { @@ -38,6 +36,8 @@ init_entity (void) /** ENTITY **/ /*******************************************************************/ +INLINE type *get_entity_owner (entity *ent); + INLINE void insert_entity_in_owner (entity *ent) { type *owner = ent->owner; switch (get_type_tpop_code(owner)) { @@ -558,5 +558,5 @@ void set_entity_visited(entity *entity, unsigned long num) { /* Sets visited field in entity to entity_visited. */ void mark_entity_visited(entity *entity) { assert (entity); - entity->visit = entity_visited; + entity->visit = type_visited; } diff --git a/ir/tr/entity.h b/ir/tr/entity.h index 4230b266b..c1cbb7b8e 100644 --- a/ir/tr/entity.h +++ b/ir/tr/entity.h @@ -103,7 +103,7 @@ typedef struct ir_graph ir_graph; * In that case there nowhere exists code for this entity and this entity * is never dynamically used in the code. * Values: description, existent. Default: existent. - * visited visited flag. Master flag is entity_visited. + * visited visited flag. Master flag is type_visited. * * These fields can only be accessed via access functions. * @@ -300,23 +300,4 @@ void mark_entity_visited(entity *entity); /*****/ - -/****v* entity/visited - * - * NAME - * entity_visited - visited flag to traverse the entity information - * PURPOSE - * Increase this flag by one before traversing the entity information. - * Mark entity nodes as visited by set_entity_visited(entity, value) or - * mark_entity_visited. - * Check whether node was already visited by comparing get_entity_visited(entity) - * and entity_visited. - * Or use the function to walk all entities. - * SEE ALSO - * SOURCE - */ -extern unsigned long entity_visited; -/*****/ - - # endif /* _ENTITY_H_ */ diff --git a/ir/tr/type.h b/ir/tr/type.h index 2b5ba80c9..6765a6573 100644 --- a/ir/tr/type.h +++ b/ir/tr/type.h @@ -361,11 +361,12 @@ void remove_class_supertype(type *clss, type *supertype); typedef enum peculiarity { description, /* Represents only a description. The entity/type is never allocated, no code/data exists for this entity/type. */ - inherited, /* Describes explicitly that other entities are inherited - to the owner of this entity. Overwrites must refer to - at least one other entity. If this is a method entity - there exists no irg for this entity, only for one of - the overwritten ones. */ + inherited, /* Describes explicitly that other entities are + inherited to the owner of this entity. + Overwrites must refer to at least one other + entity. If this is a method entity there exists + no irg for this entity, only for one of the + overwritten ones. */ existent /* The entity/type (can) exist. */ } peculiarity;