From: simonmar Date: Tue, 28 Jun 2005 13:43:41 +0000 (+0000) Subject: [project @ 2005-06-28 13:43:41 by simonmar] X-Git-Tag: Initial_conversion_from_CVS_complete~407 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=9e9dfae098e44961adef0713fcfe29855c982a84;p=ghc-hetmet.git [project @ 2005-06-28 13:43:41 by simonmar] Disable the assertion that checks for multiple entries with the same key in the hash table. It's useful to be able to do this sometimes. --- diff --git a/ghc/rts/Hash.c b/ghc/rts/Hash.c index d3e4cf4..ada11a6 100644 --- a/ghc/rts/Hash.c +++ b/ghc/rts/Hash.c @@ -245,8 +245,9 @@ insertHashTable(HashTable *table, StgWord key, void *data) int index; HashList *hl; - /* We want no duplicates */ - ASSERT(lookupHashTable(table, key) == NULL); + // Disable this assert; sometimes it's useful to be able to + // overwrite entries in the hash table. + // ASSERT(lookupHashTable(table, key) == NULL); /* When the average load gets too high, we expand the table */ if (++table->kcount >= HLOAD * table->bcount)