12 * (C) 2001 by Universitaet Karlsruhe
14 * This file contains the datatypes hidden in type.h.
15 * @see type.h tpop_t.h tpop.h
19 entity **members; /* fields and methods of this class */
20 type **subtypes; /* direct subtypes */
21 type **supertypes; /* direct supertypes */
22 peculiarity peculiarity;
23 int dfn; /* number used for 'instanceof' operator */
27 entity **members; /* fields of this struct. No method entities
32 int n_params; /* number of parameters */
33 type **param_type; /* code generation needs this information.
34 @@@ Should it be generated by the frontend,
35 or does this impose unnecessary work for
36 optimizations that change the parameters of
38 int n_res; /* number of results */
39 type **res_type; /* array with result types */
44 /* type **unioned_type; * a list of unioned types. */
45 /* ident **delim_names; * names of the union delimiters. */
46 entity **members; /* fields of this union. No method entities
52 int n_dimensions; /* Number of array dimensions. */
53 ir_node **lower_bound; /* Lower bounds of dimensions. Usually all 0. */
54 ir_node **upper_bound; /* Upper bounds or dimensions. */
55 int *order; /* Ordering of dimensions. */
56 type *element_type; /* The type of the array elements. */
57 entity *element_ent; /* Entity for the array elements, to be used for
58 element selection with Sel. */
62 int n_enums; /* Number of enumerators. */
63 tarval **enumer; /* Contains all constants that represent a member
64 of the enum -- enumerators. */
65 ident **enum_nameid;/* Contains the names of the enum fields as specified by
70 type *points_to; /* The type of the enitity the pointer points to. */
74 typedef struct { * No private attr yet! *
79 typedef struct { * No private attr, must be smaller than others! *
98 type_state state; /* Represents the types state: layout undefined or
100 int size; /* Size of an entity of this type. This is determined
101 when fixing the layout of this class. Size must be
103 ir_mode *mode; /* The mode for atomic types */
104 unsigned long visit; /* visited counter for walks of the type information */
105 void *link; /* holds temporary data - like in irnode_t.h */
106 struct dbg_info* dbi; /* A pointer to information for debug support. */
107 tp_attr attr; /* type kind specific fields. This must be the last
108 entry in this struct! Varying size! */
113 * creates a new type representation
114 * @param type_op - the kind of this type. May not be type_id.
115 * @param mode - the mode to be used for this type, may be NULL
116 * @param name - an ident for the name of this type.
117 * @return a new type of the given type. The remaining private attributes are not
118 * @return initalized. The type is in state layout_undefined.
122 new_type(tp_op *type_op,
125 void free_type_attrs (type *tp);
127 INLINE void free_class_attrs (type *clss);
128 INLINE void free_struct_attrs (type *strct);
129 INLINE void free_method_attrs (type *method);
130 INLINE void free_union_attrs (type *uni);
131 INLINE void free_array_attrs (type *array);
132 INLINE void free_enumeration_attrs(type *enumeration);
133 INLINE void free_pointer_attrs (type *pointer);
134 INLINE void free_primitive_attrs (type *primitive);
137 # endif /* _TYPE_T_H_ */