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 */
40 variadicity variadicity; /* variadicity of the method */
45 /* type **unioned_type; * a list of unioned types. */
46 /* ident **delim_names; * names of the union delimiters. */
47 entity **members; /* fields of this union. No method entities
53 int n_dimensions; /* Number of array dimensions. */
54 ir_node **lower_bound; /* Lower bounds of dimensions. Usually all 0. */
55 ir_node **upper_bound; /* Upper bounds or dimensions. */
56 int *order; /* Ordering of dimensions. */
57 type *element_type; /* The type of the array elements. */
58 entity *element_ent; /* Entity for the array elements, to be used for
59 element selection with Sel. */
63 int n_enums; /* Number of enumerators. */
64 tarval **enumer; /* Contains all constants that represent a member
65 of the enum -- enumerators. */
66 ident **enum_nameid;/* Contains the names of the enum fields as specified by
71 type *points_to; /* The type of the enitity the pointer points to. */
75 typedef struct { * No private attr yet! *
80 typedef struct { * No private attr, must be smaller than others! *
99 type_state state; /* Represents the types state: layout undefined or
101 int size; /* Size of an entity of this type. This is determined
102 when fixing the layout of this class. Size must be
104 ir_mode *mode; /* The mode for atomic types */
105 unsigned long visit; /* visited counter for walks of the type information */
106 void *link; /* holds temporary data - like in irnode_t.h */
107 struct dbg_info* dbi; /* A pointer to information for debug support. */
108 tp_attr attr; /* type kind specific fields. This must be the last
109 entry in this struct! Varying size! */
114 * creates a new type representation
115 * @param type_op - the kind of this type. May not be type_id.
116 * @param mode - the mode to be used for this type, may be NULL
117 * @param name - an ident for the name of this type.
118 * @return a new type of the given type. The remaining private attributes are not
119 * @return initalized. The type is in state layout_undefined.
123 new_type(tp_op *type_op,
126 void free_type_attrs (type *tp);
128 INLINE void free_class_attrs (type *clss);
129 INLINE void free_struct_attrs (type *strct);
130 INLINE void free_method_attrs (type *method);
131 INLINE void free_union_attrs (type *uni);
132 INLINE void free_array_attrs (type *array);
133 INLINE void free_enumeration_attrs(type *enumeration);
134 INLINE void free_pointer_attrs (type *pointer);
135 INLINE void free_primitive_attrs (type *primitive);
138 # endif /* _TYPE_T_H_ */