X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Ftr%2Ftype_t.h;h=fe15f326a8d693e4727f893be0fefbb1d3d867d4;hb=ea4bfbc9b3f96097cfc4ad9a96ebe8ca5509ab9e;hp=2d0737ffad0d01ffaef3e6d0e94a97a53d3242f2;hpb=8617950507d5cc19c95d53a59e0b1083744d8922;p=libfirm diff --git a/ir/tr/type_t.h b/ir/tr/type_t.h index 2d0737ffa..fe15f326a 100644 --- a/ir/tr/type_t.h +++ b/ir/tr/type_t.h @@ -1,4 +1,6 @@ +/* $Id$ */ + # ifndef _TYPE_T_H_ # define _TYPE_T_H_ @@ -23,6 +25,7 @@ typedef struct { entity **members; /* fields and methods of this class */ type **subtypes; /* direct subtypes */ type **supertypes; /* direct supertypes */ + peculiarity peculiarity; } cls_attr; typedef struct { @@ -54,6 +57,7 @@ typedef struct { int n_dimensions; /* Number of array dimensions. */ ir_node **lower_bound; /* Lower bounds of dimensions. Usually all 0. */ ir_node **upper_bound; /* Upper bounds or dimensions. */ + int *order; /* Ordering of dimensions. */ type *element_type; /* The type of the array elements. */ entity *element_ent; /* Entity for the array elements, to be used for element selection with Sel. */ @@ -72,9 +76,9 @@ typedef struct { } ptr_attr; /* -typedef struct { * No private attr yet. * -} pri_attr; -*/ +typedef struct { * No private attr yet! * +} pri_attr; */ + /* typedef struct { * No private attr, must be smaller than others! * @@ -95,14 +99,15 @@ typedef union { struct type { firm_kind kind; tp_op *type_op; - ir_mode *mode; ident *name; type_state state; /* Represents the types state: layout undefined or fixed. */ int size; /* Size of an entity of this type. This is determined when fixing the layout of this class. Size must be given in bytes. */ + ir_mode *mode; /* The mode for atomic types */ unsigned long visit; /* visited counter for walks of the type information */ + void *link; /* holds temporary data - like in irnode_t.h */ tp_attr attr; /* type kind specific fields. This must be the last entry in this struct! Varying size! */ }; @@ -126,5 +131,16 @@ inline type * new_type(tp_op *type_op, ir_mode *mode, ident* name); +void free_type_attrs (type *tp); + +inline void free_class_attrs (type *clss); +inline void free_struct_attrs (type *strct); +inline void free_method_attrs (type *method); +inline void free_union_attrs (type *uni); +inline void free_array_attrs (type *array); +inline void free_enumeration_attrs(type *enumeration); +inline void free_pointer_attrs (type *pointer); +inline void free_primitive_attrs (type *primitive); + # endif /* _TYPE_T_H_ */