more handling for compound graph path ,
[libfirm] / ir / tr / entity_t.h
index 3c4d703..8d37f80 100644 (file)
@@ -39,6 +39,7 @@
 # define _ENTITY_T_H_
 
 #include "firm_common_t.h"
+#include "firm_config.h"
 
 # include "entity.h"
 # include "typegmod.h"
@@ -52,9 +53,9 @@ struct compound_graph_path {
   type *tp;             /**< The type this path belongs to. */
   int len;              /**< length of the path */
   int *arr_indicees;    /**< List of array indeces.  To compute position of
-                 array elements */
+                          array elements */
   entity *nodes[1];     /**< List of entities of length len to express the
-                 access path. */
+                          access path. */
 };
 
 /** the type of an entity */
@@ -219,13 +220,17 @@ __get_entity_peculiarity(const entity *ent) {
 }
 
 /**
- * @todo why peculiarity only for methods
+ * @todo Why peculiarity only for methods?
+ *       Good question.  Originally, there were only description and
+ *       existent.  The thought was, what sense does it make to
+ *       describe a field?  With inherited the situation changed.  So
+ *       I removed the assertion.  GL, 28.2.05
  */
 static INLINE void
 __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;
 }
@@ -283,7 +288,7 @@ __set_entity_link(entity *ent, void *l) {
 static INLINE ir_graph *
 __get_entity_irg(const entity *ent) {
   assert(ent && ent->kind == k_entity);
-  assert(ent == unknown_entity || 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;