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