Try to sort out signedness problems in hg_wordfm.[ch], and do a bunch
of other tidying too.

* All these word-based abstractions (WordFM, WordSet, WordBag) now
  operate on unsigned words (UWord), whereas they previously operated
  on signed words (Word).  This became a problem, when using unboxed
  comparisons, with the introduction of HG_(initIterAtFM), which
  allows iteration over parts of mappings.  Iterating over a mapping in
  increasing order of signed Word keys is not what callers expect when
  iterating through maps whose keys representing addresses (Addr) since
  Addr is unsigned, and causes logical problems and assertion
  failures.

* Change various size-of-things types from signed to unsigned, and
  make them consistently word sized.  For example the return type
  of HG_(sizeFM) used to be an Int, which never made any sense
  (the size can't be negative, and, on a 64-bit platform, the 
  map could have more than 2G elements, in which case an Int can't
  represent the result).  So make the return value a UWord instead.
  This should generally help avoid obscure overflow problems on 64-bit 
  platforms.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7409 a5019735-40e9-0310-863c-91ae7b9d1cf9
diff --git a/helgrind/hg_wordset.h b/helgrind/hg_wordset.h
index a2157fc..631d519 100644
--- a/helgrind/hg_wordset.h
+++ b/helgrind/hg_wordset.h
@@ -55,7 +55,7 @@
 void HG_(deleteWordSetU) ( WordSetU* );
 
 /* Get the number of elements in this WordSetU. */
-Int HG_(cardinalityWSU) ( WordSetU* );
+UWord HG_(cardinalityWSU) ( WordSetU* );
 
 /* Show performance stats for this WordSetU. */
 void HG_(ppWSUstats) ( WordSetU* wsu, HChar* name );
@@ -66,25 +66,25 @@
    represents the empty set. */
 
 WordSet HG_(emptyWS)        ( WordSetU* );
-WordSet HG_(addToWS)        ( WordSetU*, WordSet, Word );
-WordSet HG_(delFromWS)      ( WordSetU*, WordSet, Word );
+WordSet HG_(addToWS)        ( WordSetU*, WordSet, UWord );
+WordSet HG_(delFromWS)      ( WordSetU*, WordSet, UWord );
 WordSet HG_(unionWS)        ( WordSetU*, WordSet, WordSet );
 WordSet HG_(intersectWS)    ( WordSetU*, WordSet, WordSet );
 WordSet HG_(minusWS)        ( WordSetU*, WordSet, WordSet );
 Bool    HG_(isEmptyWS)      ( WordSetU*, WordSet );
-Bool    HG_(isSingletonWS)  ( WordSetU*, WordSet, Word );
-Word    HG_(anyElementOfWS) ( WordSetU*, WordSet );
-Int     HG_(cardinalityWS)  ( WordSetU*, WordSet );
-Bool    HG_(elemWS)         ( WordSetU*, WordSet, Word );
-WordSet HG_(doubletonWS)    ( WordSetU*, Word, Word );
-WordSet HG_(singletonWS)    ( WordSetU*, Word );
+Bool    HG_(isSingletonWS)  ( WordSetU*, WordSet, UWord );
+UWord   HG_(anyElementOfWS) ( WordSetU*, WordSet );
+UWord   HG_(cardinalityWS)  ( WordSetU*, WordSet );
+Bool    HG_(elemWS)         ( WordSetU*, WordSet, UWord );
+WordSet HG_(doubletonWS)    ( WordSetU*, UWord, UWord );
+WordSet HG_(singletonWS)    ( WordSetU*, UWord );
 WordSet HG_(isSubsetOf)     ( WordSetU*, WordSet, WordSet );
 
 Bool    HG_(plausibleWS)    ( WordSetU*, WordSet );
 Bool    HG_(saneWS_SLOW)    ( WordSetU*, WordSet );
 
 void    HG_(ppWS)           ( WordSetU*, WordSet );
-void    HG_(getPayloadWS)   ( /*OUT*/Word** words, /*OUT*/Word* nWords, 
+void    HG_(getPayloadWS)   ( /*OUT*/UWord** words, /*OUT*/UWord* nWords, 
                              WordSetU*, WordSet );