c959edc13a9092a50256932d9f846542db696c48
[libfirm] / ir / tr / type_t.h
1 /*
2  * Copyright (C) 1995-2007 University of Karlsruhe.  All right reserved.
3  *
4  * This file is part of libFirm.
5  *
6  * This file may be distributed and/or modified under the terms of the
7  * GNU General Public License version 2 as published by the Free Software
8  * Foundation and appearing in the file LICENSE.GPL included in the
9  * packaging of this file.
10  *
11  * Licensees holding valid libFirm Professional Edition licenses may use
12  * this file in accordance with the libFirm Commercial License.
13  * Agreement provided with the Software.
14  *
15  * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
16  * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR
17  * PURPOSE.
18  */
19
20 /**
21  * @file
22  * @brief   Representation of types -- private header.
23  * @author  Goetz Lindenmaier, Michael Beck
24  * @version $Id$
25  * @see     type.h tpop_t.h tpop.h
26  */
27 #ifndef FIRM_TR_TYPE_T_H
28 #define FIRM_TR_TYPE_T_H
29
30 #include "firm_config.h"
31 #include "typerep.h"
32 #include "tpop_t.h"
33 #include "irgraph.h"
34 #include "firm_common.h"
35
36 #include "array.h"
37
38 /** Class flags. */
39 enum class_flags {
40         cf_none            = 0,  /**< No flags. */
41         cf_final_class     = 1,  /**< Set if a class is an final class */
42         cf_interface_class = 2,  /**< Set if a class is an "interface" */
43         cf_absctract_class = 4,  /**< Set if a class is "abstract" */
44 };
45
46 /** Class type attributes. */
47 typedef struct {
48         ir_entity  **members;           /**< Array containing the fields and methods of this class. */
49         ir_type **subtypes;          /**< Array containing the direct subtypes. */
50         ir_type **supertypes;        /**< Array containing the direct supertypes */
51         ir_peculiarity peculiarity;  /**< The peculiarity of this class. */
52         ir_entity *type_info;        /**< An ir_entity representing this class, used for type info. */
53         int      dfn;                /**< A number that can be used for 'instanceof' operator. */
54         unsigned vtable_size;        /**< The size of the vtable for this class. */
55         unsigned clss_flags;         /**< Additional class flags. */
56 } cls_attr;
57
58 /** Struct type attributes. */
59 typedef struct {
60         ir_entity **members; /**< Fields of this struct. No method entities allowed. */
61 } stc_attr;
62
63 /** A (type, ir_entity) pair. */
64 typedef struct {
65         ir_type *tp;         /**< A type. */
66         ir_entity  *ent;     /**< An ir_entity. */
67         ident   *param_name; /**< For debugging purposes: the name of the parameter */
68 } tp_ent_pair;
69
70 /** Method type attributes. */
71 typedef struct {
72         int n_params;                   /**< Number of parameters. */
73         tp_ent_pair *params;            /**< Array of parameter type/value entities pairs. */
74         ir_type *value_params;          /**< A type whose entities represent copied value arguments. */
75         int n_res;                      /**< Number of results. */
76         tp_ent_pair *res_type;          /**< Array of result type/value ir_entity pairs. */
77         ir_type *value_ress;            /**< A type whose entities represent copied value results. */
78         variadicity variadicity;        /**< The variadicity of the method. */
79         int first_variadic_param;       /**< The index of the first variadic parameter or -1 if non-variadic .*/
80         unsigned additional_properties; /**< Set of additional method properties. */
81         unsigned irg_calling_conv;      /**< A set of calling convention flags. */
82 } mtd_attr;
83
84 /** Union type attributes. */
85 typedef struct {
86         ir_entity **members;    /**< Fields of this union. No method entities allowed. */
87 } uni_attr;
88
89 /** Array type attributes. */
90 typedef struct {
91         int     n_dimensions;   /**< Number of array dimensions.  */
92         ir_node **lower_bound;  /**< Lower bounds of dimensions.  Usually all 0. */
93         ir_node **upper_bound;  /**< Upper bounds or dimensions. */
94         int     *order;         /**< Ordering of dimensions. */
95         ir_type *element_type;  /**< The type of the array elements. */
96         ir_entity *element_ent; /**< entity for the array elements, to be used for
97                                      element selection with a Sel node. */
98 } arr_attr;
99
100 /** An enumerator constant. */
101 struct ir_enum_const {
102         tarval  *value;     /**< The constants that represents this enumerator identifier. */
103         ident   *nameid;    /**< The name of the enumerator identifier. */
104         ir_type *owner;     /**< owner type of this enumerator constant. */
105 };
106
107 /** Enum type attributes. */
108 typedef struct {
109         ir_enum_const *enumer;   /**< Contains all enumerator constants that represent a member
110                                       of the enum -- enumerators. */
111 } enm_attr;
112
113 /** Pointer type attributes. */
114 typedef struct {
115         ir_type *points_to;  /**< The type of the ir_entity the pointer points to. */
116 } ptr_attr;
117
118 /** Primitive type attributes. */
119 typedef struct {
120         ir_type *base_type;  /**< For bitfield types: The base primitive type, NULL else. */
121 } pri_attr;
122
123
124 /*
125 typedef struct {        * No private attr, must be smaller than others! *
126 } id_attr;
127 */
128
129 /** General type attributes. */
130 typedef union {
131         cls_attr ca;      /**< Attributes of a class type */
132         stc_attr sa;      /**< Attributes of a struct type */
133         mtd_attr ma;      /**< Attributes of a method type */
134         uni_attr ua;      /**< Attributes of an union type */
135         arr_attr aa;      /**< Attributes of an array type */
136         enm_attr ea;      /**< Attributes of an enumeration type */
137         ptr_attr pa;      /**< Attributes of a pointer type */
138         pri_attr ba;      /**< Attributes of a primitive bitfield type */
139 } tp_attr;
140
141 /** Additional type flags. */
142 enum type_flags {
143         tf_none             =  0, /**< No flags. */
144         tf_frame_type       =  1, /**< Set if this is a frame type. */
145         tf_value_param_type =  2, /**< Set if this is a value param type. */
146         tf_lowered_type     =  4, /**< Set if this is a lowered type. */
147         tf_layout_fixed     =  8, /**< Set if the layout of a type is fixed */
148         tf_global_type      = 16, /**< Set only for the global type */
149         tf_tls_type         = 32, /**< Set only for the tls type */
150 };
151
152 /**
153  *  An abstract data type to represent types.
154  *
155  *  This is the abstract data type with which any type known in the
156  *  compiled program can be represented.  This includes types specified
157  *  in the program as well as types defined by the language.  In the
158  *  view of the intermediate representation there is no difference
159  *  between these types.
160  *
161  *  There exist several kinds of types, arranged by the structure of
162  *  the type.  These are distinguished by a type opcode.
163  *  A type is described by a set of attributes.  Some of these attributes
164  *  are common to all types, others depend on the kind of the type.
165  *
166  *  The following describes the common attributes.  They can only be
167  *  accessed by the functions given below.
168  *
169  *  The common fields are:
170  *
171  *  - firm_kind:   A firm_kind tag containing k_type.  This is useful
172  *                 for dynamically checking whether a node is a type node.
173  *  - type_op:     A tp_op specifying the kind of the type.
174  *  - name:        An identifier specifying the name of the type.  To be
175  *                 set by the frontend.
176  *  - visibility:  The visibility of this type.
177  *  - size:        The size of the type, i.e. an entity of this type will
178  *                 occupy size bits in memory.  In several cases this is
179  *                 determined when fixing the layout of this type (class,
180  *                 struct, union, array, enumeration).
181  *  - alignment    The alignment of the type, i.e. an entity of this type will
182  *                 be allocated an an address in memory with this alignment.
183  *                 In several cases this is determined when fixing the layout
184  *                 of this type (class, struct, union, array)
185  *  - mode:        The mode to be used to represent the type on a machine.
186  *  - state:       The state of the type.  The state represents whether the
187  *                 layout of the type is undefined or fixed (values: layout_undefined
188  *                 or layout_fixed).  Compound types can have an undefined
189  *                 layout.  The layout of the basic types primitive and pointer
190  *                 is always layout_fixed.  If the layout of
191  *                 compound types is fixed all entities must have an offset
192  *                 and the size of the type must be set.
193  *                 A fixed layout for enumeration types means that each enumeration
194  *                 is associated with an implementation value.
195  *  - assoc_type:  The associated lowered/upper type.
196  *  - visit:       A counter for walks of the type information.
197  *  - link:        A void* to associate some additional information with the type.
198  *
199  *  These fields can only be accessed via access functions.
200  *
201  *  Depending on the value of @c type_op, i.e., depending on the kind of the
202  *  type the adt contains further attributes.  These are documented below.
203  *
204  *  @see
205  *
206  *  @link class_type class @endlink, @link struct_type struct @endlink,
207  *  @link method_type method @endlink, @link union_type union @endlink,
208  *  @link array_type array @endlink, @link enumeration_type enumeration @endlink,
209  *  @link pointer_type pointer @endlink, @link primitive_type primitive @endlink
210  *
211  *  @todo
212  *      mode maybe not global field??
213  */
214 struct ir_type {
215         firm_kind kind;          /**< the firm kind, must be k_type */
216         const tp_op *type_op;    /**< the type operation of the type */
217         ident *name;             /**< The name of the type */
218         ir_visibility visibility;/**< Visibility of entities of this type. */
219         unsigned flags;          /**< Type flags, a bitmask of enum type_flags. */
220         int size;                /**< Size of an ir_entity of this type. This is determined
221                                       when fixing the layout of this class.  Size must be
222                                       given in bits. */
223         int align;               /**< Alignment of an ir_entity of this type. This should be
224                                       set according to the source language needs. If not set it's
225                                       calculated automatically by get_type_alignment().
226                                       Alignment must be given in bits. */
227         ir_mode *mode;           /**< The mode for atomic types */
228         unsigned long visit;     /**< visited counter for walks of the type information */
229         void *link;              /**< holds temporary data - like in irnode_t.h */
230         struct dbg_info *dbi;    /**< A pointer to information for debug support. */
231         ir_type *assoc_type;     /**< The associated lowered/unlowered type */
232
233         /* ------------- fields for analyses ---------------*/
234
235 #ifdef DEBUG_libfirm
236         long nr;                 /**< An unique node number for each node to make output
237                                       readable. */
238 #endif
239         tp_attr attr;            /**< Type kind specific fields. This must be the last
240                                       entry in this struct!  Varying size! */
241 };
242
243 /**
244  *   Creates a new type representation:
245  *
246  *   @param type_op  the kind of this type.  May not be type_id.
247  *   @param mode     the mode to be used for this type, may be NULL
248  *   @param name     an ident for the name of this type.
249  *   @param db       debug info
250  *
251  *   @return A new type of the given type.  The remaining private attributes are not
252  *           initialized.  The type is in state layout_undefined.
253  */
254 ir_type *
255 new_type(tp_op *type_op, ir_mode *mode, ident *name, dbg_info *db);
256 void free_type_attrs       (ir_type *tp);
257
258 void free_class_entities      (ir_type *clss);
259 void free_struct_entities     (ir_type *strct);
260 void free_method_entities     (ir_type *method);
261 void free_union_entities      (ir_type *uni);
262 void free_array_entities      (ir_type *array);
263 void free_enumeration_entities(ir_type *enumeration);
264 void free_pointer_entities    (ir_type *pointer);
265
266 void free_array_automatic_entities(ir_type *array);
267
268 void free_class_attrs      (ir_type *clss);
269 void free_struct_attrs     (ir_type *strct);
270 void free_method_attrs     (ir_type *method);
271 void free_union_attrs      (ir_type *uni);
272 void free_array_attrs      (ir_type *array);
273 void free_enumeration_attrs(ir_type *enumeration);
274 void free_pointer_attrs    (ir_type *pointer);
275
276 void set_class_mode(ir_type *tp, ir_mode *mode);
277 void set_struct_mode(ir_type *tp, ir_mode *mode);
278 void set_pointer_mode(ir_type *tp, ir_mode *mode);
279 void set_primitive_mode(ir_type *tp, ir_mode *mode);
280 void set_enumeration_mode(ir_type *tp, ir_mode *mode);
281
282 void set_class_size_bits(ir_type *tp, int bits);
283 void set_struct_size_bits(ir_type *tp, int bits);
284 void set_union_size_bits(ir_type *tp, int bits);
285 void set_array_size_bits(ir_type *tp, int size);
286 void set_default_size_bits(ir_type *tp, int size);
287
288 /**
289  * Initialize the type module.
290  *
291  * @param builtin_db       debug info for built-in objects
292  * @param default_cc_mask  default calling conventions for methods
293  */
294 void firm_init_type(dbg_info *builtin_db, unsigned default_cc_mask);
295
296
297 /* ------------------- *
298  *  inline functions   *
299  * ------------------- */
300
301 extern unsigned long firm_type_visited;
302
303 static INLINE void _set_master_type_visited(unsigned long val) { firm_type_visited = val; }
304 static INLINE unsigned long _get_master_type_visited(void)     { return firm_type_visited; }
305 static INLINE void _inc_master_type_visited(void)              { ++firm_type_visited; }
306
307 static INLINE void *
308 _get_type_link(const ir_type *tp) {
309         assert(tp && tp->kind == k_type);
310         return(tp -> link);
311 }
312
313 static INLINE void
314 _set_type_link(ir_type *tp, void *l) {
315         assert(tp && tp->kind == k_type);
316         tp -> link = l;
317 }
318
319 static INLINE const tp_op*
320 _get_type_tpop(const ir_type *tp) {
321         assert(tp && tp->kind == k_type);
322         return tp->type_op;
323 }
324
325 static INLINE ident*
326 _get_type_tpop_nameid(const ir_type *tp) {
327         assert(tp && tp->kind == k_type);
328         return get_tpop_ident(tp->type_op);
329 }
330
331 static INLINE tp_opcode
332 _get_type_tpop_code(const ir_type *tp) {
333         assert(tp && tp->kind == k_type);
334         return get_tpop_code(tp->type_op);
335 }
336
337 static INLINE ir_mode *
338 _get_type_mode(const ir_type *tp) {
339         assert(tp && tp->kind == k_type);
340         return tp->mode;
341 }
342
343 static INLINE ident *
344 _get_type_ident(const ir_type *tp) {
345         assert(tp && tp->kind == k_type);
346         return tp->name;
347 }
348
349 static INLINE void
350 _set_type_ident(ir_type *tp, ident* id) {
351         assert(tp && tp->kind == k_type);
352         tp->name = id;
353 }
354
355 static INLINE int
356 _get_type_size_bits(const ir_type *tp) {
357         assert(tp && tp->kind == k_type);
358         return tp->size;
359 }
360
361 static INLINE int
362 _get_type_size_bytes(const ir_type *tp) {
363         int size = _get_type_size_bits(tp);
364         if (size < 0)
365                 return -1;
366         if ((size & 7) != 0) {
367                 assert(0 && "cannot take byte size of this type");
368                 return -1;
369         }
370         return size >> 3;
371 }
372
373 static INLINE ir_type_state
374 _get_type_state(const ir_type *tp) {
375         assert(tp && tp->kind == k_type);
376         return tp->flags & tf_layout_fixed ? layout_fixed : layout_undefined;
377 }
378
379 static INLINE unsigned long
380 _get_type_visited(const ir_type *tp) {
381         assert(tp && tp->kind == k_type);
382         return tp->visit;
383 }
384
385 static INLINE void
386 _set_type_visited(ir_type *tp, unsigned long num) {
387         assert(tp && tp->kind == k_type);
388         tp->visit = num;
389 }
390
391 static INLINE void
392 _mark_type_visited(ir_type *tp) {
393         assert(tp && tp->kind == k_type);
394         assert(tp->visit < firm_type_visited);
395         tp->visit = firm_type_visited;
396 }
397
398 static INLINE int
399 _type_visited(const ir_type *tp) {
400         assert(tp && tp->kind == k_type);
401         return tp->visit >= firm_type_visited;
402 }
403
404 static INLINE int
405 _type_not_visited(const ir_type *tp) {
406         assert(tp && tp->kind == k_type);
407         return tp->visit  < firm_type_visited;
408 }
409
410 static INLINE dbg_info *
411 _get_type_dbg_info(const ir_type *tp) {
412         return tp->dbi;
413 }
414
415 static INLINE void
416 _set_type_dbg_info(ir_type *tp, dbg_info *db) {
417         tp->dbi = db;
418 }
419
420 static INLINE int
421 _is_type(const void *thing) {
422         return (get_kind(thing) == k_type);
423 }
424
425 static INLINE int
426 _is_class_type(const ir_type *clss) {
427         assert(clss);
428         return (clss->type_op == type_class);
429 }
430
431 static INLINE int
432 _get_class_n_members (const ir_type *clss) {
433         assert(clss && (clss->type_op == type_class));
434         return (ARR_LEN (clss->attr.ca.members));
435 }
436
437 static INLINE ir_entity *
438 _get_class_member   (const ir_type *clss, int pos) {
439         assert(clss && (clss->type_op == type_class));
440         assert(pos >= 0 && pos < _get_class_n_members(clss));
441         return clss->attr.ca.members[pos];
442 }
443
444 static INLINE unsigned
445 _get_class_vtable_size(const ir_type *clss) {
446         assert(clss && (clss->type_op == type_class));
447         return clss->attr.ca.vtable_size;
448 }
449
450 static INLINE void
451 _set_class_vtable_size(ir_type *clss, unsigned vtable_size) {
452         assert(clss && (clss->type_op == type_class));
453         clss->attr.ca.vtable_size = vtable_size;
454 }
455
456 static INLINE int
457 _is_class_final(const ir_type *clss) {
458         assert(clss && (clss->type_op == type_class));
459         return clss->attr.ca.clss_flags & cf_final_class;
460 }
461
462 static INLINE void
463 _set_class_final(ir_type *clss, int final) {
464         assert(clss && (clss->type_op == type_class));
465         if (final)
466                 clss->attr.ca.clss_flags |= cf_final_class;
467         else
468                 clss->attr.ca.clss_flags &= ~cf_final_class;
469 }
470
471 static INLINE int
472 _is_class_interface(const ir_type *clss) {
473         assert(clss && (clss->type_op == type_class));
474         return clss->attr.ca.clss_flags & cf_interface_class;
475 }
476
477 static INLINE void
478 _set_class_interface(ir_type *clss, int final) {
479         assert(clss && (clss->type_op == type_class));
480         if (final)
481                 clss->attr.ca.clss_flags |= cf_interface_class;
482         else
483                 clss->attr.ca.clss_flags &= ~cf_interface_class;
484 }
485
486 static INLINE int
487 _is_class_abstract(const ir_type *clss) {
488         assert(clss && (clss->type_op == type_class));
489         return clss->attr.ca.clss_flags & cf_absctract_class;
490         }
491
492 static INLINE void
493 _set_class_abstract(ir_type *clss, int final) {
494         assert(clss && (clss->type_op == type_class));
495         if (final)
496                 clss->attr.ca.clss_flags |= cf_absctract_class;
497         else
498                 clss->attr.ca.clss_flags &= ~cf_absctract_class;
499 }
500
501 static INLINE int
502 _is_struct_type(const ir_type *strct) {
503         assert(strct);
504         return (strct->type_op == type_struct);
505 }
506
507 static INLINE int
508 _is_method_type(const ir_type *method) {
509         assert(method);
510         return (method->type_op == type_method);
511 }
512
513 static INLINE int
514 _is_union_type(const ir_type *uni) {
515         assert(uni);
516         return (uni->type_op == type_union);
517 }
518
519 static INLINE int
520 _is_array_type(const ir_type *array) {
521         assert(array);
522         return (array->type_op == type_array);
523 }
524
525 static INLINE int
526 _is_enumeration_type(const ir_type *enumeration) {
527         assert(enumeration);
528         return (enumeration->type_op == type_enumeration);
529 }
530
531 static INLINE int
532 _is_pointer_type(const ir_type *pointer) {
533         assert(pointer);
534         return (pointer->type_op == type_pointer);
535 }
536
537 /** Returns true if a type is a primitive type. */
538 static INLINE int
539 _is_primitive_type(const ir_type *primitive) {
540         assert(primitive && primitive->kind == k_type);
541         return (primitive->type_op == type_primitive);
542 }
543
544 static INLINE int
545 _is_atomic_type(const ir_type *tp) {
546         assert(tp && tp->kind == k_type);
547         return (_is_primitive_type(tp) || _is_pointer_type(tp) ||
548                 _is_enumeration_type(tp));
549 }
550
551 static INLINE int
552 _get_method_n_params(const ir_type *method) {
553         assert(method && (method->type_op == type_method));
554         return method->attr.ma.n_params;
555 }
556
557 static INLINE int
558 _get_method_n_ress(const ir_type *method) {
559         assert(method && (method->type_op == type_method));
560         return method->attr.ma.n_res;
561 }
562
563 static INLINE unsigned
564 _get_method_additional_properties(const ir_type *method) {
565         assert(method && (method->type_op == type_method));
566         return method->attr.ma.additional_properties;
567 }
568
569 static INLINE void
570 _set_method_additional_properties(ir_type *method, unsigned mask) {
571         assert(method && (method->type_op == type_method));
572
573         /* do not allow to set the mtp_property_inherited flag or
574          * the automatic inheritance of flags will not work */
575         method->attr.ma.additional_properties = mask & ~mtp_property_inherited;
576 }
577
578 static INLINE void
579 _set_method_additional_property(ir_type *method, mtp_additional_property flag) {
580         assert(method && (method->type_op == type_method));
581
582         /* do not allow to set the mtp_property_inherited flag or
583          * the automatic inheritance of flags will not work */
584         method->attr.ma.additional_properties |= flag & ~mtp_property_inherited;
585 }
586
587 static INLINE unsigned
588 _get_method_calling_convention(const ir_type *method) {
589         assert(method && (method->type_op == type_method));
590         return method->attr.ma.irg_calling_conv;
591 }
592
593 static INLINE void
594 _set_method_calling_convention(ir_type *method, unsigned cc_mask) {
595         assert(method && (method->type_op == type_method));
596         method->attr.ma.irg_calling_conv = cc_mask;
597 }
598
599
600 #define set_master_type_visited(val)      _set_master_type_visited(val)
601 #define get_master_type_visited()         _get_master_type_visited()
602 #define inc_master_type_visited()         _inc_master_type_visited()
603 #define get_type_link(tp)                 _get_type_link(tp)
604 #define set_type_link(tp, l)              _set_type_link(tp, l)
605 #define get_type_tpop(tp)                 _get_type_tpop(tp)
606 #define get_type_tpop_nameid(tp)          _get_type_tpop_nameid(tp)
607 #define get_type_tpop_code(tp)            _get_type_tpop_code(tp)
608 #define get_type_mode(tp)                 _get_type_mode(tp)
609 #define get_type_ident(tp)                _get_type_ident(tp)
610 #define set_type_ident(tp, id)            _set_type_ident(tp, id)
611 #define get_type_size_bits(tp)            _get_type_size_bits(tp)
612 #define get_type_size_bytes(tp)           _get_type_size_bytes(tp)
613 #define get_type_state(tp)                _get_type_state(tp)
614 #define get_type_visited(tp)              _get_type_visited(tp)
615 #define set_type_visited(tp, num)         _set_type_visited(tp, num)
616 #define mark_type_visited(tp)             _mark_type_visited(tp)
617 #define type_visited(tp)                  _type_visited(tp)
618 #define type_not_visited(tp)              _type_not_visited(tp)
619 #define get_type_dbg_info(tp)             _get_type_dbg_info(tp)
620 #define set_type_dbg_info(tp, db)         _set_type_dbg_info(tp, db)
621 #define is_type(thing)                    _is_type(thing)
622 #define is_Class_type(clss)               _is_class_type(clss)
623 #define get_class_n_members(clss)         _get_class_n_members(clss)
624 #define get_class_member(clss, pos)       _get_class_member(clss, pos)
625 #define get_class_vtable_size(clss)       _get_class_vtable_size(clss)
626 #define set_class_vtable_size(clss, size) _set_class_vtable_size(clss, size)
627 #define is_class_final(clss)              _is_class_final(clss)
628 #define set_class_final(clss, flag)       _set_class_final(clss, flag)
629 #define is_class_interface(clss)          _is_class_interface(clss)
630 #define set_class_interface(clss, flag)   _set_class_interface(clss, flag)
631 #define is_class_abstract(clss)           _is_class_abstract(clss)
632 #define set_class_abstract(clss, flag)    _set_class_abstract(clss, flag)
633 #define is_Struct_type(strct)             _is_struct_type(strct)
634 #define is_Method_type(method)            _is_method_type(method)
635 #define is_Union_type(uni)                _is_union_type(uni)
636 #define is_Array_type(array)              _is_array_type(array)
637 #define is_Enumeration_type(enumeration)  _is_enumeration_type(enumeration)
638 #define is_Pointer_type(pointer)          _is_pointer_type(pointer)
639 #define is_Primitive_type(primitive)      _is_primitive_type(primitive)
640 #define is_atomic_type(tp)                _is_atomic_type(tp)
641 #define get_method_n_params(method)       _get_method_n_params(method)
642 #define get_method_n_ress(method)         _get_method_n_ress(method)
643 #define get_method_additional_properties(method)        _get_method_additional_properties(method)
644 #define set_method_additional_properties(method, mask)  _set_method_additional_properties(method, mask)
645 #define set_method_additional_property(method, flag)    _set_method_additional_property(method, flag)
646 #define get_method_calling_convention(method)           _get_method_calling_convention(method)
647 #define set_method_calling_convention(method, cc_mask)  _set_method_calling_convention(method, cc_mask)
648
649 #endif /* FIRM_TR_TYPE_T_H */