X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Ftr%2Ftype_t.h;h=2b6f3df18c274d959848e8979e2e5f9a6e177e1a;hb=ff244fb7355c6120cf0f15ba7911b473bb91c64b;hp=71358b62038441551ffee82829c6f4b8fd5b0d95;hpb=134ecab995321db5c61c0fbf71c9b6916f911a9b;p=libfirm diff --git a/ir/tr/type_t.h b/ir/tr/type_t.h index 71358b620..2b6f3df18 100644 --- a/ir/tr/type_t.h +++ b/ir/tr/type_t.h @@ -115,15 +115,20 @@ typedef union { ptr_attr pa; /**< attributes of a pointer type */ } tp_attr; +enum type_flags { + tf_none = 0, /**< No flags. */ + tf_frame_type = 1, /**< Set if this is a frame type. */ + tf_lowered_type = 2, /**< Set if this is a lowered type. */ + tf_layout_fixed = 4 /**< set if the layout of a type is fixed */ +}; + /** the structure of a type */ struct ir_type { firm_kind kind; /**< the firm kind, must be k_type */ const tp_op *type_op; /**< the type operation of the type */ ident *name; /**< The name of the type */ visibility visibility; /**< Visibility of entities of this type. */ - char frame_type; /**< True if this is a frame type, false else */ - type_state state; /**< Represents the types state: layout undefined or - fixed. */ + unsigned flags; /**< Type flags, a bitmask of enum type_flags. */ int size; /**< Size of an entity of this type. This is determined when fixing the layout of this class. Size must be given in bits. */ @@ -135,11 +140,12 @@ struct ir_type { unsigned long visit; /**< visited counter for walks of the type information */ void *link; /**< holds temporary data - like in irnode_t.h */ struct dbg_info *dbi; /**< A pointer to information for debug support. */ + ir_type *assoc_type; /**< The associated lowered/unlowered type */ /* ------------- fields for analyses ---------------*/ #ifdef DEBUG_libfirm - int nr; /**< a unique node number for each node to make output + long nr; /**< a unique node number for each node to make output readable. */ #endif tp_attr attr; /* type kind specific fields. This must be the last @@ -279,7 +285,7 @@ _get_type_size_bytes(const ir_type *tp) { static INLINE type_state _get_type_state(const ir_type *tp) { assert(tp && tp->kind == k_type); - return tp->state; + return tp->flags & tf_layout_fixed ? layout_fixed : layout_undefined; } static INLINE unsigned long