Bugfix
[libfirm] / ir / tr / type_t.h
index 3315792..42f6d87 100644 (file)
@@ -6,9 +6,10 @@
 
 # ifndef _TYPE_T_H_
 # define _TYPE_T_H_
-
+# ifdef HAVE_CONFIG_H
+# include "config.h"
+# endif
 # include "type.h"
-
 /**
  * @file type_t.h
  * This file contains the datatypes hidden in type.h.
@@ -17,6 +18,7 @@
  * @see  type.h tpop_t.h tpop.h
  */
 
+/** class attributes */
 typedef struct {
   entity **members;    /**< fields and methods of this class */
   type   **subtypes;   /**< direct subtypes */
@@ -25,23 +27,24 @@ typedef struct {
   int dfn;             /**< number used for 'instanceof' operator */
 } cls_attr;
 
+/** struct attributs */
 typedef struct {
   entity **members;    /**< fields of this struct. No method entities
                          allowed. */
 } stc_attr;
 
+/** method attributes */
 typedef struct {
   int n_params;        /**< number of parameters */
-  type **param_type;   /**< code generation needs this information.
-                          @@@ Should it be generated by the frontend,
-                          or does this impose unnecessary work for
-                          optimizations that change the parameters of
-                          methods? */
+  type **param_type;   /**< code generation needs this information. */
+  type *value_params;  /**< A type whose entities represent copied value arguments. */
   int n_res;           /**< number of results */
   type **res_type;     /**< array with result types */
+  type *value_ress;    /**< A type whose entities represent copied value results. */
   variadicity variadicity; /**< variadicity of the method */
 } mtd_attr;
 
+/** union attributs */
 typedef struct {
   int     n_types;
   /* type  **unioned_type; * a list of unioned types. */
@@ -51,6 +54,7 @@ typedef struct {
 
 } uni_attr;
 
+/** array attributs */
 typedef struct {
   int   n_dimensions;  /**< Number of array dimensions.  */
   ir_node **lower_bound;   /**< Lower bounds of dimensions.  Usually all 0. */
@@ -61,6 +65,7 @@ typedef struct {
                          element selection with Sel. */
 } arr_attr;
 
+/** enum attributs */
 typedef struct {
   int      n_enums;    /**< Number of enumerators. */
   tarval **enumer;     /**< Contains all constants that represent a member
@@ -69,6 +74,7 @@ typedef struct {
                           the source program */
 } enm_attr;
 
+/** pointer attributs */
 typedef struct {
   type *points_to;     /**< The type of the enitity the pointer points to. */
 } ptr_attr;
@@ -83,7 +89,7 @@ typedef struct {        * No private attr, must be smaller than others! *
 } id_attr;
 */
 
-
+/** general type attributs */
 typedef union {
   cls_attr ca;
   stc_attr sa;
@@ -94,6 +100,7 @@ typedef union {
   ptr_attr pa;
 } tp_attr;
 
+/** the structure of a type */
 struct type {
   firm_kind kind;
   tp_op *type_op;
@@ -107,13 +114,18 @@ struct type {
   unsigned long visit;     /**< visited counter for walks of the type information */
   void *link;              /**< holds temporary data - like in irnode_t.h */
   struct dbg_info* dbi;    /**< A pointer to information for debug support. */
+
+#ifdef DEBUG_libfirm
+  int nr;             /**< a unique node number for each node to make output
+                             readable. */
+#endif
   tp_attr attr;            /* type kind specific fields. This must be the last
                              entry in this struct!  Varying size! */
 };
 
 /**
+ *   Creates a new type representation:
  *
- *   creates a new type representation
  *   @param type_op - the kind of this type.  May not be type_id.
  *   @param mode    - the mode to be used for this type, may be NULL
  *   @param name    - an ident for the name of this type.
@@ -137,4 +149,7 @@ INLINE void free_pointer_attrs    (type *pointer);
 INLINE void free_primitive_attrs  (type *primitive);
 
 
+/** initialize the type module */
+void init_type (void);
+
 # endif /* _TYPE_T_H_ */