comments, freeing routine
[libfirm] / ir / tr / type.h
index 30c27e5..a938636 100644 (file)
@@ -141,7 +141,7 @@ ident*      get_type_ident(type *tp);
 void        set_type_ident(type *tp, ident* id);
 const char* get_type_name(type *tp);
 
-/** The state of a type layout. */
+/** The state of the type layout. */
 typedef enum {
   layout_undefined,    /**< The layout of this type is not defined.
                          Address computation to access fields is not
@@ -192,8 +192,8 @@ unsigned long get_type_visited(type *tp);
 void          set_type_visited(type *tp, unsigned long num);
 /* Sets visited field in type to type_visited. */
 void          mark_type_visited(type *tp);
-/* @@@ name clash!! bool          type_visited(type *tp); */
-bool          type_not_visited(type *tp);
+/* @@@ name clash!! int           type_visited(type *tp); */
+int           type_not_visited(type *tp);
 
 void*         get_type_link(type *tp);
 void          set_type_link(type *tp, void *l);
@@ -414,7 +414,8 @@ void    remove_class_supertype(type *clss, type *supertype);
 /** This enumeration flags the peculiarity of entities and types. */
 typedef enum peculiarity {
   peculiarity_description,     /**< Represents only a description.  The entity/type is never
-                                   allocated, no code/data exists for this entity/type. */
+                                   allocated, no code/data exists for this entity/type.
+                                   @@@ eventually rename to descriptive (adjectiv as the others!)*/
   peculiarity_inherited,       /**< Describes explicitly that other entities are
                                    inherited to the owner of this entity.
                                    Overwrites must refer to at least one other
@@ -422,7 +423,9 @@ typedef enum peculiarity {
                                    no irg for this entity, only for one of the
                                    overwritten ones.
                                    Only for entity. */
-  peculiarity_existent         /**< The entity/type (can) exist. */
+  peculiarity_existent         /**< The entity/type (can) exist.
+                                   @@@ eventually rename to 'real' i.e., 'echt'
+                                   This serves better as opposition to description _and_ inherited.*/
 } peculiarity;
 char *get_peculiarity_string(peculiarity p);
 
@@ -437,7 +440,7 @@ void set_class_dfn (type *clss, int dfn);
 int  get_class_dfn (type *clss);
 
 /** Returns true if a type is a class type. */
-bool is_class_type(type *clss);
+int is_class_type(type *clss);
 
 /** Returns true if low is subclass of high. */
 bool is_subclass_of(type *low, type *high);
@@ -484,7 +487,7 @@ void    set_struct_member   (type *strct, int pos, entity *member);
 void    remove_struct_member (type *strct, entity *member);
 
 /** Returns true if a type is a struct type. */
-bool    is_struct_type(type *strct);
+int     is_struct_type(type *strct);
 
 /**
  * @page method_type   Representation of a method type
@@ -617,7 +620,7 @@ int get_method_first_variadic_param_index(type *method);
 void set_method_first_variadic_param_index(type *method, int index);
 
 /** Returns true if a type is a method type. */
-bool  is_method_type     (type *method);
+int   is_method_type     (type *method);
 
 /**
  *   @page union_type  Representation of a union type.
@@ -652,7 +655,7 @@ void    set_union_member (type *uni, int pos, entity *member);
 void    remove_union_member (type *uni, entity *member);
 
 /** Returns true if a type is a union type. */
-bool    is_union_type          (type *uni);
+int     is_union_type          (type *uni);
 
 /**
  * @page array_type    Representation of an array type
@@ -722,7 +725,7 @@ void  set_array_element_entity (type *array, entity *ent);
 entity *get_array_element_entity (type *array);
 
 /** Returns true if a type is an array type. */
-bool   is_array_type         (type *array);
+int    is_array_type(type *array);
 
 /**
  * @page enumeration_type      Representation of an enumeration type
@@ -763,7 +766,7 @@ ident  *get_enumeration_nameid  (type *enumeration, int pos);
 const char *get_enumeration_name(type *enumeration, int pos);
 
 /** Returns true if a type is a enumeration type. */
-bool    is_enumeration_type     (type *enumeration);
+int     is_enumeration_type     (type *enumeration);
 
 /**
  * @page pointer_type  Representation of a pointer type
@@ -792,7 +795,7 @@ void  set_pointer_points_to_type (type *pointer, type *tp);
 type *get_pointer_points_to_type (type *pointer);
 
 /** Returns true if a type is a pointer type. */
-bool  is_pointer_type            (type *pointer);
+int   is_pointer_type            (type *pointer);
 
 /** Returns the first pointer type that has as points_to tp.
  *  Not efficient: O(#types).
@@ -813,7 +816,7 @@ type *new_type_primitive (ident *name, ir_mode *mode);
 type *new_d_type_primitive (ident *name, ir_mode *mode, dbg_info* db);
 
 /** Returns true if a type is a primitive type. */
-bool  is_primitive_type  (type *primitive);
+int  is_primitive_type  (type *primitive);
 
 
 /**