diff options
author | 2017-02-01 16:46:28 -0800 | |
---|---|---|
committer | 2017-04-21 08:40:33 -0700 | |
commit | c6ea7d00ad069a2736f603daa3d8eaa9a1f8ea11 (patch) | |
tree | a6d3332a8592fb806841314d55b206b573d37d86 /runtime/class_linker-inl.h | |
parent | d68677c5fde1ace16ea58d65733776c954e7acb4 (diff) |
ART: Clean up art_method.h
Clean up the header. Fix up other headers including the -inl file,
in an effort to prune the include graph. Fix broken transitive
includes by making includes explicit. Introduce new -inl files
for method handles and reference visiting.
Test: source build/envsetup.sh && lunch aosp_angler-userdebug && mmma art
Test: source build/envsetup.sh && lunch aosp_mips64-userdebug && mmma art
Change-Id: I8f60f1160c2a702fdf3598149dae38f6fa6bc851
Diffstat (limited to 'runtime/class_linker-inl.h')
-rw-r--r-- | runtime/class_linker-inl.h | 47 |
1 files changed, 0 insertions, 47 deletions
diff --git a/runtime/class_linker-inl.h b/runtime/class_linker-inl.h index 9ddc6cf0ae..c9fb3ed3ad 100644 --- a/runtime/class_linker-inl.h +++ b/runtime/class_linker-inl.h @@ -33,10 +33,6 @@ namespace art { -inline mirror::Class* ClassLinker::FindSystemClass(Thread* self, const char* descriptor) { - return FindClass(self, descriptor, ScopedNullHandle<mirror::ClassLoader>()); -} - inline mirror::Class* ClassLinker::FindArrayClass(Thread* self, ObjPtr<mirror::Class>* element_class) { for (size_t i = 0; i < kFindArrayCacheSize; ++i) { @@ -65,19 +61,6 @@ inline mirror::Class* ClassLinker::FindArrayClass(Thread* self, return array_class.Ptr(); } -inline mirror::String* ClassLinker::ResolveString(dex::StringIndex string_idx, - ArtMethod* referrer) { - Thread::PoisonObjectPointersIfDebug(); - ObjPtr<mirror::String> string = referrer->GetDexCache()->GetResolvedString(string_idx); - if (UNLIKELY(string == nullptr)) { - StackHandleScope<1> hs(Thread::Current()); - Handle<mirror::DexCache> dex_cache(hs.NewHandle(referrer->GetDexCache())); - const DexFile& dex_file = *dex_cache->GetDexFile(); - string = ResolveString(dex_file, string_idx, dex_cache); - } - return string.Ptr(); -} - inline ObjPtr<mirror::Class> ClassLinker::LookupResolvedType( dex::TypeIndex type_idx, ObjPtr<mirror::DexCache> dex_cache, @@ -191,36 +174,6 @@ inline ArtField* ClassLinker::ResolveField(uint32_t field_idx, return resolved_field; } -inline mirror::Object* ClassLinker::AllocObject(Thread* self) { - return GetClassRoot(kJavaLangObject)->Alloc<true, false>( - self, - Runtime::Current()->GetHeap()->GetCurrentAllocator()).Ptr(); -} - -template <class T> -inline mirror::ObjectArray<T>* ClassLinker::AllocObjectArray(Thread* self, size_t length) { - return mirror::ObjectArray<T>::Alloc(self, GetClassRoot(kObjectArrayClass), length); -} - -inline mirror::ObjectArray<mirror::Class>* ClassLinker::AllocClassArray(Thread* self, - size_t length) { - return mirror::ObjectArray<mirror::Class>::Alloc(self, GetClassRoot(kClassArrayClass), length); -} - -inline mirror::ObjectArray<mirror::String>* ClassLinker::AllocStringArray(Thread* self, - size_t length) { - return mirror::ObjectArray<mirror::String>::Alloc(self, - GetClassRoot(kJavaLangStringArrayClass), - length); -} - -inline mirror::IfTable* ClassLinker::AllocIfTable(Thread* self, size_t ifcount) { - return down_cast<mirror::IfTable*>( - mirror::IfTable::Alloc(self, - GetClassRoot(kObjectArrayClass), - ifcount * mirror::IfTable::kMax)); -} - inline mirror::Class* ClassLinker::GetClassRoot(ClassRoot class_root) { DCHECK(!class_roots_.IsNull()); mirror::ObjectArray<mirror::Class>* class_roots = class_roots_.Read(); |