size/aligment of types is now unsigned and in bytes, this fixes fehler095.c (array...
[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         unsigned 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 bytes. */
223         unsigned 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 bytes. */
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(ir_type *tp, unsigned bytes);
283 void set_struct_size(ir_type *tp, unsigned bytes);
284 void set_union_size(ir_type *tp, unsigned bytes);
285 void set_array_size(ir_type *tp, unsigned bytes);
286 void set_default_size(ir_type *tp, unsigned bytes);
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 unsigned
356 _get_type_size_bytes(const ir_type *tp) {
357         assert(tp && tp->kind == k_type);
358         return tp->size;
359 }
360
361 static INLINE ir_type_state
362 _get_type_state(const ir_type *tp) {
363         assert(tp && tp->kind == k_type);
364         return tp->flags & tf_layout_fixed ? layout_fixed : layout_undefined;
365 }
366
367 static INLINE unsigned long
368 _get_type_visited(const ir_type *tp) {
369         assert(tp && tp->kind == k_type);
370         return tp->visit;
371 }
372
373 static INLINE void
374 _set_type_visited(ir_type *tp, unsigned long num) {
375         assert(tp && tp->kind == k_type);
376         tp->visit = num;
377 }
378
379 static INLINE void
380 _mark_type_visited(ir_type *tp) {
381         assert(tp && tp->kind == k_type);
382         assert(tp->visit < firm_type_visited);
383         tp->visit = firm_type_visited;
384 }
385
386 static INLINE int
387 _type_visited(const ir_type *tp) {
388         assert(tp && tp->kind == k_type);
389         return tp->visit >= firm_type_visited;
390 }
391
392 static INLINE int
393 _type_not_visited(const ir_type *tp) {
394         assert(tp && tp->kind == k_type);
395         return tp->visit  < firm_type_visited;
396 }
397
398 static INLINE dbg_info *
399 _get_type_dbg_info(const ir_type *tp) {
400         return tp->dbi;
401 }
402
403 static INLINE void
404 _set_type_dbg_info(ir_type *tp, dbg_info *db) {
405         tp->dbi = db;
406 }
407
408 static INLINE int
409 _is_type(const void *thing) {
410         return (get_kind(thing) == k_type);
411 }
412
413 static INLINE int
414 _is_class_type(const ir_type *clss) {
415         assert(clss);
416         return (clss->type_op == type_class);
417 }
418
419 static INLINE int
420 _get_class_n_members (const ir_type *clss) {
421         assert(clss && (clss->type_op == type_class));
422         return (ARR_LEN (clss->attr.ca.members));
423 }
424
425 static INLINE ir_entity *
426 _get_class_member   (const ir_type *clss, int pos) {
427         assert(clss && (clss->type_op == type_class));
428         assert(pos >= 0 && pos < _get_class_n_members(clss));
429         return clss->attr.ca.members[pos];
430 }
431
432 static INLINE unsigned
433 _get_class_vtable_size(const ir_type *clss) {
434         assert(clss && (clss->type_op == type_class));
435         return clss->attr.ca.vtable_size;
436 }
437
438 static INLINE void
439 _set_class_vtable_size(ir_type *clss, unsigned vtable_size) {
440         assert(clss && (clss->type_op == type_class));
441         clss->attr.ca.vtable_size = vtable_size;
442 }
443
444 static INLINE int
445 _is_class_final(const ir_type *clss) {
446         assert(clss && (clss->type_op == type_class));
447         return clss->attr.ca.clss_flags & cf_final_class;
448 }
449
450 static INLINE void
451 _set_class_final(ir_type *clss, int final) {
452         assert(clss && (clss->type_op == type_class));
453         if (final)
454                 clss->attr.ca.clss_flags |= cf_final_class;
455         else
456                 clss->attr.ca.clss_flags &= ~cf_final_class;
457 }
458
459 static INLINE int
460 _is_class_interface(const ir_type *clss) {
461         assert(clss && (clss->type_op == type_class));
462         return clss->attr.ca.clss_flags & cf_interface_class;
463 }
464
465 static INLINE void
466 _set_class_interface(ir_type *clss, int final) {
467         assert(clss && (clss->type_op == type_class));
468         if (final)
469                 clss->attr.ca.clss_flags |= cf_interface_class;
470         else
471                 clss->attr.ca.clss_flags &= ~cf_interface_class;
472 }
473
474 static INLINE int
475 _is_class_abstract(const ir_type *clss) {
476         assert(clss && (clss->type_op == type_class));
477         return clss->attr.ca.clss_flags & cf_absctract_class;
478         }
479
480 static INLINE void
481 _set_class_abstract(ir_type *clss, int final) {
482         assert(clss && (clss->type_op == type_class));
483         if (final)
484                 clss->attr.ca.clss_flags |= cf_absctract_class;
485         else
486                 clss->attr.ca.clss_flags &= ~cf_absctract_class;
487 }
488
489 static INLINE int
490 _is_struct_type(const ir_type *strct) {
491         assert(strct);
492         return (strct->type_op == type_struct);
493 }
494
495 static INLINE int
496 _is_method_type(const ir_type *method) {
497         assert(method);
498         return (method->type_op == type_method);
499 }
500
501 static INLINE int
502 _is_union_type(const ir_type *uni) {
503         assert(uni);
504         return (uni->type_op == type_union);
505 }
506
507 static INLINE int
508 _is_array_type(const ir_type *array) {
509         assert(array);
510         return (array->type_op == type_array);
511 }
512
513 static INLINE int
514 _is_enumeration_type(const ir_type *enumeration) {
515         assert(enumeration);
516         return (enumeration->type_op == type_enumeration);
517 }
518
519 static INLINE int
520 _is_pointer_type(const ir_type *pointer) {
521         assert(pointer);
522         return (pointer->type_op == type_pointer);
523 }
524
525 /** Returns true if a type is a primitive type. */
526 static INLINE int
527 _is_primitive_type(const ir_type *primitive) {
528         assert(primitive && primitive->kind == k_type);
529         return (primitive->type_op == type_primitive);
530 }
531
532 static INLINE int
533 _is_atomic_type(const ir_type *tp) {
534         assert(tp && tp->kind == k_type);
535         return (_is_primitive_type(tp) || _is_pointer_type(tp) ||
536                 _is_enumeration_type(tp));
537 }
538
539 static INLINE int
540 _get_method_n_params(const ir_type *method) {
541         assert(method && (method->type_op == type_method));
542         return method->attr.ma.n_params;
543 }
544
545 static INLINE int
546 _get_method_n_ress(const ir_type *method) {
547         assert(method && (method->type_op == type_method));
548         return method->attr.ma.n_res;
549 }
550
551 static INLINE unsigned
552 _get_method_additional_properties(const ir_type *method) {
553         assert(method && (method->type_op == type_method));
554         return method->attr.ma.additional_properties;
555 }
556
557 static INLINE void
558 _set_method_additional_properties(ir_type *method, unsigned mask) {
559         assert(method && (method->type_op == type_method));
560
561         /* do not allow to set the mtp_property_inherited flag or
562          * the automatic inheritance of flags will not work */
563         method->attr.ma.additional_properties = mask & ~mtp_property_inherited;
564 }
565
566 static INLINE void
567 _set_method_additional_property(ir_type *method, mtp_additional_property flag) {
568         assert(method && (method->type_op == type_method));
569
570         /* do not allow to set the mtp_property_inherited flag or
571          * the automatic inheritance of flags will not work */
572         method->attr.ma.additional_properties |= flag & ~mtp_property_inherited;
573 }
574
575 static INLINE unsigned
576 _get_method_calling_convention(const ir_type *method) {
577         assert(method && (method->type_op == type_method));
578         return method->attr.ma.irg_calling_conv;
579 }
580
581 static INLINE void
582 _set_method_calling_convention(ir_type *method, unsigned cc_mask) {
583         assert(method && (method->type_op == type_method));
584         method->attr.ma.irg_calling_conv = cc_mask;
585 }
586
587
588 #define set_master_type_visited(val)      _set_master_type_visited(val)
589 #define get_master_type_visited()         _get_master_type_visited()
590 #define inc_master_type_visited()         _inc_master_type_visited()
591 #define get_type_link(tp)                 _get_type_link(tp)
592 #define set_type_link(tp, l)              _set_type_link(tp, l)
593 #define get_type_tpop(tp)                 _get_type_tpop(tp)
594 #define get_type_tpop_nameid(tp)          _get_type_tpop_nameid(tp)
595 #define get_type_tpop_code(tp)            _get_type_tpop_code(tp)
596 #define get_type_mode(tp)                 _get_type_mode(tp)
597 #define get_type_ident(tp)                _get_type_ident(tp)
598 #define set_type_ident(tp, id)            _set_type_ident(tp, id)
599 #define get_type_size_bytes(tp)           _get_type_size_bytes(tp)
600 #define get_type_state(tp)                _get_type_state(tp)
601 #define get_type_visited(tp)              _get_type_visited(tp)
602 #define set_type_visited(tp, num)         _set_type_visited(tp, num)
603 #define mark_type_visited(tp)             _mark_type_visited(tp)
604 #define type_visited(tp)                  _type_visited(tp)
605 #define type_not_visited(tp)              _type_not_visited(tp)
606 #define get_type_dbg_info(tp)             _get_type_dbg_info(tp)
607 #define set_type_dbg_info(tp, db)         _set_type_dbg_info(tp, db)
608 #define is_type(thing)                    _is_type(thing)
609 #define is_Class_type(clss)               _is_class_type(clss)
610 #define get_class_n_members(clss)         _get_class_n_members(clss)
611 #define get_class_member(clss, pos)       _get_class_member(clss, pos)
612 #define get_class_vtable_size(clss)       _get_class_vtable_size(clss)
613 #define set_class_vtable_size(clss, size) _set_class_vtable_size(clss, size)
614 #define is_class_final(clss)              _is_class_final(clss)
615 #define set_class_final(clss, flag)       _set_class_final(clss, flag)
616 #define is_class_interface(clss)          _is_class_interface(clss)
617 #define set_class_interface(clss, flag)   _set_class_interface(clss, flag)
618 #define is_class_abstract(clss)           _is_class_abstract(clss)
619 #define set_class_abstract(clss, flag)    _set_class_abstract(clss, flag)
620 #define is_Struct_type(strct)             _is_struct_type(strct)
621 #define is_Method_type(method)            _is_method_type(method)
622 #define is_Union_type(uni)                _is_union_type(uni)
623 #define is_Array_type(array)              _is_array_type(array)
624 #define is_Enumeration_type(enumeration)  _is_enumeration_type(enumeration)
625 #define is_Pointer_type(pointer)          _is_pointer_type(pointer)
626 #define is_Primitive_type(primitive)      _is_primitive_type(primitive)
627 #define is_atomic_type(tp)                _is_atomic_type(tp)
628 #define get_method_n_params(method)       _get_method_n_params(method)
629 #define get_method_n_ress(method)         _get_method_n_ress(method)
630 #define get_method_additional_properties(method)        _get_method_additional_properties(method)
631 #define set_method_additional_properties(method, mask)  _set_method_additional_properties(method, mask)
632 #define set_method_additional_property(method, flag)    _set_method_additional_property(method, flag)
633 #define get_method_calling_convention(method)           _get_method_calling_convention(method)
634 #define set_method_calling_convention(method, cc_mask)  _set_method_calling_convention(method, cc_mask)
635
636 #endif /* FIRM_TR_TYPE_T_H */