summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Andreas Gampe <agampe@google.com> 2017-06-05 18:14:53 -0700
committer Andreas Gampe <agampe@google.com> 2017-06-05 20:28:20 -0700
commit2ff3b97500b717f69415ae474d5cfb1613cd15ee (patch)
treea6bd76eeda26ad85173e23a14f69ec8ed3440570
parent5d08fcc21a14190c4dba3028a3e35d281afdd016 (diff)
ART: More header cleanups
Clean up some more includes. Move some -inls from object-inl to object-refvisitor-inl. Fix up transitives. Test: m test-art-host Change-Id: I0e3e268d95a1c71b0a80fc963d13d191a97b2283
-rw-r--r--compiler/image_writer.h2
-rw-r--r--dex2oat/dex2oat.cc1
-rw-r--r--runtime/class_linker.cc7
-rw-r--r--runtime/class_linker.h4
-rw-r--r--runtime/class_table.cc2
-rw-r--r--runtime/dex_file.h1
-rw-r--r--runtime/intern_table_test.cc1
-rw-r--r--runtime/mirror/class-inl.h2
-rw-r--r--runtime/mirror/class_loader-inl.h2
-rw-r--r--runtime/mirror/class_loader.h3
-rw-r--r--runtime/mirror/dex_cache.cc1
-rw-r--r--runtime/mirror/object-inl.h3
-rw-r--r--runtime/mirror/object-refvisitor-inl.h2
-rw-r--r--runtime/mirror/string.cc1
14 files changed, 21 insertions, 11 deletions
diff --git a/compiler/image_writer.h b/compiler/image_writer.h
index a12d849f02..2283b39773 100644
--- a/compiler/image_writer.h
+++ b/compiler/image_writer.h
@@ -33,6 +33,7 @@
#include "base/enums.h"
#include "base/length_prefixed_array.h"
#include "base/macros.h"
+#include "class_table.h"
#include "driver/compiler_driver.h"
#include "image.h"
#include "lock_word.h"
@@ -60,7 +61,6 @@ class ClassLoader;
} // namespace mirror
class ClassLoaderVisitor;
-class ClassTable;
class ImtConflictTable;
static constexpr int kInvalidFd = -1;
diff --git a/dex2oat/dex2oat.cc b/dex2oat/dex2oat.cc
index 53e73c344e..ce989c440a 100644
--- a/dex2oat/dex2oat.cc
+++ b/dex2oat/dex2oat.cc
@@ -74,6 +74,7 @@
#include "mirror/class_loader.h"
#include "mirror/object-inl.h"
#include "mirror/object_array-inl.h"
+#include "oat_file.h"
#include "oat_file_assistant.h"
#include "oat_writer.h"
#include "os.h"
diff --git a/runtime/class_linker.cc b/runtime/class_linker.cc
index aab98395d0..ecb6c0c0e9 100644
--- a/runtime/class_linker.cc
+++ b/runtime/class_linker.cc
@@ -109,6 +109,7 @@
#include "thread-inl.h"
#include "thread_list.h"
#include "trace.h"
+#include "utf.h"
#include "utils.h"
#include "utils/dex_cache_arrays_layout-inl.h"
#include "verifier/method_verifier.h"
@@ -3982,6 +3983,12 @@ void ClassLinker::UpdateClassMethods(ObjPtr<mirror::Class> klass,
}
mirror::Class* ClassLinker::LookupClass(Thread* self,
+ const char* descriptor,
+ ObjPtr<mirror::ClassLoader> class_loader) {
+ return LookupClass(self, descriptor, ComputeModifiedUtf8Hash(descriptor), class_loader);
+}
+
+mirror::Class* ClassLinker::LookupClass(Thread* self,
const char* descriptor,
size_t hash,
ObjPtr<mirror::ClassLoader> class_loader) {
diff --git a/runtime/class_linker.h b/runtime/class_linker.h
index fad6e9ebbf..1e8125eb05 100644
--- a/runtime/class_linker.h
+++ b/runtime/class_linker.h
@@ -212,9 +212,7 @@ class ClassLinker {
const char* descriptor,
ObjPtr<mirror::ClassLoader> class_loader)
REQUIRES(!Locks::classlinker_classes_lock_)
- REQUIRES_SHARED(Locks::mutator_lock_) {
- return LookupClass(self, descriptor, ComputeModifiedUtf8Hash(descriptor), class_loader);
- }
+ REQUIRES_SHARED(Locks::mutator_lock_);
// Finds all the classes with the given descriptor, regardless of ClassLoader.
void LookupClasses(const char* descriptor, std::vector<ObjPtr<mirror::Class>>& classes)
diff --git a/runtime/class_table.cc b/runtime/class_table.cc
index 0891d3f9f5..b71610ac7f 100644
--- a/runtime/class_table.cc
+++ b/runtime/class_table.cc
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-#include "class_table.h"
+#include "class_table-inl.h"
#include "mirror/class-inl.h"
#include "oat_file.h"
diff --git a/runtime/dex_file.h b/runtime/dex_file.h
index 591ba42003..3de78ed5a3 100644
--- a/runtime/dex_file.h
+++ b/runtime/dex_file.h
@@ -28,7 +28,6 @@
#include "invoke_type.h"
#include "jni.h"
#include "modifiers.h"
-#include "utf.h"
namespace art {
diff --git a/runtime/intern_table_test.cc b/runtime/intern_table_test.cc
index 311515c7ed..bb27b34cf5 100644
--- a/runtime/intern_table_test.cc
+++ b/runtime/intern_table_test.cc
@@ -23,6 +23,7 @@
#include "handle_scope-inl.h"
#include "mirror/string.h"
#include "scoped_thread_state_change-inl.h"
+#include "utf.h"
namespace art {
diff --git a/runtime/mirror/class-inl.h b/runtime/mirror/class-inl.h
index 5122b37aa6..71ca7df40b 100644
--- a/runtime/mirror/class-inl.h
+++ b/runtime/mirror/class-inl.h
@@ -29,7 +29,7 @@
#include "dex_file-inl.h"
#include "gc/heap-inl.h"
#include "iftable.h"
-#include "object_array-inl.h"
+#include "object_array.h"
#include "object-inl.h"
#include "read_barrier-inl.h"
#include "reference-inl.h"
diff --git a/runtime/mirror/class_loader-inl.h b/runtime/mirror/class_loader-inl.h
index f5ecdaea26..39c8ee0d60 100644
--- a/runtime/mirror/class_loader-inl.h
+++ b/runtime/mirror/class_loader-inl.h
@@ -19,9 +19,7 @@
#include "class_loader.h"
-#include "base/mutex-inl.h"
#include "class_table-inl.h"
-#include "obj_ptr-inl.h"
namespace art {
namespace mirror {
diff --git a/runtime/mirror/class_loader.h b/runtime/mirror/class_loader.h
index 6e1f44bb46..381d96b541 100644
--- a/runtime/mirror/class_loader.h
+++ b/runtime/mirror/class_loader.h
@@ -17,7 +17,10 @@
#ifndef ART_RUNTIME_MIRROR_CLASS_LOADER_H_
#define ART_RUNTIME_MIRROR_CLASS_LOADER_H_
+#include "base/mutex.h"
#include "object.h"
+#include "object_reference.h"
+#include "obj_ptr.h"
namespace art {
diff --git a/runtime/mirror/dex_cache.cc b/runtime/mirror/dex_cache.cc
index c95d92e34b..96e347576a 100644
--- a/runtime/mirror/dex_cache.cc
+++ b/runtime/mirror/dex_cache.cc
@@ -23,6 +23,7 @@
#include "gc/heap.h"
#include "globals.h"
#include "linear_alloc.h"
+#include "oat_file.h"
#include "object.h"
#include "object-inl.h"
#include "object_array-inl.h"
diff --git a/runtime/mirror/object-inl.h b/runtime/mirror/object-inl.h
index d3fc95ff2d..95f829dc23 100644
--- a/runtime/mirror/object-inl.h
+++ b/runtime/mirror/object-inl.h
@@ -26,8 +26,7 @@
#include "class-inl.h"
#include "class_flags.h"
#include "class_linker.h"
-#include "class_loader-inl.h"
-#include "dex_cache-inl.h"
+#include "dex_cache.h"
#include "lock_word-inl.h"
#include "monitor.h"
#include "object_array-inl.h"
diff --git a/runtime/mirror/object-refvisitor-inl.h b/runtime/mirror/object-refvisitor-inl.h
index 49ab7c2a53..f5ab4dd8db 100644
--- a/runtime/mirror/object-refvisitor-inl.h
+++ b/runtime/mirror/object-refvisitor-inl.h
@@ -19,7 +19,9 @@
#include "object-inl.h"
+#include "class_loader-inl.h"
#include "class-refvisitor-inl.h"
+#include "dex_cache-inl.h"
namespace art {
namespace mirror {
diff --git a/runtime/mirror/string.cc b/runtime/mirror/string.cc
index de0e75b083..2b31aefb68 100644
--- a/runtime/mirror/string.cc
+++ b/runtime/mirror/string.cc
@@ -18,6 +18,7 @@
#include "arch/memcmp16.h"
#include "array.h"
+#include "base/array_ref.h"
#include "class-inl.h"
#include "gc/accounting/card_table-inl.h"
#include "handle_scope-inl.h"