From 8a953adb0fdd8f7e8cad68baa26bb6a8e8f829b0 Mon Sep 17 00:00:00 2001 From: Michael Beck Date: Wed, 5 Jan 2005 14:29:07 +0000 Subject: [PATCH] renames all is_x*_type() functions to is_X*_type() to prevent name clash with EDG frontend [r4818] --- ir/ana/cgana.c | 12 ++++++------ ir/ana/irsimpletype.c | 34 +++++++++++++++++----------------- ir/ana/rta.c | 9 ++++++--- ir/common/firm.h | 2 +- ir/common/statistics.c | 6 +++--- ir/external/read.c | 17 ++++++++++------- ir/opt/ldstopt.c | 2 +- 7 files changed, 44 insertions(+), 38 deletions(-) diff --git a/ir/ana/cgana.c b/ir/ana/cgana.c index ae09efcc3..b1d499be4 100644 --- a/ir/ana/cgana.c +++ b/ir/ana/cgana.c @@ -291,7 +291,7 @@ static void sel_methods_walker(ir_node * node, void *env) { } } else if (get_irn_op(node) == op_Sel && - is_method_type(get_entity_type(get_Sel_entity(node)))) { + is_Method_type(get_entity_type(get_Sel_entity(node)))) { entity * ent = get_Sel_entity(node); /* Sel from Alloc: replace by constant */ @@ -419,7 +419,7 @@ static entity ** get_Sel_arr(ir_node * sel) { assert(sel && get_irn_op(sel) == op_Sel); ent = get_Sel_entity(sel); - assert(is_method_type(get_entity_type(ent))); /* what else? */ + assert(is_Method_type(get_entity_type(ent))); /* what else? */ arr = get_entity_link(ent); if (arr) { return arr; @@ -513,7 +513,7 @@ static void callee_ana_node(ir_node * node, eset * methods) { case iro_SymConst: if (get_SymConst_kind(node) == symconst_addr_ent) { entity * ent = get_SymConst_entity(node); - assert(ent && is_method_type(get_entity_type(ent))); + assert(ent && is_Method_type(get_entity_type(ent))); eset_insert(methods, ent); } else { assert(get_SymConst_kind(node) == symconst_addr_name); @@ -700,9 +700,9 @@ static void free_mark(ir_node * node, eset * set) { switch (get_irn_opcode(node)) { case iro_Sel: { entity * ent = get_Sel_entity(node); - if (is_method_type(get_entity_type(ent))) { + if (is_Method_type(get_entity_type(ent))) { for (i = get_Sel_n_methods(node) - 1; i >= 0; --i) { - eset_insert(set, get_Sel_method(node, i)); + eset_insert(set, get_Sel_method(node, i)); } } break; @@ -710,7 +710,7 @@ static void free_mark(ir_node * node, eset * set) { case iro_SymConst: if (get_SymConst_kind(node) == symconst_addr_ent) { entity * ent = get_SymConst_entity(node); - if (is_method_type(get_entity_type(ent))) { + if (is_Method_type(get_entity_type(ent))) { eset_insert(set, ent); } } else { diff --git a/ir/ana/irsimpletype.c b/ir/ana/irsimpletype.c index 6a58d3ae0..04c95e31e 100644 --- a/ir/ana/irsimpletype.c +++ b/ir/ana/irsimpletype.c @@ -46,7 +46,7 @@ void precompute_pointer_types(void) { set_type_link(get_irp_type(i), (void *)firm_unknown_type); for (i = get_irp_n_types()-1; i>=0; --i) { type *tp = get_irp_type(i); - if (is_pointer_type(tp)) + if (is_Pointer_type(tp)) set_type_link(get_pointer_points_to_type(tp), (void *)tp); } } @@ -153,8 +153,8 @@ static type *find_type_for_node(ir_node *n) { type *ana_res_type = get_irn_type(get_Return_res(n, i)); if (ana_res_type == firm_unknown_type) continue; if (res_type != ana_res_type && "return value has wrong type") { - DDMN(n); - assert(res_type == ana_res_type && "return value has wrong type"); + DDMN(n); + assert(res_type == ana_res_type && "return value has wrong type"); } } */ @@ -184,7 +184,7 @@ static type *find_type_for_node(ir_node *n) { tp = get_SymConst_value_type(n); break; case iro_Sel: tp = find_pointer_type_to(get_entity_type(get_Sel_entity(n))); break; - /* assymetric binops */ + /* asymmetric binops */ case iro_Shl: case iro_Shr: case iro_Shrs: @@ -206,7 +206,7 @@ static type *find_type_for_node(ir_node *n) { tp1 = compute_irn_type(get_Phi_pred(n, i)); assert(tp1 != initial_type); if ((tp1 != phi_cycle_type) && (tp1 != firm_none_type)) - break; + break; } /* find a second real type */ @@ -214,8 +214,8 @@ static type *find_type_for_node(ir_node *n) { for (; (i < n_preds); ++i) { tp2 = compute_irn_type(get_Phi_pred(n, i)); if ((tp2 == phi_cycle_type) || (tp2 == firm_none_type)) { - tp2 = tp1; - continue; + tp2 = tp1; + continue; } if (tp2 != tp1) break; } @@ -232,9 +232,9 @@ static type *find_type_for_node(ir_node *n) { ir_node *a = get_Load_ptr(n); if (get_irn_op(a) == op_Sel) tp = get_entity_type(get_Sel_entity(a)); - else if (is_pointer_type(compute_irn_type(a))) { + else if (is_Pointer_type(compute_irn_type(a))) { tp = get_pointer_points_to_type(get_irn_typeinfo_type(a)); - if (is_array_type(tp)) tp = get_array_element_type(tp); + if (is_Array_type(tp)) tp = get_array_element_type(tp); } else { VERBOSE_UNKNOWN_TYPE(("Load %ld with typeless address. result: unknown type\n", get_irn_node_nr(n))); tp = firm_unknown_type; @@ -254,16 +254,16 @@ static type *find_type_for_node(ir_node *n) { /* catch special cases with fallthrough to binop/unop cases in default. */ case iro_Sub: { if (mode_is_int(get_irn_mode(n)) && - mode_is_reference(get_irn_mode(a)) && - mode_is_reference(get_irn_mode(b)) ) { + mode_is_reference(get_irn_mode(a)) && + mode_is_reference(get_irn_mode(b)) ) { VERBOSE_UNKNOWN_TYPE(("Sub %ld ptr - ptr = int: unknown type\n", get_irn_node_nr(n))); tp = firm_unknown_type; break; } } /* fall through to Add. */ case iro_Add: { if (mode_is_reference(get_irn_mode(n)) && - mode_is_reference(get_irn_mode(a)) && - mode_is_int(get_irn_mode(b)) ) { + mode_is_reference(get_irn_mode(a)) && + mode_is_int(get_irn_mode(b)) ) { tp = tp1; break; } if (mode_is_reference(get_irn_mode(n)) && @@ -292,12 +292,12 @@ static type *find_type_for_node(ir_node *n) { if (is_binop(n)) { if (tp1 == tp2) { - tp = tp1; - break; + tp = tp1; + break; } if((tp1 == phi_cycle_type) || (tp2 == phi_cycle_type)) { - tp = phi_cycle_type; - break; + tp = phi_cycle_type; + break; } VERBOSE_UNKNOWN_TYPE(("Binop %ld with two different types: %s, %s: unknown type \n", get_irn_node_nr(n), get_type_name(tp1), get_type_name(tp2))); diff --git a/ir/ana/rta.c b/ir/ana/rta.c index c9313046b..eb613f34f 100644 --- a/ir/ana/rta.c +++ b/ir/ana/rta.c @@ -361,7 +361,7 @@ static void init_tables (void) /* Find static allocated classes */ for (i = 0; i < n_globs; ++i) { type *member_type = get_entity_type(get_class_member(get_glob_type(), i)); - if (is_class_type(member_type)) + if (is_Class_type(member_type)) eset_insert(_live_classes, member_type); } } @@ -418,7 +418,7 @@ static void make_entity_to_description(type_or_ent *tore, void *env) { if (get_kind(tore) == k_entity) { entity *ent = (entity *)tore; - if ((is_method_type(get_entity_type(ent))) && + if ((is_Method_type(get_entity_type(ent))) && (get_entity_peculiarity(ent) != peculiarity_description) && (get_entity_visibility(ent) != visibility_external_allocated) ) { ir_graph *irg = get_entity_irg(get_SymConst_entity(get_atomic_ent_value(ent))); @@ -519,7 +519,7 @@ void rta_report (void) for (i = 0; i < get_irp_n_types(); ++i) { type *tp = get_irp_type(i); - if (is_class_type(tp) && rta_is_alive_class(tp)) { + if (is_Class_type(tp) && rta_is_alive_class(tp)) { fprintf(stdout, "RTA: considered allocated: "); DDMT(tp); } } @@ -535,6 +535,9 @@ void rta_report (void) /* * $Log$ + * Revision 1.32 2005/01/05 14:24:52 beck + * renames all is_x*_type() functions to is_X*_type() to prevent name clash with EDG frontend + * * Revision 1.31 2004/12/21 13:45:14 beck * removed C99 constructs * diff --git a/ir/common/firm.h b/ir/common/firm.h index f7dc8f091..9b5112cab 100644 --- a/ir/common/firm.h +++ b/ir/common/firm.h @@ -131,7 +131,7 @@ extern "C" { /* Makros that define the old function names we decided to rename. Use for compatibility with old implementations. */ -//#include "old_fctnames.h" +/*#include "old_fctnames.h"*/ /** * libFirm initialization parameters. diff --git a/ir/common/statistics.c b/ir/common/statistics.c index 89c2e0569..5a488dc05 100644 --- a/ir/common/statistics.c +++ b/ir/common/statistics.c @@ -58,9 +58,9 @@ void print_type_counts(int verbosity) { for (i = 0; i < get_irp_n_types(); i++) { type *tp = get_irp_type(i); counter = -1; - if (is_class_type(tp)) counter = get_class_n_members(tp); - if (is_struct_type(tp)) counter = get_struct_n_members(tp); - if (is_union_type(tp)) counter = get_union_n_members(tp); + if (is_Class_type(tp)) counter = get_class_n_members(tp); + if (is_Struct_type(tp)) counter = get_struct_n_members(tp); + if (is_Union_type(tp)) counter = get_union_n_members(tp); if (counter > -1) { if (verbosity == 1) printf(" +%3d entities in %s type %s.\n", counter, get_type_tpop_name(tp), get_type_name(tp)); diff --git a/ir/external/read.c b/ir/external/read.c index 3f0ecdd8b..7a418aeea 100644 --- a/ir/external/read.c +++ b/ir/external/read.c @@ -1484,7 +1484,7 @@ static void assign_firm_entity(module_t *module, entity_t *xmlent) typ = find_type_in_module(module, xmlent -> owner); assert(typ && "class not found in module"); type = typ -> f_tp; - assert(is_class_type(type)); + assert(is_Class_type(type)); num = get_class_n_members(type); ent = NULL; @@ -1558,11 +1558,11 @@ void create_abstract_proc_effect(module_t *module, proc_t *proc) for(i = 0; i < num; i++) { class_typ = get_irp_type(i); VERBOSE_PRINT((stdout, "test type %s\n", get_type_name(class_typ))); - if(is_class_type(class_typ) - && (type -> type_ident == get_type_ident(class_typ))) { - /* found class type */ - VERBOSE_PRINT((stdout, "found type %s\n", get_type_name(class_typ))); - break; + if (is_Class_type(class_typ) + && (type -> type_ident == get_type_ident(class_typ))) { + /* found class type */ + VERBOSE_PRINT((stdout, "found type %s\n", get_type_name(class_typ))); + break; } class_typ = NULL; } @@ -1571,7 +1571,7 @@ void create_abstract_proc_effect(module_t *module, proc_t *proc) VERBOSE_PRINT((stdout, "found global type %s\n", get_type_name(class_typ))); } assert(class_typ && "type not found"); - assert(is_class_type(class_typ) && "is not a class type"); + assert(is_Class_type(class_typ) && "is not a class type"); type -> f_tp = class_typ; /* find entity for procedure in class */ @@ -1677,6 +1677,9 @@ void free_abstraction(void) { /* * $Log$ + * Revision 1.20 2005/01/05 14:28:35 beck + * renames all is_x*_type() functions to is_X*_type() to prevent name clash with EDG frontend + * * Revision 1.19 2004/12/10 15:14:34 beck * used xmalloc instead of malloc * diff --git a/ir/opt/ldstopt.c b/ir/opt/ldstopt.c index cd2ba7b34..9a77017ba 100644 --- a/ir/opt/ldstopt.c +++ b/ir/opt/ldstopt.c @@ -248,7 +248,7 @@ static entity *find_constant_entity(ir_node *ptr) entity *ent = get_Sel_entity(ptr); type *tp = get_entity_owner(ent); - if (is_array_type(tp)) { + if (is_Array_type(tp)) { /* check bounds */ int i, n; -- 2.20.1