remove names from parameters of method_types - it is pure debug info and should alrea...
authorMatthias Braun <matze@braunis.de>
Thu, 17 Mar 2011 15:30:47 +0000 (16:30 +0100)
committerMatthias Braun <matze@braunis.de>
Wed, 30 Mar 2011 13:12:15 +0000 (15:12 +0200)
include/libfirm/typerep.h
ir/be/bestabs.c
ir/lower/lower_calls.c
ir/lower/lower_dw.c
ir/tr/type.c
ir/tr/type_t.h

index 94c2a28..31adece 100644 (file)
@@ -1604,15 +1604,6 @@ FIRM_API void set_method_value_param_type(ir_type *method, ir_type *tp);
  * was allocated, else NULL.
  */
 FIRM_API ir_type *get_method_value_param_type(const ir_type *method);
-/** Returns an ident representing the parameters name. Returns NULL if not set.
-    For debug support only. */
-FIRM_API ident *get_method_param_ident(ir_type *method, size_t pos);
-/** Returns a string representing the parameters name. Returns NULL if not set.
-    For debug support only. */
-FIRM_API const char *get_method_param_name(ir_type *method, size_t pos);
-/** Sets an ident representing the parameters name. For debug support only. */
-FIRM_API void set_method_param_ident(ir_type *method, size_t pos, ident *id);
-
 /** Returns the number of results of a method type. */
 FIRM_API size_t get_method_n_ress(const ir_type *method);
 /** Returns the return type of a method type at position pos. */
