added doxygen comments
[libfirm] / ir / tr / type.h
index 93604e8..45d9f03 100644 (file)
@@ -36,6 +36,8 @@
 # ifndef _TYPE_H_
 # define _TYPE_H_
 
+#include <stdbool.h>
+
 # include "tpop.h"
 # include "firm_common.h"
 # include "ident.h"
@@ -479,7 +481,7 @@ void set_class_dfn (type *clss, int dfn);
 int  get_class_dfn (const type *clss);
 
 /** Returns true if a type is a class type. */
-int is_class_type(const type *clss);
+int is_Class_type(const type *clss);
 
 /** Returns true if low is subclass of high. */
 int is_subclass_of(type *low, type *high);
@@ -526,7 +528,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. */
-int     is_struct_type(const type *strct);
+int     is_Struct_type(const type *strct);
 
 /**
  * @page method_type   Representation of a method type
@@ -660,7 +662,7 @@ int get_method_first_variadic_param_index(const type *method);
 void set_method_first_variadic_param_index(type *method, int index);
 
 /** Returns true if a type is a method type. */
-int   is_method_type     (const type *method);
+int   is_Method_type     (const type *method);
 
 /**
  *   @page union_type  Representation of a union type.
@@ -695,7 +697,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. */
-int     is_union_type          (const type *uni);
+int     is_Union_type          (const type *uni);
 
 /**
  * @page array_type    Representation of an array type
@@ -742,15 +744,32 @@ type *new_d_type_array         (ident *name, int n_dimensions,
 /** Returns the number of array dimensions of this type. */
 int   get_array_n_dimensions (const type *array);
 
-/** Allocates Const nodes of mode_I for the array dimensions */
+/**
+ * Allocates Const nodes of mode_I for one array dimension.
+ * Upper bound in Firm is the element next to the last, ie [lower,upper[
+ */
 void  set_array_bounds_int   (type *array, int dimension, int lower_bound,
                                                           int upper_bound);
+/**
+ * Sets the bounds for one array dimension.
+ * Upper bound in Firm is the element next to the last, ie [lower,upper[
+ */
 void  set_array_bounds       (type *array, int dimension, ir_node *lower_bound,
                                                           ir_node *upper_bound);
+/** Sets the lower bound for one array dimension, ie [lower,upper[ */
 void  set_array_lower_bound  (type *array, int dimension, ir_node *lower_bound);
+
+/** Allocates Const nodes of mode_I for the lower bound of an array
+    dimension, ie [lower,upper[ */
 void  set_array_lower_bound_int (type *array, int dimension, int lower_bound);
+
+/** Sets the upper bound for one array dimension, ie [lower,upper[ */
 void  set_array_upper_bound  (type *array, int dimension, ir_node *upper_bound);
-void  set_array_upper_bound_int (type *array, int dimension, int lower_bound);
+
+/** Allocates Const nodes of mode_I for the upper bound of an array
+    dimension, ie [lower,upper[ */
+void  set_array_upper_bound_int (type *array, int dimension, int upper_bound);
+
 /** returns true if lower bound != Unknown */
 int       has_array_lower_bound     (const type *array, int dimension);
 ir_node * get_array_lower_bound     (const type *array, int dimension);
@@ -772,7 +791,7 @@ void  set_array_element_entity (type *array, entity *ent);
 entity *get_array_element_entity (const type *array);
 
 /** Returns true if a type is an array type. */
-int    is_array_type(const type *array);
+int    is_Array_type(const type *array);
 
 /**
  * @page enumeration_type      Representation of an enumeration type
@@ -813,7 +832,7 @@ ident  *get_enumeration_nameid  (const type *enumeration, int pos);
 const char *get_enumeration_name(const type *enumeration, int pos);
 
 /** Returns true if a type is a enumeration type. */
-int     is_enumeration_type     (const type *enumeration);
+int     is_Enumeration_type     (const type *enumeration);
 
 /**
  * @page pointer_type  Representation of a pointer type
@@ -842,7 +861,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. */
-int   is_pointer_type            (const type *pointer);
+int   is_Pointer_type            (const type *pointer);
 
 /** Returns the first pointer type that has as points_to tp.
  *  Not efficient: O(#types).
@@ -863,7 +882,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. */
-int  is_primitive_type  (const type *primitive);
+int  is_Primitive_type  (const type *primitive);
 
 
 /**
@@ -884,7 +903,7 @@ int  is_primitive_type  (const type *primitive);
  *    size:  0
  */
 /* A variable that contains the only none type. */
-extern type *none_type;
+extern type *firm_none_type;
 /* Returns the none type */
 type *get_none_type(void);
 
@@ -906,7 +925,7 @@ type *get_none_type(void);
  *    size:  0
  */
 /* A variable that contains the only unknown type. */
-extern type *unknown_type;
+extern type *firm_unknown_type;
 /* Returns the unknown type */
 type *get_unknown_type(void);
 
@@ -923,7 +942,7 @@ int is_atomic_type(const type *tp);
 /**
  * Gets the number of elements in a firm compound type.
  *
- * This is just a comforability function, because structs and
+ * This is just a comfortability function, because structs and
  * classes can often be treated be the same code, but they have
  * different access functions to their members.
  *