Remove most of the unordered_ stuff and use the standard equivalents instead.

Change-Id: I01c6f195fd2cf6edbe430fb31e99b2e2748c2088
diff --git a/src/class_linker.cc b/src/class_linker.cc
index 20e6514..22f8a8a 100644
--- a/src/class_linker.cc
+++ b/src/class_linker.cc
@@ -1730,7 +1730,7 @@
 bool ClassLinker::RemoveClass(const char* descriptor, const ClassLoader* class_loader) {
   size_t hash = Hash(descriptor);
   MutexLock mu(classes_lock_);
-  typedef Table::const_iterator It;  // TODO: C++0x auto
+  typedef Table::iterator It;  // TODO: C++0x auto
   // TODO: determine if its better to search classes_ or image_classes_ first
   ClassHelper kh;
   for (It it = classes_.find(hash), end = classes_.end(); it != end; ++it) {
diff --git a/src/class_linker.h b/src/class_linker.h
index fde4d5f..62e47db 100644
--- a/src/class_linker.h
+++ b/src/class_linker.h
@@ -24,16 +24,13 @@
 
 #include "dex_cache.h"
 #include "dex_file.h"
+#include "gtest/gtest.h"
 #include "heap.h"
 #include "macros.h"
 #include "mutex.h"
 #include "oat_file.h"
 #include "object.h"
 #include "stack_indirect_reference_table.h"
-#include "unordered_map.h"
-#include "unordered_set.h"
-
-#include "gtest/gtest.h"
 
 namespace art {
 
@@ -404,7 +401,7 @@
   // Class* instances. Results should be compared for a matching
   // Class::descriptor_ and Class::class_loader_.
   // Protected by classes_lock_
-  typedef std::tr1::unordered_multimap<size_t, Class*> Table;
+  typedef std::multimap<size_t, Class*> Table;
   Table image_classes_;
   Table classes_;
   mutable Mutex classes_lock_;
diff --git a/src/class_loader.h b/src/class_loader.h
index a5436fa..83f35c0 100644
--- a/src/class_loader.h
+++ b/src/class_loader.h
@@ -3,11 +3,11 @@
 #ifndef ART_SRC_CLASS_LOADER_H_
 #define ART_SRC_CLASS_LOADER_H_
 
+#include <map>
 #include <vector>
 
 #include "dex_file.h"
 #include "object.h"
-#include "unordered_map.h"
 
 namespace art {
 
@@ -26,7 +26,7 @@
   ClassLoader* parent_;
   Object* proxyCache_;
 
-  typedef std::tr1::unordered_map<const ClassLoader*, std::vector<const DexFile*>, ObjectIdentityHash> Table;
+  typedef std::map<const ClassLoader*, std::vector<const DexFile*> > Table;
   static Table compile_time_class_paths_;
 
   static bool use_compile_time_class_path;
diff --git a/src/compiler.h b/src/compiler.h
index bf21ed6..9d2b64c 100644
--- a/src/compiler.h
+++ b/src/compiler.h
@@ -3,6 +3,8 @@
 #ifndef ART_SRC_COMPILER_H_
 #define ART_SRC_COMPILER_H_
 
+#include <map>
+
 #include "compiled_class.h"
 #include "compiled_method.h"
 #include "constants.h"
@@ -165,7 +167,7 @@
   // All method references that this compiler has compiled
   MethodTable compiled_methods_;
 
-  typedef std::tr1::unordered_map<std::string, const CompiledInvokeStub*> InvokeStubTable;
+  typedef std::map<std::string, const CompiledInvokeStub*> InvokeStubTable;
   // Invocation stubs created to allow invocation of the compiled methods
   InvokeStubTable compiled_invoke_stubs_;
 
diff --git a/src/hprof/hprof.h b/src/hprof/hprof.h
index 7c1180e..9595b2b 100644
--- a/src/hprof/hprof.h
+++ b/src/hprof/hprof.h
@@ -17,11 +17,13 @@
 #define HPROF_HPROF_H_
 
 #include <stdio.h>
-#include "globals.h"
+
+#include <map>
+#include <set>
+
 #include "file.h"
+#include "globals.h"
 #include "object.h"
-#include "unordered_map.h"
-#include "unordered_set.h"
 #include "thread_list.h"
 
 namespace art {
@@ -76,10 +78,10 @@
 typedef HprofId HprofStringId;
 typedef HprofId HprofObjectId;
 typedef HprofId HprofClassObjectId;
-typedef std::tr1::unordered_set<Class*, ObjectIdentityHash> ClassSet;
-typedef std::tr1::unordered_set<Class*, ObjectIdentityHash>::iterator ClassSetIterator;
-typedef std::tr1::unordered_map<std::string, size_t> StringMap;
-typedef std::tr1::unordered_map<std::string, size_t>::iterator StringMapIterator;
+typedef std::set<Class*> ClassSet;
+typedef std::set<Class*>::iterator ClassSetIterator;
+typedef std::map<std::string, size_t> StringMap;
+typedef std::map<std::string, size_t>::iterator StringMapIterator;
 
 enum HprofBasicType {
   hprof_basic_object = 2,
diff --git a/src/image_writer.h b/src/image_writer.h
index d27333a..ad00f71 100644
--- a/src/image_writer.h
+++ b/src/image_writer.h
@@ -9,14 +9,13 @@
 #include <set>
 #include <string>
 
-#include "UniquePtr.h"
 #include "dex_cache.h"
 #include "mem_map.h"
 #include "oat_file.h"
 #include "object.h"
 #include "os.h"
 #include "space.h"
-#include "unordered_set.h"
+#include "UniquePtr.h"
 
 namespace art {
 
@@ -145,7 +144,7 @@
   const byte* oat_base_;
 
   // DexCaches seen while scanning for fixing up CodeAndDirectMethods
-  typedef std::tr1::unordered_set<DexCache*, ObjectIdentityHash> Set;
+  typedef std::set<DexCache*> Set;
   Set dex_caches_;
 };
 
diff --git a/src/intern_table.cc b/src/intern_table.cc
index a848761..e75597e 100644
--- a/src/intern_table.cc
+++ b/src/intern_table.cc
@@ -56,7 +56,7 @@
 
 void InternTable::Remove(Table& table, const String* s, uint32_t hash_code) {
   intern_table_lock_.AssertHeld();
-  typedef Table::const_iterator It; // TODO: C++0x auto
+  typedef Table::iterator It; // TODO: C++0x auto
   for (It it = table.find(hash_code), end = table.end(); it != end; ++it) {
     if (it->second == s) {
       table.erase(it);
@@ -138,7 +138,7 @@
 
 void InternTable::SweepInternTableWeaks(Heap::IsMarkedTester is_marked, void* arg) {
   MutexLock mu(intern_table_lock_);
-  typedef Table::const_iterator It; // TODO: C++0x auto
+  typedef Table::iterator It; // TODO: C++0x auto
   for (It it = weak_interns_.begin(), end = weak_interns_.end(); it != end;) {
     Object* object = it->second;
     if (!is_marked(object, arg)) {
diff --git a/src/intern_table.h b/src/intern_table.h
index 80f21e2..a5bf187 100644
--- a/src/intern_table.h
+++ b/src/intern_table.h
@@ -4,11 +4,11 @@
 #define ART_SRC_INTERN_TABLE_H_
 
 #include <iosfwd>
+#include <map>
 
 #include "heap.h"
 #include "mutex.h"
 #include "object.h"
-#include "unordered_map.h"
 
 namespace art {
 
@@ -53,7 +53,7 @@
   void DumpForSigQuit(std::ostream& os) const;
 
  private:
-  typedef std::tr1::unordered_multimap<int32_t, String*> Table;
+  typedef std::multimap<int32_t, String*> Table;
 
   String* Insert(String* s, bool is_strong);
 
diff --git a/src/intern_table_test.cc b/src/intern_table_test.cc
index a0c47ec..b6ecdc6 100644
--- a/src/intern_table_test.cc
+++ b/src/intern_table_test.cc
@@ -88,7 +88,7 @@
 
   EXPECT_EQ(2U, t.Size());
 
-  // Just check that we didn't corrupt the unordered_multimap.
+  // Just check that we didn't corrupt the map.
   SirtRef<String> still_here(String::AllocFromModifiedUtf8("still here"));
   t.InternWeak(still_here.get());
   EXPECT_EQ(3U, t.Size());
diff --git a/src/oatdump.cc b/src/oatdump.cc
index 91f4091..1e0d6e7 100644
--- a/src/oatdump.cc
+++ b/src/oatdump.cc
@@ -5,18 +5,18 @@
 
 #include <fstream>
 #include <iostream>
+#include <map>
 #include <string>
 #include <vector>
 
 #include "class_linker.h"
 #include "file.h"
 #include "image.h"
-#include "os.h"
 #include "object_utils.h"
+#include "os.h"
 #include "runtime.h"
 #include "space.h"
 #include "stringpiece.h"
-#include "unordered_map.h"
 
 namespace art {
 
@@ -414,10 +414,10 @@
           pc_mapping_table_bytes(0),
           dex_instruction_bytes(0) {}
 
-    typedef std::tr1::unordered_map<std::string,size_t> TableBytes;
+    typedef std::map<std::string, size_t> TableBytes;
     TableBytes descriptor_to_bytes;
 
-    typedef std::tr1::unordered_map<std::string,size_t> TableCount;
+    typedef std::map<std::string, size_t> TableCount;
     TableCount descriptor_to_count;
 
     double PercentOfFileBytes(size_t size) {
diff --git a/src/zip_archive.h b/src/zip_archive.h
index 6427da9..4f95284 100644
--- a/src/zip_archive.h
+++ b/src/zip_archive.h
@@ -23,13 +23,12 @@
 
 #include <map>
 
-#include "UniquePtr.h"
 #include "file.h"
 #include "globals.h"
 #include "logging.h"
 #include "mem_map.h"
 #include "stringpiece.h"
-#include "unordered_map.h"
+#include "UniquePtr.h"
 
 namespace art {
 
@@ -121,7 +120,7 @@
   uint16_t num_entries_;
   off_t dir_offset_;
   UniquePtr<MemMap> dir_map_;
-  typedef std::tr1::unordered_map<StringPiece, const byte*, StringPieceHash> DirEntries;
+  typedef std::map<StringPiece, const byte*> DirEntries;
   DirEntries dir_entries_;
 
   friend class ZipEntry;