This commit is contained in:
Jesper Wilhelmsson 2017-05-23 17:51:35 +02:00
commit d599f0d03a
1894 changed files with 125934 additions and 42245 deletions

View file

@ -124,17 +124,9 @@ private:
// Instance variable
BasicHashtableEntry<F>* _entry;
#ifdef ASSERT
private:
unsigned _hits;
public:
unsigned hits() { return _hits; }
void count_hit() { _hits++; }
#endif
public:
// Accessing
void clear() { _entry = NULL; DEBUG_ONLY(_hits = 0); }
void clear() { _entry = NULL; }
// The following methods use order access methods to avoid race
// conditions in multiprocessor systems.
@ -166,9 +158,6 @@ public:
return h;
}
// Reverse the order of elements in each of the buckets.
void reverse();
private:
// Instance variables
int _table_size;
@ -182,10 +171,7 @@ private:
protected:
#ifdef ASSERT
bool _lookup_warning;
mutable int _lookup_count;
mutable int _lookup_length;
bool verify_lookup_length(double load, const char *table_name);
void verify_lookup_length(int max_bucket_count, const char *table_name);
#endif
void initialize(int table_size, int entry_size, int number_of_entries);
@ -253,16 +239,7 @@ public:
int number_of_entries() { return _number_of_entries; }
void verify() PRODUCT_RETURN;
#ifdef ASSERT
void bucket_count_hit(int i) const {
_buckets[i].count_hit();
}
unsigned bucket_hits(int i) const {
return _buckets[i].hits();
}
#endif
template <class T> void verify_table(const char* table_name) PRODUCT_RETURN;
};
@ -280,12 +257,6 @@ public:
// Debugging
void print() PRODUCT_RETURN;
// Reverse the order of elements in each of the buckets. Hashtable
// entries which refer to objects at a lower address than 'boundary'
// are separated from those which refer to objects at higher
// addresses, and appear first in the list.
void reverse(void* boundary = NULL);
protected:
unsigned int compute_hash(Symbol* name) {