aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2015-11-13 18:04:09 +0100
committerSverker Eriksson <[email protected]>2015-11-27 19:28:26 +0100
commit99e6213c0f0cebaa01f8310b6950a814cf4b21ee (patch)
tree4cea14183b77db375eb24f668d8afaa0d93f98d7 /erts/emulator/beam
parent80bbe3b23ad7781e43dfea3a84203956ccab6a10 (diff)
downloadotp-99e6213c0f0cebaa01f8310b6950a814cf4b21ee.tar.gz
otp-99e6213c0f0cebaa01f8310b6950a814cf4b21ee.tar.bz2
otp-99e6213c0f0cebaa01f8310b6950a814cf4b21ee.zip
erts: Remove dead code erts_hash_merge
Diffstat (limited to 'erts/emulator/beam')
-rw-r--r--erts/emulator/beam/hash.c50
-rw-r--r--erts/emulator/beam/hash.h2
2 files changed, 0 insertions, 52 deletions
diff --git a/erts/emulator/beam/hash.c b/erts/emulator/beam/hash.c
index e0fde337f2..636aafc108 100644
--- a/erts/emulator/beam/hash.c
+++ b/erts/emulator/beam/hash.c
@@ -280,56 +280,6 @@ void* hash_put(Hash* h, void* tmpl)
return (void*) b;
}
-static void
-hash_insert_entry(Hash* h, HashBucket* entry)
-{
- HashValue hval = entry->hvalue;
- int ix = hval % h->size;
- HashBucket* b = h->bucket[ix];
-
- while (b != (HashBucket*) 0) {
- if ((b->hvalue == hval) && (h->fun.cmp((void*)entry, (void*)b) == 0)) {
- abort(); /* Should not happen */
- }
- b = b->next;
- }
-
- if (h->bucket[ix] == NULL)
- h->used++;
-
- entry->next = h->bucket[ix];
- h->bucket[ix] = entry;
-
- if (h->used > h->size80percent) /* rehash at 80% */
- rehash(h, 1);
-}
-
-
-/*
- * Move all entries in src into dst; empty src.
- * Entries in src must not exist in dst.
- */
-void
-erts_hash_merge(Hash* src, Hash* dst)
-{
- int limit = src->size;
- HashBucket** bucket = src->bucket;
- int i;
-
- src->used = 0;
- for (i = 0; i < limit; i++) {
- HashBucket* b = bucket[i];
- HashBucket* next;
-
- bucket[i] = NULL;
- while (b) {
- next = b->next;
- hash_insert_entry(dst, b);
- b = next;
- }
- }
-}
-
/*
** Erase hash entry return template if erased
** return 0 if not erased
diff --git a/erts/emulator/beam/hash.h b/erts/emulator/beam/hash.h
index 87fdb360e3..c9e75d7acf 100644
--- a/erts/emulator/beam/hash.h
+++ b/erts/emulator/beam/hash.h
@@ -93,6 +93,4 @@ void* hash_erase(Hash*, void*);
void* hash_remove(Hash*, void*);
void hash_foreach(Hash*, void (*func)(void *, void *), void *);
-void erts_hash_merge(Hash* src, Hash* dst);
-
#endif