> Yea... And we probably need to export one more FM method:
> +   while (HG_(nextIterFM)( map_locks, (Word*)&gla, (Word*)&lk )
> +          && compareFM(map_locks, gla,lastA) <= 0) { // use the comparison
> function from map_locks

Urr.  You're right.  That's ugly.  That means 2 function calls per
element now.

Maybe it would be easier to have this:

  // unchanged -- set up for unbounded iteration
  initIterFM( WordFM* fm )
  // change this back to the original version
  nextIterFM( WordFM* fm, UWord* key, UWord* val)

  // set up for bounded iteration, first value >= notBelow
  initBoundedIterFM( WordFM* fm, UWord notBelow )
  // get next value, except stop if > notAbove
  nextBoundedIterFM( WordFM* fm, UWord notAbove, UWord* key, UWord* val )

That removes the extra compareFM call.

J

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Valgrind-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/valgrind-developers

Reply via email to