changeset 6baf252c5ad1 in /z/repo/m5
details: http://repo.m5sim.org/m5?cmd=changeset;node=6baf252c5ad1
description:
        ruby: Make ruby's Map use hashmap.hh to simplify things.

diffstat:

1 file changed, 2 insertions(+), 17 deletions(-)
src/mem/gems_common/Map.hh |   19 ++-----------------

diffs (38 lines):

diff -r 71f11a6aa8a9 -r 6baf252c5ad1 src/mem/gems_common/Map.hh
--- a/src/mem/gems_common/Map.hh        Tue May 12 22:33:05 2009 -0700
+++ b/src/mem/gems_common/Map.hh        Tue May 12 22:33:05 2009 -0700
@@ -34,24 +34,9 @@
 #ifndef MAP_H
 #define MAP_H
 
+#include "base/hashmap.hh"
 #include "mem/gems_common/Vector.hh"
 
-namespace __gnu_cxx {
-  template <> struct hash <std::string>
-  {
-    size_t operator()(const string& s) const { return 
hash<char*>()(s.c_str()); }
-  };
-}
-
-typedef unsigned long long uint64;
-//hack for uint64 hashes...
-namespace __gnu_cxx {
-  template <> struct hash <uint64>
-  {
-    size_t operator()(const uint64 & s) const { return (size_t) s; }
-  };
-}
-
 template <class KEY_TYPE, class VALUE_TYPE>
 class Map
 {
@@ -84,7 +69,7 @@
   // m_map is declared mutable because some methods from the STL "map"
   // class that should be const are not.  Thus we define this as
   // mutable so we can still have conceptually const accessors.
-  mutable __gnu_cxx::hash_map<KEY_TYPE, VALUE_TYPE> m_map;
+  mutable m5::hash_map<KEY_TYPE, VALUE_TYPE> m_map;
 };
 
 template <class KEY_TYPE, class VALUE_TYPE>
_______________________________________________
m5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/m5-dev

Reply via email to