X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Flower%2Flower_calls.c;h=f99bf7e74f3afbcd82be3b53ee1ce987f0313b6d;hb=04906225f6fe1bc22f73b5d6a98eb9c0992a9b54;hp=b8d0de45057445a90b88b828cd168c1cb78cf831;hpb=6d66b7d864aeca2796c2d013703f62e8f3d3a681;p=libfirm diff --git a/ir/lower/lower_calls.c b/ir/lower/lower_calls.c index b8d0de450..f99bf7e74 100644 --- a/ir/lower/lower_calls.c +++ b/ir/lower/lower_calls.c @@ -24,9 +24,7 @@ * @version $Id$ */ -#ifdef HAVE_CONFIG_H #include "config.h" -#endif #include "lowering.h" #include "irprog_t.h" @@ -39,9 +37,9 @@ #include "irmemory.h" #include "irtools.h" #include "iroptimize.h" -#include "array.h" +#include "array_t.h" #include "pmap.h" -#include "xmalloc.h" +#include "error.h" /** A type map for def_find_pointer_type. */ static pmap *type_map; @@ -124,7 +122,7 @@ static ir_type *create_modified_mtd_type(const lower_params_t *lp, ir_type *mtp) if (n_regs > 0) { /* this compound will be returned solely in registers */ - assert(0); + panic("Returning compounds in registers not yet implemented"); } else { /* this compound will be allocated on callers stack and its @@ -808,14 +806,14 @@ static int must_be_lowered(const lower_params_t *lp, ir_type *tp) { * type-walker: lower all method types of entities * and points-to types. */ -static void lower_method_types(type_or_ent *tore, void *env) +static void lower_method_types(type_or_ent tore, void *env) { const lower_params_t *lp = env; ir_type *tp; /* fix method entities */ - if (is_entity(tore)) { - ir_entity *ent = (ir_entity *)tore; + if (is_entity(tore.ent)) { + ir_entity *ent = tore.ent; tp = get_entity_type(ent); if (must_be_lowered(lp, tp)) { @@ -823,7 +821,7 @@ static void lower_method_types(type_or_ent *tore, void *env) set_entity_type(ent, tp); } } else { - tp = (ir_type *)tore; + tp = tore.typ; /* fix pointer to methods */ if (is_Pointer_type(tp)) {