+
+# ifndef _TYPE_T_H_
+# define _TYPE_T_H_
+
+# include "type.h"
+
+/****h* libfirm/type_t.h
+ *
+ * NAME
+ * file type_t.h
+ * COPYRIGHT
+ * (C) 2001 by Universitaet Karlsruhe
+ * AUTHORS
+ * Goetz Lindenmaier
+ * NOTES
+ * This file contains the datatypes hidden in type.h.
+ * SEE ALSO
+ * type.h tpop_t.h tpop.h
+ *****
+ */
+
+typedef struct {
+ entity **members; /* fields and methods of this class */
+ type **subtypes; /* direct subtypes */
+ type **supertypes; /* direct supertypes */
+} cls_attr;
+
+typedef struct {
+ entity **members; /* fields of this struct. No method entities
+ allowed. */
+} stc_attr;
+
+typedef struct {
+ int n_params; /* number of parameters */
+ type **param_type; /* code generation needs this information.
+ Should it be generated by the frontend,
+ or does this impose unnecessary work for
+ optimizations that change the parameters of
+ methods? */
+ int n_res; /* number of results */
+ type **res_type; /* array with result types */
+} mtd_attr;
+
+typedef struct {
+ int n_types;
+ type **unioned_type;/* a list of unioned types. */
+ ident **delim_names; /* names of the union delimiters. */
+} uni_attr;
+
+typedef struct {
+ int n_dimensions; /* Number of array dimensions. */
+ int *lower_bound; /* Lower bounds of dimensions. Usually all 0. */
+ int *upper_bound; /* Upper bounds or dimensions. */
+ type *element_type; /* The type of the array elements. */
+} arr_attr;
+
+typedef struct {
+ int n_enums; /* Number of enumerators. */
+ tarval **enumer; /* Contains all constants that represent a member
+ of the enum -- enumerators. */
+ ident **enum_nameid;/* Contains the names of the enum fields as specified by
+ the source program */
+} enm_attr;
+
+typedef struct {
+ type *points_to; /* The type of the enitity the pointer points to. */
+} ptr_attr;
+
+/*
+typedef struct { * No private attr yet. *
+} pri_attr;
+*/
+
+typedef union {
+ cls_attr ca;
+ stc_attr sa;
+ mtd_attr ma;
+ uni_attr ua;
+ arr_attr aa;
+ enm_attr ea;
+ ptr_attr pa;
+} tp_attr;
+
+struct type {
+ firm_kind kind;
+ tp_op *type_op;
+ ir_mode *mode;
+ ident *name;
+ 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. */
+ unsigned long visit; /* visited counter for walks of the type information */
+ tp_attr attr; /* type kind specific fields. This must be the last
+ entry in this struct! Varying size! */
+};
+
+/****f* type_t.h/new_type
+ *
+ * NAME
+ * new_type - creates a new type representation
+ * SYNOPSIS
+ * type *new_type(tp_op *type_op, ir_mode *mode, ident* name);
+ * INPUTS
+ * type_op - the kind of this type
+ * mode - the mode to be used for this type, may be NULL
+ * name - an ident for the name of this type.
+ * RESULT
+ * a new type of the given type. The remaining private attributes are not
+ * initalized.
+ ***
+ */
+inline type *
+new_type(tp_op *type_op,
+ ir_mode *mode,
+ ident* name);
+
+# endif /* _TYPE_T_H_ */