12 * (C) 2001 by Universitaet Karlsruhe
16 * This module specifies the kinds of types available in firm. They are
17 * called type opcodes. These include classes, structs, methods, unions,
18 * arrays, enumerations, pointers and primitive types.
25 * typecode -- an enum for the type kinds
27 * For each type kind exists a typecode to identify it.
45 * tp_op - a structure containing information about a kind of type.
47 * A structure containing information about a kind of type. So far
48 * this is only the kind name, an enum for case-switching and some
51 * get_tpop_name, get_tpop_code, get_tpop_ident
54 typedef struct tp_op tp_op;
58 /****f* tpop/get_tpop_name
61 * get_tpop_name - Returns the string for the type opcode.
63 * const char *get_tpop_name (tp_op *op)
65 * op - The type opcode to get the string from.
67 * a string. (@@@ Null terminated???)
70 const char *get_tpop_name (tp_op *op);
72 /****f* tpop/get_tpop_code
75 * get_tpop_code - Returns an enum for the type opcode.
77 * tp_opcode get_tpop_code (tp_op *op);
79 * op - The type opcode to get the enum from.
84 tp_opcode get_tpop_code (tp_op *op);
86 /****f* tpop/get_tpop_ident
89 * get_tpop_ident - Returns the ident for the type opcode.
91 * ident *get_tpop_ident (tp_op *op);
93 * op - The type opcode to get the ident from.
98 ident *get_tpop_ident (tp_op *op);
100 /****d* tpop/type_class
105 * This type opcode marks that the corresponding type is a class type.
106 * Consequently the type refers to supertypes, subtypes and entities.
107 * Entities can be any fields, but also methods.
108 * @@@ value class or not???
110 * This struct is dynamically allocated but constant for the lifetime
114 extern tp_op *type_class;
117 /****d* tpop/type_struct
122 * This type opcode marks that the corresponding type is a compound type
123 * as a struct in C. Consequently the type refers to a list of entities
124 * which may not be methods (but pointers to methods).
126 * This struct is dynamically allocated but constant for the lifetime
130 extern tp_op *type_struct;
133 /****d* tpop/type_method
138 * This type opcode marks that the corresponding type is a method type.
139 * Consequently it refers to a list of arguments and results.
141 * This struct is dynamically allocated but constant for the lifetime
145 extern tp_op *type_method;
148 /****d* tpop/type_union
153 * This type opcode marks that the corresponding type is a union type.
154 * Consequently it refers to a list of unioned types.
156 * This struct is dynamically allocated but constant for the lifetime
160 extern tp_op *type_union;
163 /****d* tpop/type_array
168 * This type opcode marks that the corresponding type is an array type.
169 * Consequently it contains a list of dimensions (lower and upper bounds)
170 * and an element type.
172 * This struct is dynamically allocated but constant for the lifetime
176 extern tp_op *type_array;
179 /****d* tpop/type_enumeration
184 * This type opcode marks that the corresponding type is an enumeration type.
185 * Consequently it contains a list of idents for the enumeration identifiers
186 * and a list of tarbet values that are the constants used to implement
189 * This struct is dynamically allocated but constant for the lifetime
193 extern tp_op *type_enumeration;
196 /****d* tpop/type_pointer
201 * This type opcode marks that the corresponding type is a pointer type.
202 * It contains a reference to the type the pointer points to.
204 * This struct is dynamically allocated but constant for the lifetime
208 extern tp_op *type_pointer;
211 /****d* tpop/type_primitive
216 * This type opcode marks that the corresponding type is a primitive type.
217 * Primitive types are types that are directly mapped to target machine
220 * This struct is dynamically allocated but constant for the lifetime
224 extern tp_op *type_primitive;
227 # endif /*_TYPEOP_H_ */