summaryrefslogtreecommitdiff
path: root/src/mem
diff options
context:
space:
mode:
authorNathan Binkert <nate@binkert.org>2009-05-12 22:33:05 -0700
committerNathan Binkert <nate@binkert.org>2009-05-12 22:33:05 -0700
commit7389dc63b2b0df640da50bb70b6e17573ab90f35 (patch)
tree68a6557e8bc3e4a3508c5fd7e4cf6869b80ffa13 /src/mem
parent82c9e6a5fc9bd2b68e19e00381e5e87f291da659 (diff)
downloadgem5-7389dc63b2b0df640da50bb70b6e17573ab90f35.tar.xz
ruby: Make ruby's Map use hashmap.hh to simplify things.
Diffstat (limited to 'src/mem')
-rw-r--r--src/mem/gems_common/Map.hh19
1 files changed, 2 insertions, 17 deletions
diff --git a/src/mem/gems_common/Map.hh b/src/mem/gems_common/Map.hh
index 6b145a90a..5128a0fee 100644
--- a/src/mem/gems_common/Map.hh
+++ b/src/mem/gems_common/Map.hh
@@ -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 @@ private:
// 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>