X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;ds=sidebyside;f=ir%2Fadt%2Fset.h;h=f0991d719bfe4fb88d5fd50fdc65e4eabf9528c5;hb=f274dcf35aa0d3f4748387dbddfe50e8d7d44951;hp=cba43c08fb751232df7996aa4e2943c3c0e27eb4;hpb=f125f8215c7400173fcb025cb7a05880c990c577;p=libfirm diff --git a/ir/adt/set.h b/ir/adt/set.h index cba43c08f..f0991d719 100644 --- a/ir/adt/set.h +++ b/ir/adt/set.h @@ -35,8 +35,8 @@ typedef struct set set; typedef struct set_entry { unsigned hash; /**< the hash value of the element */ size_t size; /**< the size of the element */ - int dptr[1]; /**< the element itself, data copied in must not need more - alignment than this */ + int dptr[1]; /**< the element itself, data copied in must not need more + alignment than this */ } set_entry; /** @@ -50,9 +50,9 @@ typedef struct set_entry { * 0 if the elements are identically, non-zero else * * @note - * Although it is possible to define different meanings for equality of two - * elements of a sets, they can be only equal if there sizes are - * equal. This is checked before the compare function is called. + * Although it is possible to define different meanings of equality + * of two elements of a set, they can be only equal if their sizes are + * are equal. This is checked before the compare function is called. */ typedef int (*set_cmp_fun) (const void *elt, const void *key, size_t size); @@ -104,7 +104,7 @@ void *set_find (set *set, const void *key, size_t size, unsigned hash); * @return a pointer to the inserted element * * @note - * It is not possible to insert on element more than once. If an element + * It is not possible to insert one element more than once. If an element * that should be inserted is already in the set, this functions does * nothing but returning its pointer. */ @@ -165,10 +165,10 @@ void *set_next (set *set); /** * Breaks the iteration of a set. Must be called before - * the next pset_first() call if the iteration was NOT + * the next set_first() call if the iteration was NOT * finished. * - * @param pset the pset + * @param set the set */ void set_break (set *set); @@ -197,7 +197,16 @@ void set_stats (set *set); #endif #ifdef DEBUG -void set_describe (set *); +/** + * Describe a set. + * + * Writes a description of a set to stdout. The description includes: + * - a header telling how many elements (nkey) and segments (nseg) are in use + * - for every collision chain the number of element with its hash values + * + * @param set the set + */ +void set_describe (set *set); #endif