X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Ftr%2Fentity.h;h=e6c2cd2f4095bb6a433903d38b5e42ce137975e7;hb=da9c4a1519a03db4b6a4cbd79dff05f69387611f;hp=1016dc69067240e97e6271eb3e4419c11355ba27;hpb=58278afc9917d9fc28ae5a4def6e1d9e53d7179f;p=libfirm diff --git a/ir/tr/entity.h b/ir/tr/entity.h index 1016dc690..e6c2cd2f4 100644 --- a/ir/tr/entity.h +++ b/ir/tr/entity.h @@ -63,9 +63,9 @@ void init_entity (void); /** ENTITY **/ /*******************************************************************/ +/* to resolve recursion between entity.h and irgraph.h */ #ifndef _IR_GRAPH_TYPEDEF_ #define _IR_GRAPH_TYPEDEF_ -/* to resolve recursion between entity.h and irgraph.h */ typedef struct ir_graph ir_graph; #endif @@ -113,9 +113,9 @@ typedef struct ir_graph ir_graph; * SOURCE */ +/* to resolve recursion between entity.h and type.h */ #ifndef _ENTITY_TYPEDEF_ #define _ENTITY_TYPEDEF_ -/* to resolve recursion between entity.h and type.h */ typedef struct entity entity; #endif @@ -126,8 +126,8 @@ typedef struct entity entity; is type_method, then it is static_allocated and constant. The constant value is a pointer to the method. Visibility is local, offset -1, and it is not volatile. */ -entity *new_entity (type *owner, ident *name, type *type); -entity *new_d_entity (type *owner, ident *name, type *type, dbg_info *db); +entity *new_entity (type *owner, ident *name, type *tp); +entity *new_d_entity (type *owner, ident *name, type *tp, dbg_info *db); /* Copies the entity if the new_owner is different from the owner of the old entity. Else returns the old entity. Automatically inserts the new entity as a member of owner. */ @@ -159,15 +159,19 @@ void set_entity_owner (entity *ent, type *owner); INLINE void assert_legal_owner_of_ent(type *owner); type *get_entity_type (entity *ent); -void set_entity_type (entity *ent, type *type); +void set_entity_type (entity *ent, type *tp); typedef enum { - automatic_allocated,/* The entity is allocated during runtime, implicitly - as component of a compound type. This is the default. */ - dynamic_allocated, /* The entity is allocated during runtime, explicitly - by an Alloc node. */ - static_allocated /* The entity is allocated statically. We can use a - SymConst(?) as address of the entity. */ + automatic_allocated, /* The entity is allocated during runtime, implicitly + as component of a compound type. This is the default. */ + parameter_allocated, /* The entity is a parameter. It is also automatic allocated. + We distinguish the allocation of paramters from the allocation + of local variables as their placement depends on the calling + conventions. */ + dynamic_allocated, /* The entity is allocated during runtime, explicitly + by an Alloc node. */ + static_allocated /* The entity is allocated statically. We can use a + SymConst(?) as address of the entity. */ } ent_allocation; ent_allocation get_entity_allocation (entity *ent); @@ -192,7 +196,7 @@ void set_entity_visibility (entity *ent, ent_visibility vis); /* This enumeration flags the variability of entities. */ typedef enum { uninitialized, /* The content of the entity is completely unknown. */ - initialized, /* After allocation the entity is initalized with the + initialized, /* After allocation the entity is initalized with the value given somewhere in the entity. */ part_constant, /* For entities of compound types. Some members of the entity are constant. The others are uninitialized. Those members @@ -294,10 +298,10 @@ int is_compound_entity(entity *ent); bool equal_entity(entity *ent1, entity *ent2); -unsigned long get_entity_visited(entity *entity); -void set_entity_visited(entity *entity, unsigned long num); +unsigned long get_entity_visited(entity *ent); +void set_entity_visited(entity *ent, unsigned long num); /* Sets visited field in entity to entity_visited. */ -void mark_entity_visited(entity *entity); +void mark_entity_visited(entity *ent); /*****/