diff options
author | bje <bje@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-11-22 22:15:13 +0000 |
---|---|---|
committer | bje <bje@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-11-22 22:15:13 +0000 |
commit | 2e52b721bc652c06e3d3b9e6b58dfbb53698e58d (patch) | |
tree | f1409609d5cd57eb07d03d92deaab509af5269d7 /gcc/pointer-set.c | |
parent | 0891994dee8eb49ac15db2cd7b8d8a168b022870 (diff) | |
download | gcc-2e52b721bc652c06e3d3b9e6b58dfbb53698e58d.tar.gz |
* pointer-set.h (pointer_set_contains): Remove.
* pointer-set.c (pointer_set_contains): Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@91040 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/pointer-set.c')
-rw-r--r-- | gcc/pointer-set.c | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/gcc/pointer-set.c b/gcc/pointer-set.c index b0f04ff3aa3..3f79cc2bfa7 100644 --- a/gcc/pointer-set.c +++ b/gcc/pointer-set.c @@ -90,31 +90,6 @@ void pointer_set_destroy (struct pointer_set_t *pset) XDELETE (pset); } -/* Returns nonzero if PSET contains P. P must be nonnull. - - Collisions are resolved by linear probing. More complicated - collision management schemes are only useful when the load factor - significantly exceeds 0.5, and we never let that happen. */ -int -pointer_set_contains (struct pointer_set_t *pset, void *p) -{ - size_t n = hash1 (p, pset->n_slots, pset->log_slots); - - while (true) - { - if (pset->slots[n] == p) - return 1; - else if (pset->slots[n] == 0) - return 0; - else - { - ++n; - if (n == pset->n_slots) - n = 0; - } - } -} - /* Subroutine of pointer_set_insert. Inserts P into an empty element of SLOTS, an array of length N_SLOTS. Returns nonzero if P was already present in N_SLOTS. */ |