- * @param member All entities belonging to this class. This are the fields
- * that can have any of the following types: type_class,
- * type_struct, type_union, type_array, type_enumeration,
- * type_pointer, type_primitive.
- * This is a dynamic list that can be grown with an "add_" function,
- * but not shrinked.
- * This is a dynamic list that can be grown with an "add_" function,
- * but not shrinked.
- */
-/* create a new type struct */
-type *new_type_struct (ident *name);
-type *new_d_type_struct (ident *name, dbg_info* db);
-
-/* manipulate private fields of struct */
-void add_struct_member (type *strct, entity *member);
-int get_struct_n_members (type *strct);
-entity *get_struct_member (type *strct, int pos);
-void set_struct_member (type *strct, int pos, entity *member);
-/* Finds member in the list of memberss and removees it */
-void remove_struct_member (type *strct, entity *member);
-
-/* typecheck */
-bool is_struct_type(type *strct);
-
-/**
- * Representation of a method type.
- * A method type represents a method, function or procedure type.
- * It contains a list of the parameter and result types, as these
- * are part of the type description. These lists should not
- * be changed by a optimization, as a change creates a new method
- * type. Therefore optimizations should allocated new method types.
- * The set_ routines are only for construction by a frontend.
- * @param n_params Number of parameters to the procedure.
- * A procedure in FIRM has only call by value parameters.
- *
- * @param param_type A list with the types of parameters. This list is ordered.
- * The nth type in this list corresponds to the nth element
- * in the parameter tuple that is a result of the start node.
- * (See ircons.h for more information.)
- *
- * @param n_res The number of results of the method. In general, procedures
- * have zero results, functions one.
- *
- * @param res_type A list with the types of parameters. This list is ordered.
- * The nth type in this list corresponds to the nth input to
- * Return nodes. (See ircons.h for more information.)
- */
-
-/* Create a new method type.
- N_param is the number of parameters, n_res the number of results.
- The arrays for the parameter and result types are not initialized by
- the constructor. */
-type *new_type_method (ident *name, int n_param, int n_res);
-type *new_d_type_method (ident *name, int n_param, int n_res, dbg_info* db);
-
-/* manipulate private fields of method. */
-int get_method_n_params (type *method);
-type *get_method_param_type(type *method, int pos);
-void set_method_param_type(type *method, int pos, type* tp);
-
-int get_method_n_ress (type *method);
-type *get_method_res_type(type *method, int pos);
-void set_method_res_type(type *method, int pos, type* tp);
-
-/*
- * this enum flags the variadicity of methods (methods with a
+ * The following attributes are private to this type kind:
+ * - member: All entities belonging to this class. This are the fields
+ * that can have any of the following types: type_class,
+ * type_struct, type_union, type_array, type_enumeration,
+ * type_pointer, type_primitive.
+ * This is a dynamic list that can be grown with an "add_" function,
+ * but not shrinked.
+ * This is a dynamic list that can be grown with an "add_" function,
+ * but not shrinked.
+ */
+/** Creates a new type struct */
+ir_type *new_type_struct (ident *name);
+/** Creates a new type struct with debug information. */
+ir_type *new_d_type_struct (ident *name, dbg_info* db);
+
+/* --- manipulate private fields of struct --- */
+
+/** Adds the entity as member of the struct. */
+void add_struct_member (ir_type *strct, entity *member);
+
+/** Returns the number of members of this struct. */
+int get_struct_n_members (const ir_type *strct);
+
+/** Returns the member at position pos, 0 <= pos < n_member */
+entity *get_struct_member (const ir_type *strct, int pos);
+
+/** Returns index of member in strct, -1 if not contained. */
+int get_struct_member_index(const ir_type *strct, entity *member);
+
+/** Overwrites the member at position pos, 0 <= pos < n_member with
+ the passed entity. */
+void set_struct_member (ir_type *strct, int pos, entity *member);
+
+/** Finds member in the list of members and removes it. */
+void remove_struct_member (ir_type *strct, entity *member);
+
+/** Returns true if a type is a struct type. */
+int is_Struct_type(const ir_type *strct);
+
+/**
+ * @page method_type Representation of a method type
+ *
+ * A method type represents a method, function or procedure type.
+ * It contains a list of the parameter and result types, as these
+ * are part of the type description. These lists should not
+ * be changed by a optimization, as a change creates a new method
+ * type. Therefore optimizations should allocated new method types.
+ * The set_ routines are only for construction by a frontend.
+ *
+ * - n_params: Number of parameters to the procedure.
+ * A procedure in FIRM has only call by value parameters.
+ *
+ * - param_type: A list with the types of parameters. This list is ordered.
+ * The nth type in this list corresponds to the nth element
+ * in the parameter tuple that is a result of the start node.
+ * (See ircons.h for more information.)
+ *
+ * - value_param_ents
+ * A list of entities (whose owner is a struct private to the
+ * method type) that represent parameters passed by value.
+ *
+ * - n_res: The number of results of the method. In general, procedures
+ * have zero results, functions one.
+ *
+ * - res_type: A list with the types of parameters. This list is ordered.
+ * The nth type in this list corresponds to the nth input to
+ * Return nodes. (See ircons.h for more information.)
+ *
+ * - value_res_ents
+ * A list of entities (whose owner is a struct private to the
+ * method type) that represent results passed by value.
+ */
+
+/* These macros define the suffixes for the types and entities used
+ to represent value parameters / results. */
+#define VALUE_PARAMS_SUFFIX "val_param"
+#define VALUE_RESS_SUFFIX "val_res"
+
+/** Create a new method type.
+ *
+ * @param name the name (ident) of this type
+ * @param n_param the number of parameters
+ * @param n_res the number of results
+ *
+ * The arrays for the parameter and result types are not initialized by
+ * the constructor.
+ */
+ir_type *new_type_method (ident *name, int n_param, int n_res);
+
+/** Create a new method type with debug information.
+ *
+ * @param name the name (ident) of this type
+ * @param n_param the number of parameters
+ * @param n_res the number of results
+ * @param db user defined debug information
+ *
+ * The arrays for the parameter and result types are not initialized by
+ * the constructor.
+ */
+ir_type *new_d_type_method (ident *name, int n_param, int n_res, dbg_info* db);
+
+/* -- manipulate private fields of method. -- */
+
+/** Returns the number of parameters of this method. */
+int get_method_n_params (const ir_type *method);
+
+/** Returns the type of the parameter at position pos of a method. */
+ir_type *get_method_param_type(ir_type *method, int pos);
+/** Sets the type of the parameter at position pos of a method.
+ Also changes the type in the pass-by-value representation by just
+ changing the type of the corresponding entity if the representation is constructed. */
+void set_method_param_type(ir_type *method, int pos, ir_type *tp);
+/** Returns an entity that represents the copied value argument. Only necessary
+ for compounds passed by value. This information is constructed only on demand. */
+entity *get_method_value_param_ent(ir_type *method, int pos);
+/**
+ * Returns a type that represents the copied value arguments.
+ */
+ir_type *get_method_value_param_type(const ir_type *method);
+
+/** Returns the number of results of a method type. */
+int get_method_n_ress (const ir_type *method);
+/** Returns the return type of a method type at position pos. */
+ir_type *get_method_res_type(ir_type *method, int pos);
+/** Sets the type of the result at position pos of a method.
+ Also changes the type in the pass-by-value representation by just
+ changing the type of the corresponding entity if the representation is constructed. */
+void set_method_res_type(ir_type *method, int pos, ir_type *tp);
+/** Returns an entity that represents the copied value result. Only necessary
+ for compounds passed by value. This information is constructed only on demand. */
+entity *get_method_value_res_ent(ir_type *method, int pos);
+
+/**
+ * Returns a type that represents the copied value results.
+ */
+ir_type *get_method_value_res_type(const ir_type *method);
+
+/**
+ * This enum flags the variadicity of methods (methods with a