/* create the method entry */
mtp = get_entity_type(ent);
- assert (is_lowered_type(mtp));
- mtp = get_associated_type(mtp);
+ mtp = get_type_unlowered(mtp);
if (get_method_n_ress(mtp) > 0)
rtp = get_method_res_type(mtp, 0);
else
assert(!is_lowered_type(mtp) && "lowered types not yet implemented");
- lowered = get_associated_type(mtp);
+ lowered = get_type_lowered(mtp);
if (lowered != NULL)
return lowered;
size_t i;
size_t j;
- assert (is_lowered_type(ctp));
- ctp = get_associated_type(ctp);
+ ctp = get_type_unlowered(ctp);
for (j = i = 0; i < get_method_n_ress(ctp); ++i) {
ir_type *rtp = get_method_res_type(ctp, i);
static inline ir_visited_t _get_master_type_visited(void) { return firm_type_visited; }
static inline void _inc_master_type_visited(void) { ++firm_type_visited; }
+static inline ir_type *get_type_unlowered(const ir_type *tp)
+{
+ assert (is_lowered_type(tp));
+ return tp->assoc_type;
+}
+
+static inline ir_type *get_type_lowered(const ir_type *tp)
+{
+ assert (tp->assoc_type == NULL || is_lowered_type(tp->assoc_type));
+ return tp->assoc_type;
+}
+
+
static inline void *_get_type_link(const ir_type *tp)
{
assert(tp && tp->kind == k_type);