removed entity_visited flag - use type_visited instead
authorGötz Lindenmaier <goetz@ipd.info.uni-karlsruhe.de>
Wed, 11 Sep 2002 16:42:06 +0000 (16:42 +0000)
committerGötz Lindenmaier <goetz@ipd.info.uni-karlsruhe.de>
Wed, 11 Sep 2002 16:42:06 +0000 (16:42 +0000)
this corresponds to the documentation

[r475]

ir/tr/entity.c
ir/tr/entity.h
ir/tr/type.h

index d615c3c..167a992 100644 (file)
@@ -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;
 }
index 4230b26..c1cbb7b 100644 (file)
@@ -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_ */
index 2b5ba80..6765a65 100644 (file)
@@ -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;