X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Ftr%2Ftype_t.h;h=e61a951bb2d3c6b92b108679f373b4310dc1a5d4;hb=fe7ff338c74dd5d0ebdc2ebc13e905dc40ebfc86;hp=7e3b2a7419a40d3f5521b26fae9314bcdd2f6873;hpb=3d09b6f282cdd44357c48fcd0eb99ad6ef9c1a49;p=libfirm diff --git a/ir/tr/type_t.h b/ir/tr/type_t.h index 7e3b2a741..e61a951bb 100644 --- a/ir/tr/type_t.h +++ b/ir/tr/type_t.h @@ -72,7 +72,6 @@ typedef struct { ir_type *value_params; /**< A type whose entities represent copied value arguments. */ size_t n_res; /**< Number of results. */ tp_ent_pair *res_type; /**< Array of result type/value ir_entity pairs. */ - ir_type *value_ress; /**< A type whose entities represent copied value results. */ ir_variadicity variadicity; /**< The variadicity of the method. */ mtp_additional_properties additional_properties; /**< Set of additional method properties. */ unsigned irg_calling_conv; /**< A set of calling convention flags. */ @@ -88,7 +87,7 @@ typedef struct { size_t 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. */ + size_t *order; /**< Ordering of dimensions. */ ir_type *element_type; /**< The type of the array elements. */ ir_entity *element_ent; /**< entity for the array elements, to be used for element selection with a Sel node. */ @@ -309,6 +308,28 @@ static inline void _set_master_type_visited(ir_visited_t val) { firm_type_visite static inline ir_visited_t _get_master_type_visited(void) { return firm_type_visited; } static inline void _inc_master_type_visited(void) { ++firm_type_visited; } +static inline int is_lowered_type(const ir_type *tp) +{ + return tp->flags & tf_lowered_type; +} + +/** + * Gets the lowered/unlowered type of a type or NULL if this type + * has no lowered/unlowered one. + */ +static inline ir_type *get_associated_type(const ir_type *tp) +{ + return tp->assoc_type; +} + +static inline void set_lowered_type(ir_type *tp, ir_type *lowered_type) +{ + assert (is_type(tp) && is_type(lowered_type)); + lowered_type->flags |= tf_lowered_type; + tp->assoc_type = lowered_type; + lowered_type->assoc_type = tp; +} + static inline void *_get_type_link(const ir_type *tp) { assert(tp && tp->kind == k_type);