new accesss routines
authorGötz Lindenmaier <goetz@ipd.info.uni-karlsruhe.de>
Thu, 20 Nov 2003 14:22:17 +0000 (14:22 +0000)
committerGötz Lindenmaier <goetz@ipd.info.uni-karlsruhe.de>
Thu, 20 Nov 2003 14:22:17 +0000 (14:22 +0000)
[r2065]

ir/tr/type.c
ir/tr/type.h

index 7132fc5..6f66c9b 100644 (file)
@@ -745,6 +745,14 @@ void    remove_class_supertype(type *clss, type *supertype) {
     }
 }
 
+char *get_peculiarity_string(peculiarity p) {
+  if (p == peculiarity_description)
+    return "peculiarity_description";
+  if (p == peculiarity_inherited)
+    return "peculiarity_inherited";
+  return "peculiarity_existent";
+}
+
 INLINE peculiarity get_class_peculiarity (type *clss) {
   assert(clss && (clss->type_op == type_class));
   return clss->attr.ca.peculiarity;
@@ -925,11 +933,18 @@ entity *get_method_value_param_ent(type *method, int pos) {
     method->attr.ma.value_params
       = build_value_type(mangle_u(get_type_ident(method), value_params_suffix),
                         get_method_n_params(method), method->attr.ma.param_type);
-  assert((get_entity_type(get_struct_member(method->attr.ma.value_params, pos)) != method->attr.ma.value_params)
+  assert((get_entity_type(get_struct_member(method->attr.ma.value_params, pos))
+         != method->attr.ma.value_params)
         && "param type not yet set");
   return get_struct_member(method->attr.ma.value_params, pos);
 }
 
+type *get_method_value_res_type(type *method) {
+  assert(method && (method->type_op == type_method));
+  return method->attr.ma.value_params;
+}
+
+
 int   get_method_n_ress   (type *method) {
   assert(method && (method->type_op == type_method));
   return method->attr.ma.n_res;
index 7edb033..33fe124 100644 (file)
@@ -408,9 +408,11 @@ typedef enum peculiarity {
                                    Overwrites must refer to at least one other
                                    entity.  If this is a method entity there exists
                                    no irg for this entity, only for one of the
-                                   overwritten ones. */
+                                   overwritten ones.
+                                   Only for entity. */
   peculiarity_existent         /**< The entity/type (can) exist. */
 } peculiarity;
+char *get_peculiarity_string(peculiarity p);
 
 /* The peculiarity of the class.  The enumeration peculiarity is defined
    in entity.h */
@@ -546,6 +548,9 @@ void  set_method_res_type(type *method, int pos, type* tp);
 /* Returns an entity that represents the copied value result.  Only necessary
    for compounds passed by value. This information is constructed only on demand. */
 entity *get_method_value_res_ent(type *method, int pos);
+/*
+ */
+type *get_method_value_res_type(type *method);
 
 /**
  * this enum flags the variadicity of methods (methods with a