/*
- * Copyright (C) 1995-2008 University of Karlsruhe. All right reserved.
+ * Copyright (C) 1995-2011 University of Karlsruhe. All right reserved.
*
* This file is part of libFirm.
*
ir_type *value_ress; /**< A type whose entities represent copied value results. */
ir_variadicity variadicity; /**< The variadicity of the method. */
int first_variadic_param; /**< The index of the first variadic parameter or -1 if non-variadic .*/
- unsigned additional_properties; /**< Set of additional method properties. */
+ mtp_additional_properties additional_properties; /**< Set of additional method properties. */
unsigned irg_calling_conv; /**< A set of calling convention flags. */
} mtd_attr;
/** An enumerator constant. */
struct ir_enum_const {
- tarval *value; /**< The constants that represents this enumerator identifier. */
+ ir_tarval *value; /**< The constants that represents this enumerator identifier. */
ident *nameid; /**< The name of the enumerator identifier. */
ir_type *owner; /**< owner type of this enumerator constant. */
};
void set_array_size(ir_type *tp, unsigned bytes);
void set_default_size(ir_type *tp, unsigned bytes);
-/**
- * Initialize the type module.
- *
- * @param default_cc_mask default calling conventions for methods
- */
-void firm_init_type(unsigned default_cc_mask);
+/** Set and get a class' dfn --
+ * This is an undocumented field, subject to change! */
+void set_class_dfn(ir_type *clss, int dfn);
+int get_class_dfn(const ir_type *clss);
+
+void add_compound_member(ir_type *compound, ir_entity *entity);
+void remove_compound_member(ir_type *compound, ir_entity *entity);
+
+/** Initialize the type module. */
+void ir_init_type(void);
+
+/** free internal datastructures of type module */
+void ir_finish_type(void);
/** Clone an existing method type.
*
return (clss->type_op == type_class);
}
-static inline int _get_class_n_members (const ir_type *clss)
+static inline int _get_class_n_members(const ir_type *clss)
{
assert(clss && (clss->type_op == type_class));
- return (ARR_LEN (clss->attr.ca.members));
+ return (int)(ARR_LEN(clss->attr.ca.members));
}
static inline ir_entity *_get_class_member(const ir_type *clss, int pos)
return method->attr.ma.n_res;
}
-static inline unsigned _get_method_additional_properties(const ir_type *method)
+static inline mtp_additional_properties _get_method_additional_properties(const ir_type *method)
{
assert(method && (method->type_op == type_method));
return method->attr.ma.additional_properties;
}
-static inline void _set_method_additional_properties(ir_type *method, unsigned mask)
+static inline void _set_method_additional_properties(ir_type *method, mtp_additional_properties mask)
{
assert(method && (method->type_op == type_method));
method->attr.ma.additional_properties = mask & ~mtp_property_inherited;
}
-static inline void _set_method_additional_property(ir_type *method, mtp_additional_property flag)
+static inline void _add_method_additional_properties(ir_type *method, mtp_additional_properties flag)
{
assert(method && (method->type_op == type_method));
#define get_method_n_ress(method) _get_method_n_ress(method)
#define get_method_additional_properties(method) _get_method_additional_properties(method)
#define set_method_additional_properties(method, mask) _set_method_additional_properties(method, mask)
-#define set_method_additional_property(method, flag) _set_method_additional_property(method, flag)
+#define add_method_additional_properties(method, flag) _add_method_additional_properties(method, flag)
#define get_method_calling_convention(method) _get_method_calling_convention(method)
#define set_method_calling_convention(method, cc_mask) _set_method_calling_convention(method, cc_mask)