ART: Some header cleaning around bit-utils
Try to remove dependencies where they are not necessary.
Change-Id: I5ff35cb17aea369bed3725b1610b50d7eb05b81e
diff --git a/compiler/optimizing/stack_map_stream.h b/compiler/optimizing/stack_map_stream.h
index 550ed70..703b6f7 100644
--- a/compiler/optimizing/stack_map_stream.h
+++ b/compiler/optimizing/stack_map_stream.h
@@ -19,6 +19,7 @@
#include "base/arena_containers.h"
#include "base/bit_vector-inl.h"
+#include "base/hash_map.h"
#include "base/value_object.h"
#include "memory_region.h"
#include "nodes.h"
diff --git a/disassembler/disassembler_arm.cc b/disassembler/disassembler_arm.cc
index 03fac18..5e2cf6b 100644
--- a/disassembler/disassembler_arm.cc
+++ b/disassembler/disassembler_arm.cc
@@ -22,6 +22,7 @@
#include <sstream>
#include "arch/arm/registers_arm.h"
+#include "base/bit_utils.h"
#include "base/logging.h"
#include "base/stringprintf.h"
#include "thread.h"
diff --git a/runtime/art_field.h b/runtime/art_field.h
index fa0694b..a943a34 100644
--- a/runtime/art_field.h
+++ b/runtime/art_field.h
@@ -21,7 +21,6 @@
#include "gc_root.h"
#include "modifiers.h"
-#include "object_callbacks.h"
#include "offsets.h"
#include "primitive.h"
#include "read_barrier_option.h"
diff --git a/runtime/art_method.cc b/runtime/art_method.cc
index 17c9fe4..b9e13a4 100644
--- a/runtime/art_method.cc
+++ b/runtime/art_method.cc
@@ -20,6 +20,7 @@
#include "art_field-inl.h"
#include "art_method-inl.h"
#include "base/stringpiece.h"
+#include "debugger.h"
#include "dex_file-inl.h"
#include "dex_instruction.h"
#include "entrypoints/entrypoint_utils.h"
diff --git a/runtime/art_method.h b/runtime/art_method.h
index 1afd056..cec1837 100644
--- a/runtime/art_method.h
+++ b/runtime/art_method.h
@@ -23,7 +23,6 @@
#include "method_reference.h"
#include "modifiers.h"
#include "mirror/object.h"
-#include "object_callbacks.h"
#include "quick/quick_method_frame_info.h"
#include "read_barrier_option.h"
#include "stack.h"
diff --git a/runtime/dex_file.cc b/runtime/dex_file.cc
index d30fac4..52590a5 100644
--- a/runtime/dex_file.cc
+++ b/runtime/dex_file.cc
@@ -29,6 +29,7 @@
#include "art_field-inl.h"
#include "art_method-inl.h"
+#include "base/hash_map.h"
#include "base/logging.h"
#include "base/stringprintf.h"
#include "class_linker.h"
diff --git a/runtime/dex_file.h b/runtime/dex_file.h
index ceefdec..a1ddbc7 100644
--- a/runtime/dex_file.h
+++ b/runtime/dex_file.h
@@ -22,7 +22,6 @@
#include <unordered_map>
#include <vector>
-#include "base/hash_map.h"
#include "base/logging.h"
#include "base/mutex.h" // For Locks::mutator_lock_.
#include "base/value_object.h"
@@ -43,6 +42,8 @@
class ArtField;
class ArtMethod;
class ClassLinker;
+template <class Key, class Value, class EmptyFn, class HashFn, class Pred, class Alloc>
+class HashMap;
class MemMap;
class OatDexFile;
class Signature;
@@ -1051,7 +1052,12 @@
return CompareModifiedUtf8ToModifiedUtf8AsUtf16CodePointValues(a, b) == 0;
}
};
- typedef HashMap<const char*, const ClassDef*, UTF16EmptyFn, UTF16HashCmp, UTF16HashCmp> Index;
+ using Index = HashMap<const char*,
+ const ClassDef*,
+ UTF16EmptyFn,
+ UTF16HashCmp,
+ UTF16HashCmp,
+ std::allocator<std::pair<const char*, const ClassDef*>>>;
mutable Atomic<Index*> class_def_index_;
// If this dex file was loaded from an oat file, oat_dex_file_ contains a
diff --git a/runtime/gc/accounting/atomic_stack.h b/runtime/gc/accounting/atomic_stack.h
index 55b1772..45db500 100644
--- a/runtime/gc/accounting/atomic_stack.h
+++ b/runtime/gc/accounting/atomic_stack.h
@@ -22,7 +22,6 @@
#include <string>
#include "atomic.h"
-#include "base/bit_utils.h"
#include "base/logging.h"
#include "base/macros.h"
#include "mem_map.h"
diff --git a/runtime/gc/heap-inl.h b/runtime/gc/heap-inl.h
index efa065b..d1ab587 100644
--- a/runtime/gc/heap-inl.h
+++ b/runtime/gc/heap-inl.h
@@ -20,7 +20,6 @@
#include "heap.h"
#include "base/time_utils.h"
-#include "debugger.h"
#include "gc/accounting/card_table-inl.h"
#include "gc/allocation_record.h"
#include "gc/collector/semi_space.h"
diff --git a/runtime/jit/jit.cc b/runtime/jit/jit.cc
index fda97db..26a4fe4 100644
--- a/runtime/jit/jit.cc
+++ b/runtime/jit/jit.cc
@@ -19,6 +19,7 @@
#include <dlfcn.h>
#include "art_method-inl.h"
+#include "debugger.h"
#include "entrypoints/runtime_asm_entrypoints.h"
#include "interpreter/interpreter.h"
#include "jit_code_cache.h"
diff --git a/runtime/native/java_lang_Thread.cc b/runtime/native/java_lang_Thread.cc
index 7118f36..c76f6ee 100644
--- a/runtime/native/java_lang_Thread.cc
+++ b/runtime/native/java_lang_Thread.cc
@@ -17,7 +17,6 @@
#include "java_lang_Thread.h"
#include "common_throws.h"
-#include "debugger.h"
#include "jni_internal.h"
#include "monitor.h"
#include "mirror/object.h"
diff --git a/runtime/profiler.cc b/runtime/profiler.cc
index 3db3265..33cfe08 100644
--- a/runtime/profiler.cc
+++ b/runtime/profiler.cc
@@ -28,7 +28,6 @@
#include "base/unix_file/fd_file.h"
#include "class_linker.h"
#include "common_throws.h"
-#include "debugger.h"
#include "dex_file-inl.h"
#include "instrumentation.h"
#include "mirror/class-inl.h"
diff --git a/runtime/stack.h b/runtime/stack.h
index 8023de1..2562738 100644
--- a/runtime/stack.h
+++ b/runtime/stack.h
@@ -21,7 +21,6 @@
#include <string>
#include "arch/instruction_set.h"
-#include "base/bit_utils.h"
#include "dex_file.h"
#include "gc_root.h"
#include "mirror/object_reference.h"