-/** the type of an entity */
-struct entity {
- firm_kind kind; /**< dynamic type tag for entity. */
- ident *name; /**< name of this entity */
- ident *ld_name; /**< Unique name of this entity, i.e., the mangled
- name. If the field is read before written a default
- mangling is applies. The name of the owner is prepended
- to the name of the entity, separated by a underscore.
- E.g., for a class `A' with field `a' this
- is the ident for `A_a'. */
- type *type; /**< The type of this entity, e.g., a method type, a
- basic type of the language or a class itself */
- type *owner; /**< The compound type (e.g. class type) this entity belongs to. */
- ent_allocation allocation; /**< Distinguishes static and dynamically allocated
- entities and some further cases. */
- visibility visibility; /**< Specifies visibility to external program
- fragments */
- ent_variability variability; /**< Specifies variability of entities content */
- ent_volatility volatility; /**< Specifies volatility of entities content */
- ent_stickyness stickyness; /**< Specifies whether this entity is sticky */
- int offset; /**< Offset in bits for this entity. Fixed when layout
- of owner is determined. */
- void *link; /**< To store some intermediate information */
- unsigned long visit; /**< visited counter for walks of the type information */
- struct dbg_info *dbi; /**< A pointer to information for debug support. */
-
- /* ------------- fields for atomic entities ---------------*/
-
- ir_node *value; /**< value if entity is not of variability uninitialized.
- Only for atomic entities. */
-
- /* ------------- fields for compound entities ---------------*/
-
- ir_node **values; /**< constant values of compound entities. Only available if
- variability not uninitialized. Must be set for variability constant
- */
- compound_graph_path **val_paths; /**< paths corresponding to constant values. Only available if
- variability not uninitialized. Must be set for variability constant */
-
- /* ------------- fields for entities owned by a class type ---------------*/
-
- entity **overwrites; /**< A list of entities this entity overwrites. */
- entity **overwrittenby; /**< A list of entities that overwrite this entity. */
-
- /* ------------- fields for methods ---------------*/
-
- enum peculiarity peculiarity;
- ir_graph *irg; /**< If (type == method_type) this is the corresponding irg.
- The ir_graph constructor automatically sets this field.
- Yes, it must be here. */
- unsigned irg_add_properties; /**< If (type == method_type) this is a set of additional.
- graph flags if the irg of an entity is not known. */
- unsigned irg_calling_conv; /**< If (type == method_type) this is a set of calling.
- convention flags if the irg of an entity is not known. */
-
- /* ------------- fields for analyses ---------------*/
+/** The attributes for compound entities. */
+typedef struct compound_ent_attr {
+ ir_node **values; /**< constant values of compound entities. */
+ compound_graph_path **val_paths;
+ /**< paths corresponding to constant values. */
+} compound_ent_attr;
+
+/** The attributes for methods. */
+typedef struct method_ent_attr {
+ ir_graph *irg; /**< The corresponding irg if known.
+ The ir_graph constructor automatically sets this field. */
+ mtp_additional_properties irg_add_properties; /**< Additional graph properties can be
+ stored in a entity if no irg is available. */
+
+ unsigned vtable_number; /**< For a dynamically called method, the number assigned
+ in the virtual function table. */
+
+ ptr_access_kind *param_access; /**< the parameter access */
+ unsigned *param_weight; /**< The weight of method's parameters. Parameters
+ with a high weight are good candidates for procedure cloning. */
+} method_ent_attr;
+
+/** additional attributes for code entities */
+typedef struct code_ent_attr {
+ ir_label_t label; /** label of the basic block */
+} code_ent_attr;
+
+typedef struct parameter_ent_attr {
+ /**< parameters might be compounds too */
+ compound_ent_attr cmpd_attr;
+
+ size_t number; /**< corresponding parameter number */
+ ir_mode *doubleword_low_mode;/**< entity is a lowered doubleword parameter,
+ so additional stores because of calling
+ convention are correctly performed.
+ Matze: This is a hack. In an ideal
+ wor^H^H^Hlibfirm we would first establish
+ calling conventions and then perform doubleword
+ lowering...) */
+} parameter_ent_attr;