index cc1a703..ce6361f 100644 (file)
@@ -718,7 +718,7 @@ static void stabs_method_begin(dbg_handle *handle, const ir_entity *ent)
        between_size = get_type_size_bytes(layout->between_type);
        for (i = 0, n = get_method_n_params(mtp); i < n; ++i) {
                ir_type *ptp      = get_method_param_type(mtp, i);
-        const char *name  = get_method_param_name(mtp, i);
+        const char *name  = NULL;
                unsigned type_num = get_type_number(h, ptp);
         char buf[16];
         int ofs = 0;
index 63da050..7ccc7b3 100644 (file)
@@ -75,7 +75,7 @@ static ir_type *def_find_pointer_type(ir_type *e_type, ir_mode *mode,
  */
 static ir_type *create_modified_mtd_type(const lower_params_t *lp, ir_type *mtp)
 {
-       ir_type *lowered, *ptr_tp, *value_type;
+       ir_type *lowered, *ptr_tp;
        ir_type **params, **results, *res_tp;
        size_t  *param_map;
        ir_mode *modes[MAX_REGISTER_RET_VAL];
@@ -184,30 +184,6 @@ static ir_type *create_modified_mtd_type(const lower_params_t *lp, ir_type *mtp)
 
        set_lowered_type(mtp, lowered);
 
-       value_type = get_method_value_param_type(mtp);
-       if (value_type != NULL) {
-               /* set new param positions */
-               for (i = 0; i < nn_params; ++i) {
-                       ir_entity *ent = get_method_value_param_ent(lowered, i);
-                       size_t    pos  = param_map[i];
-                       ident     *id;
-
-                       set_entity_link(ent, INT_TO_PTR(pos));
-                       if (pos >= n_params) {
-                               /* formally return value, ignore for now */
-                               continue;
-                       }
-
-                       id = get_method_param_ident(mtp, pos);
-                       if (id != NULL) {
-                               set_method_param_ident(lowered, i, id);
-                               set_entity_ident(ent, id);
-                       }
-               }
-
-               set_lowered_type(value_type, get_method_value_param_type(lowered));
-       }
-
        return lowered;
 }
 
index c9b4506..4c4ab33 100644 (file)
@@ -1409,7 +1409,6 @@ static size_t get_entity_arg_idx(const ir_entity *ent) {
 static ir_type *lower_mtp(lower_env_t *env, ir_type *mtp)
 {
        pmap_entry *entry;
-       ident      *lid;
        ir_type    *res, *value_type;
 
        if (is_lowered_type(mtp))
@@ -1499,7 +1498,6 @@ static ir_type *lower_mtp(lower_env_t *env, ir_type *mtp)
                        /* set new param positions for all entities of the value type */
                        for (i = n_param = 0; i < orig_n_params; ++i) {
                                ir_type   *tp  = get_method_param_type(mtp, i);
-                               ident     *id  = get_method_param_ident(mtp, i);
                                ir_entity *ent = get_method_value_param_ent(mtp, i);
 
                                set_entity_arg_idx(ent, n_param);
@@ -1507,22 +1505,10 @@ static ir_type *lower_mtp(lower_env_t *env, ir_type *mtp)
                                        ir_mode *mode = get_type_mode(tp);
 
                                        if (mode == env->high_signed || mode == env->high_unsigned) {
-                                               if (id != NULL) {
-                                                       lid = id_mangle(id, env->first_id);
-                                                       set_method_param_ident(res, n_param, lid);
-                                                       set_entity_ident(get_method_value_param_ent(res, n_param), lid);
-                                                       lid = id_mangle(id, env->next_id);
-                                                       set_method_param_ident(res, n_param + 1, lid);
-                                                       set_entity_ident(get_method_value_param_ent(res, n_param + 1), lid);
-                                               }
                                                n_param += 2;
                                                continue;
                                        }
                                }
-                               if (id != NULL) {
-                                       set_method_param_ident(res, n_param, id);
-                                       set_entity_ident(get_method_value_param_ent(res, n_param), id);
-                               }
                                ++n_param;
                        }
 
index e8f2e56..6ce4447 100644 (file)
@@ -82,12 +82,10 @@ ir_type *get_unknown_type(void)
 }
 
 /* Suffixes added to types used for pass-by-value representations. */
-static ident *value_params_suffix = NULL;
 static ident *value_ress_suffix = NULL;
 
 void ir_init_type(void)
 {
-       value_params_suffix = new_id_from_str(VALUE_PARAMS_SUFFIX);
        value_ress_suffix   = new_id_from_str(VALUE_RESS_SUFFIX);
 
        /* construct none and unknown type. */
@@ -120,7 +118,6 @@ void ir_finish_type(void)
                free_type(firm_unknown_type);
                firm_unknown_type = NULL;
        }
-       value_params_suffix = NULL;
        value_ress_suffix = NULL;
 }
 
@@ -1169,15 +1166,10 @@ static ir_type *build_value_type(char const* name, size_t len, tp_ent_pair *tps)
        /* Remove type from type list.  Must be treated differently than other types. */
        remove_irp_type(res);
        for (i = 0; i < len; ++i) {
-               ident *id = tps[i].param_name;
+               ident *id = new_id_from_str("elt");
 
                /* use res as default if corresponding type is not yet set. */
                ir_type *elt_type = tps[i].tp ? tps[i].tp : res;
-
-               /* use the parameter name if specified */
-               if (id == NULL) {
-                       id = new_id_from_str("elt");
-               }
                tps[i].ent = new_entity(res, id, elt_type);
                set_entity_allocation(tps[i].ent, allocation_parameter);
        }
@@ -1294,26 +1286,6 @@ void set_method_param_type(ir_type *method, size_t pos, ir_type *tp)
        }
 }
 
-ident *get_method_param_ident(ir_type *method, size_t pos)
-{
-       assert(method->type_op == type_method);
-       assert(pos < get_method_n_params(method));
-       return method->attr.ma.params[pos].param_name;
-}
-
-const char *get_method_param_name(ir_type *method, size_t pos)
-{
-       ident *id = get_method_param_ident(method, pos);
-       return id ? get_id_str(id) : NULL;
-}
-
-void set_method_param_ident(ir_type *method, size_t pos, ident *id)
-{
-       assert(method->type_op == type_method);
-       assert(pos < get_method_n_params(method));
-       method->attr.ma.params[pos].param_name = id;
-}
-
 ir_entity *get_method_value_param_ent(ir_type *method, size_t pos)
 {
        assert(method && (method->type_op == type_method));
index f18cb12..7e3b2a7 100644 (file)
@@ -61,9 +61,8 @@ typedef struct {
 
 /** A (type, ir_entity) pair. */
 typedef struct {
-       ir_type *tp;         /**< A type. */
-       ir_entity  *ent;     /**< An ir_entity. */
-       ident   *param_name; /**< For debugging purposes: the name of the parameter */
+       ir_type   *tp;      /**< A type. */
+       ir_entity *ent;     /**< An ir_entity. */
 } tp_ent_pair;
 
 /** Method type attributes. */