Lines Matching refs:mirror
117 Handle<mirror::ClassLoader> class_loader(hs.NewHandle(method != nullptr ? in HasInitWithString()
119 mirror::Class* exception_class = class_linker->FindClass(self, descriptor, class_loader); in HasInitWithString()
134 static void HandleEarlierVerifyError(Thread* self, ClassLinker* class_linker, mirror::Class* c) in HandleEarlierVerifyError()
136 mirror::Object* obj = c->GetVerifyError(); in HandleEarlierVerifyError()
153 mirror::Class* throwable_class = in HandleEarlierVerifyError()
155 mirror::Class* error_class = obj->GetClass(); in HandleEarlierVerifyError()
162 void ClassLinker::ThrowEarlierClassFailure(mirror::Class* c, bool wrap_in_no_class_def) { in ThrowEarlierClassFailure()
171 mirror::Object* verify_error = c->GetVerifyError(); in ThrowEarlierClassFailure()
185 mirror::Throwable* pre_allocated = runtime->GetPreAllocatedNoClassDefFoundError(); in ThrowEarlierClassFailure()
202 static void VlogClassInitializationFailure(Handle<mirror::Class> klass) in VlogClassInitializationFailure()
211 static void WrapExceptionInInitializer(Handle<mirror::Class> klass) in WrapExceptionInInitializer()
330 std::fill_n(find_array_class_cache_, kFindArrayCacheSize, GcRoot<mirror::Class>(nullptr)); in ClassLinker()
333 void ClassLinker::CheckSystemClass(Thread* self, Handle<mirror::Class> c1, const char* descriptor) { in CheckSystemClass()
334 mirror::Class* c2 = FindSystemClass(self, descriptor); in CheckSystemClass()
341 c1->DumpClass(os1, mirror::Class::kDumpClassFullDetail); in CheckSystemClass()
342 c2->DumpClass(os2, mirror::Class::kDumpClassFullDetail); in CheckSystemClass()
373 auto class_class_size = mirror::Class::ClassClassSize(image_pointer_size_); in InitWithoutImage()
374 Handle<mirror::Class> java_lang_Class(hs.NewHandle(down_cast<mirror::Class*>( in InitWithoutImage()
377 mirror::Class::SetClassClass(java_lang_Class.Get()); in InitWithoutImage()
388 auto class_array_class_size = mirror::ObjectArray<mirror::Class>::ClassSize(image_pointer_size_); in InitWithoutImage()
389 Handle<mirror::Class> class_array_class(hs.NewHandle( in InitWithoutImage()
394 Handle<mirror::Class> java_lang_Object(hs.NewHandle( in InitWithoutImage()
395 AllocClass(self, java_lang_Class.Get(), mirror::Object::ClassSize(image_pointer_size_)))); in InitWithoutImage()
399 mirror::Class::SetStatus(java_lang_Object, mirror::Class::kStatusLoaded, self); in InitWithoutImage()
401 java_lang_Object->SetObjectSize(sizeof(mirror::Object)); in InitWithoutImage()
410 Handle<mirror::Class> object_array_class(hs.NewHandle( in InitWithoutImage()
412 mirror::ObjectArray<mirror::Object>::ClassSize(image_pointer_size_)))); in InitWithoutImage()
416 Handle<mirror::Class> char_class(hs.NewHandle( in InitWithoutImage()
418 mirror::Class::PrimitiveClassSize(image_pointer_size_)))); in InitWithoutImage()
427 Handle<mirror::Class> char_array_class(hs.NewHandle( in InitWithoutImage()
428 AllocClass(self, java_lang_Class.Get(), mirror::Array::ClassSize(image_pointer_size_)))); in InitWithoutImage()
430 mirror::CharArray::SetArrayClass(char_array_class.Get()); in InitWithoutImage()
433 Handle<mirror::Class> java_lang_String(hs.NewHandle( in InitWithoutImage()
434 AllocClass(self, java_lang_Class.Get(), mirror::String::ClassSize(image_pointer_size_)))); in InitWithoutImage()
436 mirror::String::SetClass(java_lang_String.Get()); in InitWithoutImage()
437 mirror::Class::SetStatus(java_lang_String, mirror::Class::kStatusResolved, self); in InitWithoutImage()
440 Handle<mirror::Class> java_lang_ref_Reference(hs.NewHandle( in InitWithoutImage()
441 AllocClass(self, java_lang_Class.Get(), mirror::Reference::ClassSize(image_pointer_size_)))); in InitWithoutImage()
442 mirror::Reference::SetClass(java_lang_ref_Reference.Get()); in InitWithoutImage()
443 java_lang_ref_Reference->SetObjectSize(mirror::Reference::InstanceSize()); in InitWithoutImage()
444 mirror::Class::SetStatus(java_lang_ref_Reference, mirror::Class::kStatusResolved, self); in InitWithoutImage()
447 class_roots_ = GcRoot<mirror::ObjectArray<mirror::Class>>( in InitWithoutImage()
448 mirror::ObjectArray<mirror::Class>::Alloc(self, object_array_class.Get(), in InitWithoutImage()
470 array_iftable_ = GcRoot<mirror::IfTable>(AllocIfTable(self, 2)); in InitWithoutImage()
473 Handle<mirror::Class> int_array_class(hs.NewHandle( in InitWithoutImage()
474 AllocClass(self, java_lang_Class.Get(), mirror::Array::ClassSize(image_pointer_size_)))); in InitWithoutImage()
476 mirror::IntArray::SetArrayClass(int_array_class.Get()); in InitWithoutImage()
480 Handle<mirror::Class> long_array_class(hs.NewHandle( in InitWithoutImage()
481 AllocClass(self, java_lang_Class.Get(), mirror::Array::ClassSize(image_pointer_size_)))); in InitWithoutImage()
483 mirror::LongArray::SetArrayClass(long_array_class.Get()); in InitWithoutImage()
489 Handle<mirror::Class> java_lang_DexCache(hs.NewHandle( in InitWithoutImage()
490 AllocClass(self, java_lang_Class.Get(), mirror::DexCache::ClassSize(image_pointer_size_)))); in InitWithoutImage()
493 java_lang_DexCache->SetObjectSize(mirror::DexCache::InstanceSize()); in InitWithoutImage()
494 mirror::Class::SetStatus(java_lang_DexCache, mirror::Class::kStatusResolved, self); in InitWithoutImage()
497 Handle<mirror::Class> object_array_string(hs.NewHandle( in InitWithoutImage()
499 mirror::ObjectArray<mirror::String>::ClassSize(image_pointer_size_)))); in InitWithoutImage()
542 mirror::Class::SetStatus(java_lang_Object, mirror::Class::kStatusNotReady, self); in InitWithoutImage()
544 CHECK_EQ(java_lang_Object->GetObjectSize(), mirror::Object::InstanceSize()); in InitWithoutImage()
545 mirror::Class::SetStatus(java_lang_String, mirror::Class::kStatusNotReady, self); in InitWithoutImage()
547 mirror::Class::SetStatus(java_lang_DexCache, mirror::Class::kStatusNotReady, self); in InitWithoutImage()
549 CHECK_EQ(java_lang_DexCache->GetObjectSize(), mirror::DexCache::InstanceSize()); in InitWithoutImage()
553 mirror::BooleanArray::SetArrayClass(GetClassRoot(kBooleanArrayClass)); in InitWithoutImage()
556 mirror::ByteArray::SetArrayClass(GetClassRoot(kByteArrayClass)); in InitWithoutImage()
561 mirror::ShortArray::SetArrayClass(GetClassRoot(kShortArrayClass)); in InitWithoutImage()
567 mirror::FloatArray::SetArrayClass(GetClassRoot(kFloatArrayClass)); in InitWithoutImage()
570 mirror::DoubleArray::SetArrayClass(GetClassRoot(kDoubleArrayClass)); in InitWithoutImage()
592 mirror::Class::GetDirectInterface(self, class_array_class, 0)); in InitWithoutImage()
594 mirror::Class::GetDirectInterface(self, class_array_class, 1)); in InitWithoutImage()
596 mirror::Class::GetDirectInterface(self, object_array_class, 0)); in InitWithoutImage()
598 mirror::Class::GetDirectInterface(self, object_array_class, 1)); in InitWithoutImage()
612 mirror::Field::SetClass(class_root); in InitWithoutImage()
618 mirror::Field::SetArrayClass(class_root); in InitWithoutImage()
624 mirror::Constructor::SetClass(class_root); in InitWithoutImage()
628 mirror::Constructor::SetArrayClass(class_root); in InitWithoutImage()
634 mirror::Method::SetClass(class_root); in InitWithoutImage()
638 mirror::Method::SetArrayClass(class_root); in InitWithoutImage()
642 mirror::Class::SetStatus(java_lang_ref_Reference, mirror::Class::kStatusNotReady, self); in InitWithoutImage()
644 CHECK_EQ(java_lang_ref_Reference->GetObjectSize(), mirror::Reference::InstanceSize()); in InitWithoutImage()
646 mirror::Reference::ClassSize(image_pointer_size_)); in InitWithoutImage()
648 CHECK_EQ(class_root->GetClassFlags(), mirror::kClassFlagNormal); in InitWithoutImage()
649 class_root->SetClassFlags(class_root->GetClassFlags() | mirror::kClassFlagFinalizerReference); in InitWithoutImage()
651 CHECK_EQ(class_root->GetClassFlags(), mirror::kClassFlagNormal); in InitWithoutImage()
652 class_root->SetClassFlags(class_root->GetClassFlags() | mirror::kClassFlagPhantomReference); in InitWithoutImage()
654 CHECK_EQ(class_root->GetClassFlags(), mirror::kClassFlagNormal); in InitWithoutImage()
655 class_root->SetClassFlags(class_root->GetClassFlags() | mirror::kClassFlagSoftReference); in InitWithoutImage()
657 CHECK_EQ(class_root->GetClassFlags(), mirror::kClassFlagNormal); in InitWithoutImage()
658 class_root->SetClassFlags(class_root->GetClassFlags() | mirror::kClassFlagWeakReference); in InitWithoutImage()
663 CHECK_EQ(class_root->GetObjectSize(), mirror::ClassLoader::InstanceSize()); in InitWithoutImage()
669 mirror::Throwable::SetClass(GetClassRoot(kJavaLangThrowable)); in InitWithoutImage()
675 mirror::StackTraceElement::SetClass(GetClassRoot(kJavaLangStackTraceElement)); in InitWithoutImage()
686 mirror::Class* resolved_type = ResolveType(dex_file, void_type_idx, java_lang_Object.Get()); in InitWithoutImage()
708 mirror::Class* java_lang_ref_Reference = GetClassRoot(kJavaLangRefReference); in FinishInit()
709 mirror::Class* java_lang_ref_FinalizerReference = in FinishInit()
735 mirror::Class* klass = GetClassRoot(class_root); in FinishInit()
754 mirror::Class* c = GetClassRoot(ClassRoot(i)); in RunRootClinits()
757 Handle<mirror::Class> h_class(hs.NewHandle(GetClassRoot(ClassRoot(i)))); in RunRootClinits()
765 mirror::Class* expected_class, in SanityCheckArtMethod()
769 mirror::Class* declaring_class = m->GetDeclaringClassUnchecked(); in SanityCheckArtMethod()
792 static void SanityCheckArtMethodPointerArray(mirror::PointerArray* arr, in SanityCheckArtMethodPointerArray()
793 mirror::Class* expected_class, in SanityCheckArtMethodPointerArray()
829 ArtMethod* method = mirror::DexCache::GetElementPtrSize(arr, j, pointer_size); in SanityCheckArtMethodPointerArray()
837 static void SanityCheckObjectsCallback(mirror::Object* obj, void* arg ATTRIBUTE_UNUSED) in SanityCheckObjectsCallback()
861 for (size_t i = 0; i < mirror::Class::kImtSize; ++i) { in SanityCheckObjectsCallback()
913 static void CheckTrampolines(mirror::Object* obj, void* arg) NO_THREAD_SAFETY_ANALYSIS { in CheckTrampolines()
915 mirror::Class* klass = obj->AsClass(); in CheckTrampolines()
1007 class_roots_ = GcRoot<mirror::ObjectArray<mirror::Class>>( in InitFromBootImage()
1008 down_cast<mirror::ObjectArray<mirror::Class>*>( in InitFromBootImage()
1010 mirror::Class::SetClassClass(class_roots_.Read()->Get(kJavaLangClass)); in InitFromBootImage()
1014 mirror::String::SetClass(GetClassRoot(kJavaLangString)); in InitFromBootImage()
1016 mirror::Class* java_lang_Object = GetClassRoot(kJavaLangObject); in InitFromBootImage()
1017 java_lang_Object->SetObjectSize(sizeof(mirror::Object)); in InitFromBootImage()
1024 array_iftable_ = GcRoot<mirror::IfTable>(GetClassRoot(kObjectArrayClass)->GetIfTable()); in InitFromBootImage()
1027 mirror::Field::SetClass(GetClassRoot(kJavaLangReflectField)); in InitFromBootImage()
1028 mirror::Field::SetArrayClass(GetClassRoot(kJavaLangReflectFieldArrayClass)); in InitFromBootImage()
1029 mirror::Constructor::SetClass(GetClassRoot(kJavaLangReflectConstructor)); in InitFromBootImage()
1030 mirror::Constructor::SetArrayClass(GetClassRoot(kJavaLangReflectConstructorArrayClass)); in InitFromBootImage()
1031 mirror::Method::SetClass(GetClassRoot(kJavaLangReflectMethod)); in InitFromBootImage()
1032 mirror::Method::SetArrayClass(GetClassRoot(kJavaLangReflectMethodArrayClass)); in InitFromBootImage()
1033 mirror::Reference::SetClass(GetClassRoot(kJavaLangRefReference)); in InitFromBootImage()
1034 mirror::BooleanArray::SetArrayClass(GetClassRoot(kBooleanArrayClass)); in InitFromBootImage()
1035 mirror::ByteArray::SetArrayClass(GetClassRoot(kByteArrayClass)); in InitFromBootImage()
1036 mirror::CharArray::SetArrayClass(GetClassRoot(kCharArrayClass)); in InitFromBootImage()
1037 mirror::DoubleArray::SetArrayClass(GetClassRoot(kDoubleArrayClass)); in InitFromBootImage()
1038 mirror::FloatArray::SetArrayClass(GetClassRoot(kFloatArrayClass)); in InitFromBootImage()
1039 mirror::IntArray::SetArrayClass(GetClassRoot(kIntArrayClass)); in InitFromBootImage()
1040 mirror::LongArray::SetArrayClass(GetClassRoot(kLongArrayClass)); in InitFromBootImage()
1041 mirror::ShortArray::SetArrayClass(GetClassRoot(kShortArrayClass)); in InitFromBootImage()
1042 mirror::Throwable::SetClass(GetClassRoot(kJavaLangThrowable)); in InitFromBootImage()
1043 mirror::StackTraceElement::SetClass(GetClassRoot(kJavaLangStackTraceElement)); in InitFromBootImage()
1049 ScopedNullHandle<mirror::ClassLoader>(), in InitFromBootImage()
1068 mirror::ClassLoader* class_loader) { in IsBootClassLoader()
1071 soa.Decode<mirror::Class*>(WellKnownClasses::java_lang_BootClassLoader); in IsBootClassLoader()
1074 static mirror::String* GetDexPathListElementName(ScopedObjectAccessUnchecked& soa, in GetDexPathListElementName()
1075 mirror::Object* element) in GetDexPathListElementName()
1085 mirror::Object* dex_file = dex_file_field->GetObject(element); in GetDexPathListElementName()
1089 mirror::Object* const name_object = dex_file_name_field->GetObject(dex_file); in GetDexPathListElementName()
1096 static bool FlattenPathClassLoader(mirror::ClassLoader* class_loader, in FlattenPathClassLoader()
1097 std::list<mirror::String*>* out_dex_file_names, in FlattenPathClassLoader()
1111 soa.Decode<mirror::Class*>(WellKnownClasses::dalvik_system_PathClassLoader)) { in FlattenPathClassLoader()
1116 mirror::Object* dex_path_list = dex_path_list_field->GetObject(class_loader); in FlattenPathClassLoader()
1119 mirror::Object* dex_elements_obj = dex_elements_field->GetObject(dex_path_list); in FlattenPathClassLoader()
1123 mirror::ObjectArray<mirror::Object>* dex_elements = in FlattenPathClassLoader()
1124 dex_elements_obj->AsObjectArray<mirror::Object>(); in FlattenPathClassLoader()
1127 mirror::Object* const element = dex_elements->GetWithoutChecks(i); in FlattenPathClassLoader()
1132 mirror::String* const name = GetDexPathListElementName(soa, element); in FlattenPathClassLoader()
1151 GcRoot<mirror::Class>* resolved_types = method->GetDexCacheResolvedTypes(sizeof(void*)); in Visit()
1165 method->SetDexCacheResolvedTypes(*reinterpret_cast<GcRoot<mirror::Class>**>(resolved_types), in Visit()
1198 mirror::Class* klass = method->GetDeclaringClass(); in Visit()
1215 mirror::Class* klass = method->GetDeclaringClassUnchecked(); in Visit()
1227 Handle<mirror::ClassLoader> class_loader, in UpdateAppImageClassLoadersAndDexCaches()
1228 Handle<mirror::ObjectArray<mirror::DexCache>> dex_caches, in UpdateAppImageClassLoadersAndDexCaches()
1247 mirror::DexCache* const dex_cache = dex_caches->Get(i); in UpdateAppImageClassLoadersAndDexCaches()
1268 mirror::DexCache* const dex_cache = dex_caches->Get(i); in UpdateAppImageClassLoadersAndDexCaches()
1288 GcRoot<mirror::String>* const image_resolved_strings = dex_cache->GetStrings(); in UpdateAppImageClassLoadersAndDexCaches()
1289 GcRoot<mirror::String>* const strings = in UpdateAppImageClassLoadersAndDexCaches()
1290 reinterpret_cast<GcRoot<mirror::String>*>(raw_arrays + layout.StringsOffset()); in UpdateAppImageClassLoadersAndDexCaches()
1298 GcRoot<mirror::Class>* const image_resolved_types = dex_cache->GetResolvedTypes(); in UpdateAppImageClassLoadersAndDexCaches()
1299 GcRoot<mirror::Class>* const types = in UpdateAppImageClassLoadersAndDexCaches()
1300 reinterpret_cast<GcRoot<mirror::Class>*>(raw_arrays + layout.TypesOffset()); in UpdateAppImageClassLoadersAndDexCaches()
1308 *reinterpret_cast<GcRoot<mirror::Class>**>(image_resolved_types) = types; in UpdateAppImageClassLoadersAndDexCaches()
1338 mirror::DexCache* existing_dex_cache = FindDexCacheLocked(self, in UpdateAppImageClassLoadersAndDexCaches()
1345 GcRoot<mirror::Class>* const types = dex_cache->GetResolvedTypes(); in UpdateAppImageClassLoadersAndDexCaches()
1350 mirror::Class* klass = types[j].Read(); in UpdateAppImageClassLoadersAndDexCaches()
1353 DCHECK_NE(klass->GetStatus(), mirror::Class::kStatusError); in UpdateAppImageClassLoadersAndDexCaches()
1367 mirror::Class* existing = table->LookupByDescriptor(klass); in UpdateAppImageClassLoadersAndDexCaches()
1400 mirror::Class* klass = types[j].Read(); in UpdateAppImageClassLoadersAndDexCaches()
1402 DCHECK_NE(klass->GetStatus(), mirror::Class::kStatusError); in UpdateAppImageClassLoadersAndDexCaches()
1405 auto it = new_class_set->Find(GcRoot<mirror::Class>(klass)); in UpdateAppImageClassLoadersAndDexCaches()
1408 mirror::Class* super_class = klass->GetSuperClass(); in UpdateAppImageClassLoadersAndDexCaches()
1410 auto it2 = new_class_set->Find(GcRoot<mirror::Class>(super_class)); in UpdateAppImageClassLoadersAndDexCaches()
1416 mirror::Class* super_class = klass->GetSuperClass(); in UpdateAppImageClassLoadersAndDexCaches()
1469 mirror::ClassLoader* class_loader, in UpdateClassLoaderAndResolvedStringsVisitor()
1475 bool operator()(mirror::Class* klass) const SHARED_REQUIRES(Locks::mutator_lock_) { in operator ()()
1477 GcRoot<mirror::String>* strings = klass->GetDexCacheStrings(); in operator ()()
1484 GcRoot<mirror::String>* new_strings = klass->GetDexCache()->GetStrings(); in operator ()()
1495 mirror::ClassLoader* const class_loader_;
1537 mirror::Object* dex_caches_object = header.GetImageRoot(ImageHeader::kDexCaches); in OpenImageDexFiles()
1539 mirror::ObjectArray<mirror::DexCache>* dex_caches = in OpenImageDexFiles()
1540 dex_caches_object->AsObjectArray<mirror::DexCache>(); in OpenImageDexFiles()
1543 mirror::DexCache* dex_cache = dex_caches->Get(i); in OpenImageDexFiles()
1559 Handle<mirror::ClassLoader> class_loader, in AddImageSpace()
1569 mirror::Object* dex_caches_object = header.GetImageRoot(ImageHeader::kDexCaches); in AddImageSpace()
1575 Handle<mirror::ObjectArray<mirror::DexCache>> dex_caches( in AddImageSpace()
1576 hs.NewHandle(dex_caches_object->AsObjectArray<mirror::DexCache>())); in AddImageSpace()
1577 Handle<mirror::ObjectArray<mirror::Class>> class_roots(hs.NewHandle( in AddImageSpace()
1578 header.GetImageRoot(ImageHeader::kClassRoots)->AsObjectArray<mirror::Class>())); in AddImageSpace()
1580 std::unordered_set<mirror::ClassLoader*> image_class_loaders; in AddImageSpace()
1610 MutableHandle<mirror::DexCache> h_dex_cache(hs2.NewHandle<mirror::DexCache>(nullptr)); in AddImageSpace()
1636 GcRoot<mirror::Class>* const types = h_dex_cache->GetResolvedTypes(); in AddImageSpace()
1638 mirror::Class* klass = types[j].Read(); in AddImageSpace()
1640 DCHECK_NE(klass->GetStatus(), mirror::Class::kStatusError); in AddImageSpace()
1641 mirror::ClassLoader* image_class_loader = klass->GetClassLoader(); in AddImageSpace()
1668 for (mirror::ClassLoader* image_class_loader : image_class_loaders) { in AddImageSpace()
1673 std::list<mirror::String*> image_dex_file_names; in AddImageSpace()
1680 std::list<mirror::String*> loader_dex_file_names; in AddImageSpace()
1687 auto* elements = soa.Decode<mirror::ObjectArray<mirror::Object>*>(dex_elements); in AddImageSpace()
1689 mirror::Object* element = elements->GetWithoutChecks(i); in AddImageSpace()
1710 for (mirror::String* name : image_dex_file_names) { in AddImageSpace()
1714 for (mirror::String* name : loader_dex_file_names) { in AddImageSpace()
1782 for (GcRoot<mirror::Class>& root : temp_set) { in AddImageSpace()
1817 bool ClassLinker::ClassInClassTable(mirror::Class* klass) { in ClassInClassTable()
1851 GcRoot<mirror::Object> root(GcRoot<mirror::Object>(self->DecodeJObject(data.weak_root))); in VisitClassRoots()
1857 mirror::Class* old_ref = root.Read<kWithoutReadBarrier>(); in VisitClassRoots()
1859 mirror::Class* new_ref = root.Read<kWithoutReadBarrier>(); in VisitClassRoots()
1895 void Visit(mirror::ClassLoader* class_loader) in Visit()
1934 bool operator()(mirror::Class* klass) OVERRIDE { in operator ()()
1938 std::vector<mirror::Class*> classes_;
1943 explicit GetClassInToObjectArray(mirror::ObjectArray<mirror::Class>* arr) in GetClassInToObjectArray()
1946 bool operator()(mirror::Class* klass) OVERRIDE SHARED_REQUIRES(Locks::mutator_lock_) { in operator ()()
1960 mirror::ObjectArray<mirror::Class>* const arr_;
1972 for (mirror::Class* klass : accumulator.classes_) { in VisitClassesWithoutClassesLock()
1979 auto classes = hs.NewHandle<mirror::ObjectArray<mirror::Class>>(nullptr); in VisitClassesWithoutClassesLock()
1989 mirror::Class* class_type = mirror::Class::GetJavaLangClass(); in VisitClassesWithoutClassesLock()
1990 mirror::Class* array_of_class = FindArrayClass(self, &class_type); in VisitClassesWithoutClassesLock()
1992 mirror::ObjectArray<mirror::Class>::Alloc(self, array_of_class, class_table_size)); in VisitClassesWithoutClassesLock()
2004 mirror::Class* klass = classes->Get(i); in VisitClassesWithoutClassesLock()
2013 mirror::Class::ResetClass(); in ~ClassLinker()
2014 mirror::Constructor::ResetClass(); in ~ClassLinker()
2015 mirror::Field::ResetClass(); in ~ClassLinker()
2016 mirror::Method::ResetClass(); in ~ClassLinker()
2017 mirror::Reference::ResetClass(); in ~ClassLinker()
2018 mirror::StackTraceElement::ResetClass(); in ~ClassLinker()
2019 mirror::String::ResetClass(); in ~ClassLinker()
2020 mirror::Throwable::ResetClass(); in ~ClassLinker()
2021 mirror::BooleanArray::ResetArrayClass(); in ~ClassLinker()
2022 mirror::ByteArray::ResetArrayClass(); in ~ClassLinker()
2023 mirror::CharArray::ResetArrayClass(); in ~ClassLinker()
2024 mirror::Constructor::ResetArrayClass(); in ~ClassLinker()
2025 mirror::DoubleArray::ResetArrayClass(); in ~ClassLinker()
2026 mirror::Field::ResetArrayClass(); in ~ClassLinker()
2027 mirror::FloatArray::ResetArrayClass(); in ~ClassLinker()
2028 mirror::Method::ResetArrayClass(); in ~ClassLinker()
2029 mirror::IntArray::ResetArrayClass(); in ~ClassLinker()
2030 mirror::LongArray::ResetArrayClass(); in ~ClassLinker()
2031 mirror::ShortArray::ResetArrayClass(); in ~ClassLinker()
2054 mirror::PointerArray* ClassLinker::AllocPointerArray(Thread* self, size_t length) { in AllocPointerArray()
2055 return down_cast<mirror::PointerArray*>(image_pointer_size_ == 8u ? in AllocPointerArray()
2056 static_cast<mirror::Array*>(mirror::LongArray::Alloc(self, length)) : in AllocPointerArray()
2057 static_cast<mirror::Array*>(mirror::IntArray::Alloc(self, length))); in AllocPointerArray()
2060 mirror::DexCache* ClassLinker::AllocDexCache(Thread* self, in AllocDexCache()
2064 auto dex_cache(hs.NewHandle(down_cast<mirror::DexCache*>( in AllocDexCache()
2087 GcRoot<mirror::String>* strings = (dex_file.NumStringIds() == 0u) ? nullptr : in AllocDexCache()
2088 reinterpret_cast<GcRoot<mirror::String>*>(raw_arrays + layout.StringsOffset()); in AllocDexCache()
2089 GcRoot<mirror::Class>* types = (dex_file.NumTypeIds() == 0u) ? nullptr : in AllocDexCache()
2090 reinterpret_cast<GcRoot<mirror::Class>*>(raw_arrays + layout.TypesOffset()); in AllocDexCache()
2104 CHECK(mirror::DexCache::GetElementPtrSize(methods, i, image_pointer_size_) == nullptr); in AllocDexCache()
2107 CHECK(mirror::DexCache::GetElementPtrSize(fields, i, image_pointer_size_) == nullptr); in AllocDexCache()
2124 mirror::Class* ClassLinker::AllocClass(Thread* self, mirror::Class* java_lang_Class, in AllocClass()
2126 DCHECK_GE(class_size, sizeof(mirror::Class)); in AllocClass()
2128 mirror::Class::InitializeClassVisitor visitor(class_size); in AllocClass()
2129 mirror::Object* k = kMovingClasses ? in AllocClass()
2139 mirror::Class* ClassLinker::AllocClass(Thread* self, uint32_t class_size) { in AllocClass()
2143 mirror::ObjectArray<mirror::StackTraceElement>* ClassLinker::AllocStackTraceElementArray( in AllocStackTraceElementArray()
2146 return mirror::ObjectArray<mirror::StackTraceElement>::Alloc( in AllocStackTraceElementArray()
2150 mirror::Class* ClassLinker::EnsureResolved(Thread* self, in EnsureResolved()
2152 mirror::Class* klass) { in EnsureResolved()
2163 Handle<mirror::Class> h_class(hs.NewHandle(klass)); in EnsureResolved()
2164 ObjectLock<mirror::Class> lock(self, h_class); in EnsureResolved()
2182 HandleWrapper<mirror::Class> h_class(hs.NewHandleWrapper(&klass)); in EnsureResolved()
2183 ObjectLock<mirror::Class> lock(self, h_class); in EnsureResolved()
2187 mirror::Class::SetStatus(h_class, mirror::Class::kStatusError, self); in EnsureResolved()
2224 Handle<mirror::ClassLoader> class_loader, in FindClassInPathClassLoader()
2225 mirror::Class** result) { in FindClassInPathClassLoader()
2231 mirror::Class* klass = LookupClass(self, descriptor, hash, nullptr); in FindClassInPathClassLoader()
2238 ScopedNullHandle<mirror::ClassLoader>(), in FindClassInPathClassLoader()
2254 soa.Decode<mirror::Class*>(WellKnownClasses::dalvik_system_PathClassLoader)) { in FindClassInPathClassLoader()
2261 Handle<mirror::ClassLoader> h_parent(hs.NewHandle(class_loader->GetParent())); in FindClassInPathClassLoader()
2281 mirror::Object* dex_path_list = in FindClassInPathClassLoader()
2286 mirror::Object* dex_elements_obj = in FindClassInPathClassLoader()
2292 Handle<mirror::ObjectArray<mirror::Object>> dex_elements = in FindClassInPathClassLoader()
2293 hs.NewHandle(dex_elements_obj->AsObjectArray<mirror::Object>()); in FindClassInPathClassLoader()
2295 mirror::Object* element = dex_elements->GetWithoutChecks(i); in FindClassInPathClassLoader()
2300 mirror::Object* dex_file = dex_file_field->GetObject(element); in FindClassInPathClassLoader()
2302 mirror::LongArray* long_array = cookie_field->GetObject(dex_file)->AsLongArray(); in FindClassInPathClassLoader()
2315 mirror::Class* klass = DefineClass(self, in FindClassInPathClassLoader()
2341 mirror::Class* ClassLinker::FindClass(Thread* self, in FindClass()
2343 Handle<mirror::ClassLoader> class_loader) { in FindClass()
2354 mirror::Class* klass = LookupClass(self, descriptor, hash, class_loader.Get()); in FindClass()
2368 ScopedNullHandle<mirror::ClassLoader>(), in FindClass()
2375 mirror::Throwable* pre_allocated = Runtime::Current()->GetPreAllocatedNoClassDefFoundError(); in FindClass()
2381 mirror::Class* cp_klass; in FindClass()
2397 mirror::Throwable* pre_allocated = Runtime::Current()->GetPreAllocatedNoClassDefFoundError(); in FindClass()
2429 return soa.Decode<mirror::Class*>(result.get()); in FindClass()
2435 mirror::Class* ClassLinker::DefineClass(Thread* self, in DefineClass()
2438 Handle<mirror::ClassLoader> class_loader, in DefineClass()
2442 auto klass = hs.NewHandle<mirror::Class>(nullptr); in DefineClass()
2471 mirror::DexCache* dex_cache = RegisterDexFile(dex_file, class_loader.Get()); in DefineClass()
2486 ObjectLock<mirror::Class> lock(self, klass); in DefineClass()
2490 mirror::Class* existing = InsertClass(descriptor, klass.Get(), hash); in DefineClass()
2507 mirror::Class::SetStatus(klass, mirror::Class::kStatusError, self); in DefineClass()
2517 mirror::Class::SetStatus(klass, mirror::Class::kStatusError, self); in DefineClass()
2525 auto interfaces = hs.NewHandle<mirror::ObjectArray<mirror::Class>>(nullptr); in DefineClass()
2527 MutableHandle<mirror::Class> h_new_class = hs.NewHandle<mirror::Class>(nullptr); in DefineClass()
2531 mirror::Class::SetStatus(klass, mirror::Class::kStatusError, self); in DefineClass()
2620 return mirror::Class::ComputeClassSize(false, in SizeOfClassWithoutEmbeddedTables()
2681 mirror::Class* declaring_class = method->GetDeclaringClass(); in FindOatMethodFor()
2791 void ClassLinker::FixupStaticTrampolines(mirror::Class* klass) { in FixupStaticTrampolines()
2905 Handle<mirror::Class> klass, in SetupClass()
2906 mirror::ClassLoader* class_loader) { in SetupClass()
2909 CHECK_EQ(mirror::Class::kStatusNotReady, klass->GetStatus()); in SetupClass()
2919 mirror::Class::SetStatus(klass, mirror::Class::kStatusIdx, nullptr); in SetupClass()
2929 Handle<mirror::Class> klass) { in LoadClass()
2982 LinearAlloc* ClassLinker::GetAllocatorForClassLoader(mirror::ClassLoader* class_loader) { in GetAllocatorForClassLoader()
2991 LinearAlloc* ClassLinker::GetOrCreateAllocatorForClassLoader(mirror::ClassLoader* class_loader) { in GetOrCreateAllocatorForClassLoader()
3008 Handle<mirror::Class> klass, in LoadClassMembers()
3107 Handle<mirror::Class> klass, in LoadField()
3118 Handle<mirror::Class> klass, in LoadMethod()
3173 Handle<mirror::DexCache> dex_cache(hs.NewHandle(AllocDexCache( in AppendToBootClassPath()
3183 Handle<mirror::DexCache> dex_cache) { in AppendToBootClassPath()
3190 Handle<mirror::DexCache> dex_cache) { in RegisterDexFileLocked()
3230 mirror::DexCache* ClassLinker::RegisterDexFile(const DexFile& dex_file, in RegisterDexFile()
3231 mirror::ClassLoader* class_loader) { in RegisterDexFile()
3235 mirror::DexCache* dex_cache = FindDexCacheLocked(self, dex_file, true); in RegisterDexFile()
3251 Handle<mirror::DexCache> h_dex_cache(hs.NewHandle(AllocDexCache(self, dex_file, linear_alloc))); in RegisterDexFile()
3254 mirror::DexCache* dex_cache = FindDexCacheLocked(self, dex_file, true); in RegisterDexFile()
3269 Handle<mirror::DexCache> dex_cache) { in RegisterDexFile()
3274 mirror::DexCache* ClassLinker::FindDexCache(Thread* self, in FindDexCache()
3281 mirror::DexCache* ClassLinker::FindDexCacheLocked(Thread* self, in FindDexCacheLocked()
3288 mirror::DexCache* dex_cache = in FindDexCacheLocked()
3289 down_cast<mirror::DexCache*>(self->DecodeJObject(data.weak_root)); in FindDexCacheLocked()
3303 mirror::DexCache* dex_cache = down_cast<mirror::DexCache*>(self->DecodeJObject(data.weak_root)); in FindDexCacheLocked()
3317 mirror::DexCache* dex_cache = down_cast<mirror::DexCache*>( in FixupDexCaches()
3326 mirror::Class* ClassLinker::CreatePrimitiveClass(Thread* self, Primitive::Type type) { in CreatePrimitiveClass()
3327 mirror::Class* klass = AllocClass(self, mirror::Class::PrimitiveClassSize(image_pointer_size_)); in CreatePrimitiveClass()
3335 mirror::Class* ClassLinker::InitializePrimitiveClass(mirror::Class* primitive_class, in InitializePrimitiveClass()
3341 Handle<mirror::Class> h_class(hs.NewHandle(primitive_class)); in InitializePrimitiveClass()
3342 ObjectLock<mirror::Class> lock(self, h_class); in InitializePrimitiveClass()
3345 mirror::Class::SetStatus(h_class, mirror::Class::kStatusInitialized, self); in InitializePrimitiveClass()
3347 mirror::Class* existing = InsertClass(descriptor, h_class.Get(), in InitializePrimitiveClass()
3366 mirror::Class* ClassLinker::CreateArrayClass(Thread* self, const char* descriptor, size_t hash, in CreateArrayClass()
3367 Handle<mirror::ClassLoader> class_loader) { in CreateArrayClass()
3371 MutableHandle<mirror::Class> component_type(hs.NewHandle(FindClass(self, descriptor + 1, in CreateArrayClass()
3407 … mirror::Class* new_class = LookupClass(self, descriptor, hash, component_type->GetClassLoader()); in CreateArrayClass()
3421 auto new_class = hs.NewHandle<mirror::Class>(nullptr); in CreateArrayClass()
3439 new_class.Assign(AllocClass(self, mirror::Array::ClassSize(image_pointer_size_))); in CreateArrayClass()
3446 ObjectLock<mirror::Class> lock(self, new_class); // Must hold lock on object when initializing. in CreateArrayClass()
3448 mirror::Class* java_lang_Object = GetClassRoot(kJavaLangObject); in CreateArrayClass()
3454 new_class->SetClassFlags(mirror::kClassFlagNoReferenceFields); in CreateArrayClass()
3456 new_class->SetClassFlags(mirror::kClassFlagObjectArray); in CreateArrayClass()
3458 mirror::Class::SetStatus(new_class, mirror::Class::kStatusLoaded, self); in CreateArrayClass()
3460 ArtMethod* imt[mirror::Class::kImtSize]; in CreateArrayClass()
3464 mirror::Class::SetStatus(new_class, mirror::Class::kStatusInitialized, self); in CreateArrayClass()
3482 mirror::IfTable* array_iftable = array_iftable_.Read(); in CreateArrayClass()
3498 mirror::Class* existing = InsertClass(descriptor, new_class.Get(), hash); in CreateArrayClass()
3512 mirror::Class* ClassLinker::FindPrimitiveClass(char type) { in FindPrimitiveClass()
3540 mirror::Class* ClassLinker::InsertClass(const char* descriptor, mirror::Class* klass, size_t hash) { in InsertClass()
3542 mirror::DexCache* dex_cache = klass->GetDexCache(); in InsertClass()
3551 mirror::ClassLoader* const class_loader = klass->GetClassLoader(); in InsertClass()
3553 mirror::Class* existing = class_table->Lookup(descriptor, hash); in InsertClass()
3575 new_class_roots_.push_back(GcRoot<mirror::Class>(klass)); in InsertClass()
3581 void ClassLinker::UpdateClassMethods(mirror::Class* klass, in UpdateClassMethods()
3590 bool ClassLinker::RemoveClass(const char* descriptor, mirror::ClassLoader* class_loader) { in RemoveClass()
3596 mirror::Class* ClassLinker::LookupClass(Thread* self, in LookupClass()
3599 mirror::ClassLoader* class_loader) { in LookupClass()
3604 mirror::Class* result = class_table->Lookup(descriptor, hash); in LookupClass()
3614 mirror::Class* result = LookupClassFromBootImage(descriptor); in LookupClass()
3629 static std::vector<mirror::ObjectArray<mirror::DexCache>*> GetImageDexCaches( in GetImageDexCaches()
3632 std::vector<mirror::ObjectArray<mirror::DexCache>*> dex_caches_vector; in GetImageDexCaches()
3634 mirror::Object* root = image_space->GetImageHeader().GetImageRoot(ImageHeader::kDexCaches); in GetImageDexCaches()
3636 dex_caches_vector.push_back(root->AsObjectArray<mirror::DexCache>()); in GetImageDexCaches()
3650 mirror::ClassLoader* class_loader) { in AddImageClassesToClassTable()
3658 std::vector<mirror::ObjectArray<mirror::DexCache>*> dex_caches_vector = in AddImageClassesToClassTable()
3660 for (mirror::ObjectArray<mirror::DexCache>* dex_caches : dex_caches_vector) { in AddImageClassesToClassTable()
3662 mirror::DexCache* dex_cache = dex_caches->Get(i); in AddImageClassesToClassTable()
3663 GcRoot<mirror::Class>* types = dex_cache->GetResolvedTypes(); in AddImageClassesToClassTable()
3665 mirror::Class* klass = types[j].Read(); in AddImageClassesToClassTable()
3670 mirror::Class* existing = class_table->Lookup(descriptor, hash); in AddImageClassesToClassTable()
3677 new_class_roots_.push_back(GcRoot<mirror::Class>(klass)); in AddImageClassesToClassTable()
3690 void Visit(mirror::ClassLoader* class_loader) in Visit()
3707 mirror::Class* ClassLinker::LookupClassFromBootImage(const char* descriptor) { in LookupClassFromBootImage()
3709 std::vector<mirror::ObjectArray<mirror::DexCache>*> dex_caches_vector = in LookupClassFromBootImage()
3711 for (mirror::ObjectArray<mirror::DexCache>* dex_caches : dex_caches_vector) { in LookupClassFromBootImage()
3713 mirror::DexCache* dex_cache = dex_caches->Get(i); in LookupClassFromBootImage()
3719 mirror::Class* klass = dex_cache->GetResolvedType(type_idx); in LookupClassFromBootImage()
3732 LookupClassesVisitor(const char* descriptor, size_t hash, std::vector<mirror::Class*>* result) in LookupClassesVisitor()
3737 void Visit(mirror::ClassLoader* class_loader) in Visit()
3740 mirror::Class* klass = class_table->Lookup(descriptor_, hash_); in Visit()
3749 std::vector<mirror::Class*>* const result_;
3752 void ClassLinker::LookupClasses(const char* descriptor, std::vector<mirror::Class*>& result) { in LookupClasses()
3760 mirror::Class* klass = boot_class_table_.Lookup(descriptor, hash); in LookupClasses()
3769 Handle<mirror::Class> klass, in AttemptSupertypeVerification()
3770 Handle<mirror::Class> supertype) { in AttemptSupertypeVerification()
3789 Handle<mirror::Throwable> cause(hs.NewHandle(self->GetException())); in AttemptSupertypeVerification()
3804 ObjectLock<mirror::Class> super_lock(self, klass); in AttemptSupertypeVerification()
3805 mirror::Class::SetStatus(klass, mirror::Class::kStatusError, self); in AttemptSupertypeVerification()
3809 void ClassLinker::VerifyClass(Thread* self, Handle<mirror::Class> klass, LogSeverity log_level) { in VerifyClass()
3812 ObjectLock<mirror::Class> lock(self, klass); in VerifyClass()
3815 mirror::Class::Status old_status = klass->GetStatus(); in VerifyClass()
3816 while (old_status == mirror::Class::kStatusVerifying || in VerifyClass()
3817 old_status == mirror::Class::kStatusVerifyingAtRuntime) { in VerifyClass()
3841 if (klass->GetStatus() == mirror::Class::kStatusResolved) { in VerifyClass()
3842 mirror::Class::SetStatus(klass, mirror::Class::kStatusVerifying, self); in VerifyClass()
3844 CHECK_EQ(klass->GetStatus(), mirror::Class::kStatusRetryVerificationAtRuntime) in VerifyClass()
3847 mirror::Class::SetStatus(klass, mirror::Class::kStatusVerifyingAtRuntime, self); in VerifyClass()
3852 mirror::Class::SetStatus(klass, mirror::Class::kStatusVerified, self); in VerifyClass()
3860 MutableHandle<mirror::Class> supertype(hs.NewHandle(klass->GetSuperClass())); in VerifyClass()
3880 MutableHandle<mirror::Class> iface(hs.NewHandle<mirror::Class>(nullptr)); in VerifyClass()
3910 mirror::Class::Status oat_file_class_status(mirror::Class::kStatusNotReady); in VerifyClass()
3915 DCHECK(!(oat_file_class_status == mirror::Class::kStatusError) || !preverified); in VerifyClass()
3930 ObjectLock<mirror::Class> lock(self, klass); in VerifyClass()
3945 mirror::Class::SetStatus(klass, mirror::Class::kStatusVerified, self); in VerifyClass()
3947 CHECK_EQ(supertype->GetStatus(), mirror::Class::kStatusRetryVerificationAtRuntime); in VerifyClass()
3948 mirror::Class::SetStatus(klass, mirror::Class::kStatusRetryVerificationAtRuntime, self); in VerifyClass()
3958 mirror::Class::SetStatus(klass, mirror::Class::kStatusRetryVerificationAtRuntime, self); in VerifyClass()
3960 mirror::Class::SetStatus(klass, mirror::Class::kStatusVerified, self); in VerifyClass()
3972 mirror::Class::SetStatus(klass, mirror::Class::kStatusError, self); in VerifyClass()
3992 void ClassLinker::EnsureSkipAccessChecksMethods(Handle<mirror::Class> klass) { in EnsureSkipAccessChecksMethods()
4000 mirror::Class* klass, in VerifyClassUsingOatFile()
4001 mirror::Class::Status& oat_file_class_status) { in VerifyClassUsingOatFile()
4040 if (oat_file_class_status == mirror::Class::kStatusVerified || in VerifyClassUsingOatFile()
4041 oat_file_class_status == mirror::Class::kStatusInitialized) { in VerifyClassUsingOatFile()
4046 if (oat_file_class_status == mirror::Class::kStatusResolved) { in VerifyClassUsingOatFile()
4049 if (oat_file_class_status == mirror::Class::kStatusRetryVerificationAtRuntime) { in VerifyClassUsingOatFile()
4069 if (oat_file_class_status == mirror::Class::kStatusError) { in VerifyClassUsingOatFile()
4074 if (oat_file_class_status == mirror::Class::kStatusNotReady) { in VerifyClassUsingOatFile()
4088 void ClassLinker::ResolveClassExceptionHandlerTypes(Handle<mirror::Class> klass) { in ResolveClassExceptionHandlerTypes()
4112 mirror::Class* exception_type = ResolveType(iterator.GetHandlerTypeIndex(), method); in ResolveMethodExceptionHandlerTypes()
4123 mirror::Class* ClassLinker::CreateProxyClass(ScopedObjectAccessAlreadyRunnable& soa, in CreateProxyClass()
4131 MutableHandle<mirror::Class> klass(hs.NewHandle( in CreateProxyClass()
4132 AllocClass(self, GetClassRoot(kJavaLangClass), sizeof(mirror::Class)))); in CreateProxyClass()
4138 klass->SetObjectSize(sizeof(mirror::Proxy)); in CreateProxyClass()
4142 klass->SetClassLoader(soa.Decode<mirror::ClassLoader*>(loader)); in CreateProxyClass()
4144 klass->SetName(soa.Decode<mirror::String*>(name)); in CreateProxyClass()
4146 mirror::Class::SetStatus(klass, mirror::Class::kStatusIdx, self); in CreateProxyClass()
4157 mirror::Class* existing = InsertClass(descriptor.c_str(), klass.Get(), hash); in CreateProxyClass()
4182 auto h_methods = hs.NewHandle(soa.Decode<mirror::ObjectArray<mirror::Method>*>(methods)); in CreateProxyClass()
4183 DCHECK_EQ(h_methods->GetClass(), mirror::Method::ArrayClass()) in CreateProxyClass()
4214 mirror::Class::SetStatus(klass, mirror::Class::kStatusLoaded, self); in CreateProxyClass()
4217 MutableHandle<mirror::Class> new_class = hs.NewHandle<mirror::Class>(nullptr); in CreateProxyClass()
4220 ObjectLock<mirror::Class> resolution_lock(self, klass); in CreateProxyClass()
4223 Handle<mirror::ObjectArray<mirror::Class>> h_interfaces( in CreateProxyClass()
4224 hs.NewHandle(soa.Decode<mirror::ObjectArray<mirror::Class>*>(interfaces))); in CreateProxyClass()
4226 mirror::Class::SetStatus(klass, mirror::Class::kStatusError, self); in CreateProxyClass()
4236 soa.Decode<mirror::ObjectArray<mirror::Class>*>(interfaces)); in CreateProxyClass()
4239 klass.Get(), soa.Decode<mirror::ObjectArray<mirror::ObjectArray<mirror::Class> >*>(throws)); in CreateProxyClass()
4243 ObjectLock<mirror::Class> initialization_lock(self, klass); in CreateProxyClass()
4244 mirror::Class::SetStatus(klass, mirror::Class::kStatusInitialized, self); in CreateProxyClass()
4259 Handle<mirror::String> decoded_name = hs2.NewHandle(soa.Decode<mirror::String*>(name)); in CreateProxyClass()
4269 soa.Decode<mirror::ObjectArray<mirror::Class>*>(interfaces)); in CreateProxyClass()
4271 soa.Decode<mirror::ObjectArray<mirror::ObjectArray<mirror::Class>>*>(throws)); in CreateProxyClass()
4276 std::string ClassLinker::GetDescriptorForProxy(mirror::Class* proxy_class) { in GetDescriptorForProxy()
4278 mirror::String* name = proxy_class->GetName(); in GetDescriptorForProxy()
4283 ArtMethod* ClassLinker::FindMethodForProxy(mirror::Class* proxy_class, ArtMethod* proxy_method) { in FindMethodForProxy()
4294 mirror::DexCache* dex_cache = down_cast<mirror::DexCache*>( in FindMethodForProxy()
4310 void ClassLinker::CreateProxyConstructor(Handle<mirror::Class> klass, ArtMethod* out) { in CreateProxyConstructor()
4337 void ClassLinker::CreateProxyMethod(Handle<mirror::Class> klass, ArtMethod* prototype, in CreateProxyMethod()
4392 bool ClassLinker::CanWeInitializeClass(mirror::Class* klass, bool can_init_statics, in CanWeInitializeClass()
4416 mirror::Class* iface = klass->GetIfTable()->GetInterface(i); in CanWeInitializeClass()
4427 mirror::Class* super_class = klass->GetSuperClass(); in CanWeInitializeClass()
4434 bool ClassLinker::InitializeClass(Thread* self, Handle<mirror::Class> klass, in InitializeClass()
4453 ObjectLock<mirror::Class> lock(self, klass); in InitializeClass()
4492 CHECK_EQ(klass->GetStatus(), mirror::Class::kStatusRetryVerificationAtRuntime); in InitializeClass()
4502 DCHECK_NE(mirror::Class::kStatusError, klass->GetStatus()); in InitializeClass()
4513 if (klass->GetStatus() == mirror::Class::kStatusInitializing) { in InitializeClass()
4529 mirror::Class::SetStatus(klass, mirror::Class::kStatusError, self); in InitializeClass()
4534 CHECK_EQ(klass->GetStatus(), mirror::Class::kStatusVerified) << PrettyClass(klass.Get()) in InitializeClass()
4540 mirror::Class::SetStatus(klass, mirror::Class::kStatusInitializing, self); in InitializeClass()
4547 mirror::Class* super_class = klass->GetSuperClass(); in InitializeClass()
4552 Handle<mirror::Class> handle_scope_super(hs.NewHandle(super_class)); in InitializeClass()
4563 ObjectLock<mirror::Class> lock(self, klass); in InitializeClass()
4565 mirror::Class::SetStatus(klass, mirror::Class::kStatusError, self); in InitializeClass()
4577 MutableHandle<mirror::Class> handle_scope_iface(hs_iface.NewHandle<mirror::Class>(nullptr)); in InitializeClass()
4579 handle_scope_iface.Assign(mirror::Class::GetDirectInterface(self, klass, i)); in InitializeClass()
4594 ObjectLock<mirror::Class> lock(self, klass); in InitializeClass()
4596 mirror::Class::SetStatus(klass, mirror::Class::kStatusError, self); in InitializeClass()
4609 Handle<mirror::ClassLoader> class_loader(hs.NewHandle(klass->GetClassLoader())); in InitializeClass()
4610 Handle<mirror::DexCache> dex_cache(hs.NewHandle(klass->GetDexCache())); in InitializeClass()
4657 ObjectLock<mirror::Class> lock(self, klass); in InitializeClass()
4661 mirror::Class::SetStatus(klass, mirror::Class::kStatusError, self); in InitializeClass()
4669 mirror::Class::SetStatus(klass, mirror::Class::kStatusError, self); in InitializeClass()
4679 mirror::Class::SetStatus(klass, mirror::Class::kStatusInitialized, self); in InitializeClass()
4695 Handle<mirror::Class> iface, in InitializeDefaultInterfaceRecursive()
4703 MutableHandle<mirror::Class> handle_super_iface(hs.NewHandle<mirror::Class>(nullptr)); in InitializeDefaultInterfaceRecursive()
4706 mirror::Class* super_iface = mirror::Class::GetDirectInterface(self, iface, i); in InitializeDefaultInterfaceRecursive()
4732 ObjectLock<mirror::Class> lock(self, iface); in InitializeDefaultInterfaceRecursive()
4738 bool ClassLinker::WaitForInitializeClass(Handle<mirror::Class> klass, in WaitForInitializeClass()
4740 ObjectLock<mirror::Class>& lock) in WaitForInitializeClass()
4752 mirror::Class::SetStatus(klass, mirror::Class::kStatusError, self); in WaitForInitializeClass()
4756 if (klass->GetStatus() == mirror::Class::kStatusInitializing) { in WaitForInitializeClass()
4759 if (klass->GetStatus() == mirror::Class::kStatusVerified && in WaitForInitializeClass()
4781 static void ThrowSignatureCheckResolveReturnTypeException(Handle<mirror::Class> klass, in ThrowSignatureCheckResolveReturnTypeException()
4782 Handle<mirror::Class> super_klass, in ThrowSignatureCheckResolveReturnTypeException()
4804 static void ThrowSignatureCheckResolveArgException(Handle<mirror::Class> klass, in ThrowSignatureCheckResolveArgException()
4805 Handle<mirror::Class> super_klass, in ThrowSignatureCheckResolveArgException()
4826 static void ThrowSignatureMismatch(Handle<mirror::Class> klass, in ThrowSignatureMismatch()
4827 Handle<mirror::Class> super_klass, in ThrowSignatureMismatch()
4842 Handle<mirror::Class> klass, in HasSameSignatureWithDifferentClassLoaders()
4843 Handle<mirror::Class> super_klass, in HasSameSignatureWithDifferentClassLoaders()
4849 Handle<mirror::Class> return_type(hs.NewHandle(method1->GetReturnType(true /* resolve */, in HasSameSignatureWithDifferentClassLoaders()
4855 mirror::Class* other_return_type = method2->GetReturnType(true /* resolve */, in HasSameSignatureWithDifferentClassLoaders()
4900 Handle<mirror::Class> param_type(hs.NewHandle( in HasSameSignatureWithDifferentClassLoaders()
4908 mirror::Class* other_param_type = in HasSameSignatureWithDifferentClassLoaders()
4930 bool ClassLinker::ValidateSuperClassDescriptors(Handle<mirror::Class> klass) { in ValidateSuperClassDescriptors()
4937 MutableHandle<mirror::Class> super_klass(hs.NewHandle<mirror::Class>(nullptr)); in ValidateSuperClassDescriptors()
4976 bool ClassLinker::EnsureInitialized(Thread* self, Handle<mirror::Class> c, bool can_init_fields, in EnsureInitialized()
4994 void ClassLinker::FixupTemporaryDeclaringClass(mirror::Class* temp_class, in FixupTemporaryDeclaringClass()
4995 mirror::Class* new_class) { in FixupTemporaryDeclaringClass()
5023 void ClassLinker::RegisterClassLoader(mirror::ClassLoader* class_loader) { in RegisterClassLoader()
5039 ClassTable* ClassLinker::InsertClassTableForClassLoader(mirror::ClassLoader* class_loader) { in InsertClassTableForClassLoader()
5052 ClassTable* ClassLinker::ClassTableForClassLoader(mirror::ClassLoader* class_loader) { in ClassTableForClassLoader()
5058 Handle<mirror::Class> klass, in LinkClass()
5059 Handle<mirror::ObjectArray<mirror::Class>> interfaces, in LinkClass()
5060 MutableHandle<mirror::Class>* h_new_class_out) { in LinkClass()
5061 CHECK_EQ(mirror::Class::kStatusLoaded, klass->GetStatus()); in LinkClass()
5066 ArtMethod* imt[mirror::Class::kImtSize]; in LinkClass()
5079 CHECK_EQ(mirror::Class::kStatusLoaded, klass->GetStatus()); in LinkClass()
5092 mirror::Class::SetStatus(klass, mirror::Class::kStatusResolved, self); in LinkClass()
5108 mirror::Class::SetStatus(klass, mirror::Class::kStatusError, self); in LinkClass()
5113 ObjectLock<mirror::Class> lock(self, h_new_class); in LinkClass()
5118 mirror::ClassLoader* const class_loader = h_new_class.Get()->GetClassLoader(); in LinkClass()
5120 mirror::Class* existing = table->UpdateClass(descriptor, h_new_class.Get(), in LinkClass()
5131 mirror::Class* const image_class = LookupClassFromBootImage(descriptor); in LinkClass()
5137 new_class_roots_.push_back(GcRoot<mirror::Class>(h_new_class.Get())); in LinkClass()
5143 mirror::Class::SetStatus(klass, mirror::Class::kStatusRetired, self); in LinkClass()
5145 CHECK_EQ(h_new_class->GetStatus(), mirror::Class::kStatusResolving); in LinkClass()
5148 mirror::Class::SetStatus(h_new_class, mirror::Class::kStatusResolved, self); in LinkClass()
5286 static bool CheckSuperClassChange(Handle<mirror::Class> klass, in CheckSuperClassChange()
5289 mirror::Class* super_class) in CheckSuperClassChange()
5348 bool ClassLinker::LoadSuperAndInterfaces(Handle<mirror::Class> klass, const DexFile& dex_file) { in LoadSuperAndInterfaces()
5349 CHECK_EQ(mirror::Class::kStatusIdx, klass->GetStatus()); in LoadSuperAndInterfaces()
5366 mirror::Class* super_class = ResolveType(dex_file, super_class_idx, klass.Get()); in LoadSuperAndInterfaces()
5390 mirror::Class* interface = ResolveType(dex_file, idx, klass.Get()); in LoadSuperAndInterfaces()
5407 mirror::Class::SetStatus(klass, mirror::Class::kStatusLoaded, nullptr); in LoadSuperAndInterfaces()
5411 bool ClassLinker::LinkSuperClass(Handle<mirror::Class> klass) { in LinkSuperClass()
5413 mirror::Class* super = klass->GetSuperClass(); in LinkSuperClass()
5454 uint32_t reference_flags = (super->GetClassFlags() & mirror::kClassFlagReference); in LinkSuperClass()
5479 Handle<mirror::Class> klass, in LinkMethods()
5480 Handle<mirror::ObjectArray<mirror::Class>> interfaces, in LinkMethods()
5545 LinkVirtualHashTable(Handle<mirror::Class> klass, in LinkVirtualHashTable()
5607 Handle<mirror::Class> klass_;
5618 Handle<mirror::Class> klass, in LinkVirtualMethods()
5648 Handle<mirror::Class> super_class(hs.NewHandle(klass->GetSuperClass())); in LinkVirtualMethods()
5649 MutableHandle<mirror::PointerArray> vtable; in LinkVirtualMethods()
5679 vtable = hs.NewHandle(down_cast<mirror::PointerArray*>( in LinkVirtualMethods()
5813 vtable.Assign(down_cast<mirror::PointerArray*>(vtable->CopyOf(self, actual_count))); in LinkVirtualMethods()
5861 Handle<mirror::IfTable> iftable, in ContainsOverridingMethodOf()
5863 Handle<mirror::Class> iface, in ContainsOverridingMethodOf()
5876 MutableHandle<mirror::Class> current_iface(hs.NewHandle<mirror::Class>(nullptr)); in ContainsOverridingMethodOf()
5902 Handle<mirror::Class> klass, in FindDefaultMethodImplementation()
5924 MutableHandle<mirror::Class> chosen_iface(hs.NewHandle<mirror::Class>(nullptr)); in FindDefaultMethodImplementation()
5925 MutableHandle<mirror::IfTable> iftable(hs.NewHandle(klass->GetIfTable())); in FindDefaultMethodImplementation()
5926 MutableHandle<mirror::Class> iface(hs.NewHandle<mirror::Class>(nullptr)); in FindDefaultMethodImplementation()
6008 ArtMethod* ClassLinker::AddMethodToConflictTable(mirror::Class* klass, in AddMethodToConflictTable()
6075 void ClassLinker::FillIMTAndConflictTables(mirror::Class* klass) { in FillIMTAndConflictTables()
6078 ArtMethod* imt[mirror::Class::kImtSize]; in FillIMTAndConflictTables()
6092 for (size_t i = 0; i < mirror::Class::kImtSize; ++i) { in FillIMTAndConflictTables()
6099 return interface_method->GetDexMethodIndex() % mirror::Class::kImtSize; in GetIMTIndex()
6115 void ClassLinker::FillIMTFromIfTable(mirror::IfTable* if_table, in FillIMTFromIfTable()
6118 mirror::Class* klass, in FillIMTFromIfTable()
6122 uint32_t conflict_counts[mirror::Class::kImtSize] = {}; in FillIMTFromIfTable()
6124 mirror::Class* interface = if_table->GetInterface(i); in FillIMTFromIfTable()
6171 for (size_t i = 0; i < mirror::Class::kImtSize; ++i) { in FillIMTFromIfTable()
6190 mirror::Class* interface = if_table->GetInterface(i); in FillIMTFromIfTable()
6222 static bool NotSubinterfaceOfAny(const std::unordered_set<mirror::Class*>& classes, in NotSubinterfaceOfAny()
6223 mirror::Class* val) in NotSubinterfaceOfAny()
6254 static size_t FillIfTable(mirror::IfTable* iftable, in FillIfTable()
6256 std::vector<mirror::Class*> to_process) in FillIfTable()
6261 std::unordered_set<mirror::Class*> classes_in_iftable; in FillIfTable()
6264 mirror::Class* iface = iftable->GetInterface(i); in FillIfTable()
6269 for (mirror::Class* interface : to_process) { in FillIfTable()
6282 mirror::Class* super_interface = interface->GetIfTable()->GetInterface(j); in FillIfTable()
6299 mirror::Class* super_interface = interface->GetIfTable()->GetInterface(j); in FillIfTable()
6309 mirror::Class* if_a = iftable->GetInterface(i); in FillIfTable()
6311 mirror::Class* if_b = iftable->GetInterface(j); in FillIfTable()
6323 bool ClassLinker::SetupInterfaceLookupTable(Thread* self, Handle<mirror::Class> klass, in SetupInterfaceLookupTable()
6324 Handle<mirror::ObjectArray<mirror::Class>> interfaces) { in SetupInterfaceLookupTable()
6340 mirror::IfTable* super_iftable = klass->GetSuperClass()->GetIfTable(); in SetupInterfaceLookupTable()
6356 mirror::Class* interface = have_interfaces in SetupInterfaceLookupTable()
6358 : mirror::Class::GetDirectInterface(self, klass, i); in SetupInterfaceLookupTable()
6371 MutableHandle<mirror::IfTable> iftable(hs.NewHandle(AllocIfTable(self, ifcount))); in SetupInterfaceLookupTable()
6378 mirror::IfTable* super_iftable = klass->GetSuperClass()->GetIfTable(); in SetupInterfaceLookupTable()
6380 mirror::Class* super_interface = super_iftable->GetInterface(i); in SetupInterfaceLookupTable()
6393 std::vector<mirror::Class*> to_add; in SetupInterfaceLookupTable()
6395 mirror::Class* interface = have_interfaces ? interfaces->Get(i) : in SetupInterfaceLookupTable()
6396 mirror::Class::GetDirectInterface(self, klass, i); in SetupInterfaceLookupTable()
6408 iftable.Assign(down_cast<mirror::IfTable*>( in SetupInterfaceLookupTable()
6409 iftable->CopyOf(self, new_ifcount * mirror::IfTable::kMax))); in SetupInterfaceLookupTable()
6435 static void SanityCheckVTable(Handle<mirror::Class> klass, uint32_t pointer_size) in SanityCheckVTable()
6437 mirror::PointerArray* check_vtable = klass->GetVTableDuringLinking(); in SanityCheckVTable()
6438 mirror::Class* superclass = (klass->HasSuperClass()) ? klass->GetSuperClass() : nullptr; in SanityCheckVTable()
6455 void ClassLinker::FillImtFromSuperClass(Handle<mirror::Class> klass, in FillImtFromSuperClass()
6460 mirror::Class* super_class = klass->GetSuperClass(); in FillImtFromSuperClass()
6462 for (size_t i = 0; i < mirror::Class::kImtSize; ++i) { in FillImtFromSuperClass()
6467 mirror::IfTable* if_table = super_class->GetIfTable(); in FillImtFromSuperClass()
6484 Handle<mirror::Class> klass, in LinkInterfaceMethods()
6498 MutableHandle<mirror::IfTable> iftable(hs.NewHandle(klass->GetIfTable())); in LinkInterfaceMethods()
6512 MutableHandle<mirror::PointerArray> vtable(hs.NewHandle(klass->GetVTableDuringLinking())); in LinkInterfaceMethods()
6533 mirror::PointerArray* method_array; in LinkInterfaceMethods()
6535 mirror::IfTable* if_table = klass->GetSuperClass()->GetIfTable(); in LinkInterfaceMethods()
6539 method_array = down_cast<mirror::PointerArray*>(if_table->GetMethodArray(i)->Clone(self)); in LinkInterfaceMethods()
6571 Handle<mirror::PointerArray> method_array(fill_tables in LinkInterfaceMethods()
6573 : hs2.NewHandle<mirror::PointerArray>(nullptr)); in LinkInterfaceMethods()
6576 ScopedNullHandle<mirror::PointerArray> null_handle; in LinkInterfaceMethods()
6577 Handle<mirror::PointerArray> input_vtable_array(null_handle); in LinkInterfaceMethods()
6911 vtable.Assign(down_cast<mirror::PointerArray*>(vtable->CopyOf(self, new_vtable_count))); in LinkInterfaceMethods()
6991 for (size_t i = 0; i < mirror::Class::kImtSize; ++i) { in LinkInterfaceMethods()
7003 auto* m = mirror::DexCache::GetElementPtrSize(resolved_methods, i, image_pointer_size_); in LinkInterfaceMethods()
7034 bool ClassLinker::LinkInstanceFields(Thread* self, Handle<mirror::Class> klass) { in LinkInstanceFields()
7039 bool ClassLinker::LinkStaticFields(Thread* self, Handle<mirror::Class> klass, size_t* class_size) { in LinkStaticFields()
7079 Handle<mirror::Class> klass, in LinkFields()
7092 mirror::Class* super_class = klass->GetSuperClass(); in LinkFields()
7139 if (UNLIKELY(!IsAligned<sizeof(mirror::HeapReference<mirror::Object>)>( in LinkFields()
7145 DCHECK_ALIGNED(field_offset.Uint32Value(), sizeof(mirror::HeapReference<mirror::Object>)); in LinkFields()
7150 sizeof(mirror::HeapReference<mirror::Object>)); in LinkFields()
7179 mirror::Class* super_class = klass->GetSuperClass(); in LinkFields()
7184 (super_class->GetClassFlags() & mirror::kClassFlagNoReferenceFields) != 0) { in LinkFields()
7185 klass->SetClassFlags(klass->GetClassFlags() | mirror::kClassFlagNoReferenceFields); in LinkFields()
7191 mirror::Class* cur_super = klass.Get(); in LinkFields()
7206 DCHECK_GE(size, sizeof(mirror::Object)) << klass->GetDescriptor(&temp); in LinkFields()
7224 sizeof(mirror::HeapReference<mirror::Object>)); in LinkFields()
7248 CHECK_LT(type_size, sizeof(mirror::HeapReference<mirror::Object>)); in LinkFields()
7251 CHECK(!IsAligned<sizeof(mirror::HeapReference<mirror::Object>)>(offset.Uint32Value())); in LinkFields()
7256 sizeof(mirror::HeapReference<mirror::Object>)); in LinkFields()
7265 void ClassLinker::CreateReferenceInstanceOffsets(Handle<mirror::Class> klass) { in CreateReferenceInstanceOffsets()
7267 mirror::Class* super_class = klass->GetSuperClass(); in CreateReferenceInstanceOffsets()
7272 if (reference_offsets != mirror::Class::kClassWalkSuper) { in CreateReferenceInstanceOffsets()
7278 sizeof(mirror::HeapReference<mirror::Object>)); in CreateReferenceInstanceOffsets()
7279 uint32_t start_bit = (start_offset - mirror::kObjectHeaderSize) / in CreateReferenceInstanceOffsets()
7280 sizeof(mirror::HeapReference<mirror::Object>); in CreateReferenceInstanceOffsets()
7282 reference_offsets = mirror::Class::kClassWalkSuper; in CreateReferenceInstanceOffsets()
7293 mirror::String* ClassLinker::ResolveString(const DexFile& dex_file, in ResolveString()
7295 Handle<mirror::DexCache> dex_cache) { in ResolveString()
7297 mirror::String* resolved = dex_cache->GetResolvedString(string_idx); in ResolveString()
7303 mirror::String* string = intern_table_->InternStrong(utf16_length, utf8_data); in ResolveString()
7308 mirror::String* ClassLinker::LookupString(const DexFile& dex_file, in LookupString()
7310 Handle<mirror::DexCache> dex_cache) { in LookupString()
7312 mirror::String* resolved = dex_cache->GetResolvedString(string_idx); in LookupString()
7318 mirror::String* string = intern_table_->LookupStrong(Thread::Current(), utf16_length, utf8_data); in LookupString()
7325 mirror::Class* ClassLinker::ResolveType(const DexFile& dex_file, in ResolveType()
7327 mirror::Class* referrer) { in ResolveType()
7329 Handle<mirror::DexCache> dex_cache(hs.NewHandle(referrer->GetDexCache())); in ResolveType()
7330 Handle<mirror::ClassLoader> class_loader(hs.NewHandle(referrer->GetClassLoader())); in ResolveType()
7334 mirror::Class* ClassLinker::ResolveType(const DexFile& dex_file, in ResolveType()
7336 Handle<mirror::DexCache> dex_cache, in ResolveType()
7337 Handle<mirror::ClassLoader> class_loader) { in ResolveType()
7339 mirror::Class* resolved = dex_cache->GetResolvedType(type_idx); in ResolveType()
7354 Handle<mirror::Throwable> cause(hs.NewHandle(self->GetException())); in ResolveType()
7371 Handle<mirror::DexCache> dex_cache, in ResolveMethod()
7372 Handle<mirror::ClassLoader> class_loader, in ResolveMethod()
7390 mirror::Class* klass = ResolveType(dex_file, method_id.class_idx_, dex_cache, class_loader); in ResolveMethod()
7506 mirror::Class* methods_class = resolved->GetDeclaringClass(); in ResolveMethod()
7507 mirror::Class* referring_class = referrer->GetDeclaringClass(); in ResolveMethod()
7578 Handle<mirror::DexCache> dex_cache, in ResolveMethodWithoutInvokeType()
7579 Handle<mirror::ClassLoader> class_loader) { in ResolveMethodWithoutInvokeType()
7587 mirror::Class* klass = ResolveType(dex_file, method_id.class_idx_, dex_cache, class_loader); in ResolveMethodWithoutInvokeType()
7608 Handle<mirror::DexCache> dex_cache, in ResolveField()
7609 Handle<mirror::ClassLoader> class_loader, in ResolveField()
7619 Handle<mirror::Class> klass( in ResolveField()
7627 resolved = mirror::Class::FindStaticField(self, klass, dex_cache.Get(), field_idx); in ResolveField()
7636 resolved = mirror::Class::FindStaticField(self, klass, name, type); in ResolveField()
7651 Handle<mirror::DexCache> dex_cache, in ResolveFieldJLS()
7652 Handle<mirror::ClassLoader> class_loader) { in ResolveFieldJLS()
7661 Handle<mirror::Class> klass( in ResolveFieldJLS()
7671 resolved = mirror::Class::FindField(self, klass, name, type); in ResolveFieldJLS()
7683 mirror::Class* declaring_class = referrer->GetDeclaringClass(); in MethodShorty()
7684 mirror::DexCache* dex_cache = declaring_class->GetDexCache(); in MethodShorty()
7694 bool operator()(mirror::Class* klass) OVERRIDE SHARED_REQUIRES(Locks::mutator_lock_) { in operator ()()
7765 void Visit(mirror::ClassLoader* class_loader) in Visit()
7807 void ClassLinker::SetClassRoot(ClassRoot class_root, mirror::Class* klass) { in SetClassRoot()
7813 mirror::ObjectArray<mirror::Class>* class_roots = class_roots_.Read(); in SetClassRoot()
7879 mirror::Class* dex_elements_class = dex_elements_field->GetType<true>(); in CreatePathClassLoader()
7882 Handle<mirror::ObjectArray<mirror::Object>> h_dex_elements(hs.NewHandle( in CreatePathClassLoader()
7883 mirror::ObjectArray<mirror::Object>::Alloc(self, dex_elements_class, dex_files.size()))); in CreatePathClassLoader()
7884 Handle<mirror::Class> h_dex_element_class = in CreatePathClassLoader()
7904 Handle<mirror::LongArray> h_long_array = hs2.NewHandle(mirror::LongArray::Alloc( in CreatePathClassLoader()
7910 Handle<mirror::Object> h_dex_file = hs2.NewHandle( in CreatePathClassLoader()
7915 Handle<mirror::String> h_file_name = hs2.NewHandle( in CreatePathClassLoader()
7916 mirror::String::AllocFromModifiedUtf8(self, dex_file->GetLocation().c_str())); in CreatePathClassLoader()
7920 Handle<mirror::Object> h_element = hs2.NewHandle(h_dex_element_class->AllocObject(self)); in CreatePathClassLoader()
7930 Handle<mirror::Object> h_dex_path_list = hs.NewHandle( in CreatePathClassLoader()
7937 Handle<mirror::Class> h_path_class_class = hs.NewHandle( in CreatePathClassLoader()
7938 soa.Decode<mirror::Class*>(WellKnownClasses::dalvik_system_PathClassLoader)); in CreatePathClassLoader()
7939 Handle<mirror::Object> h_path_class_loader = hs.NewHandle( in CreatePathClassLoader()
7951 mirror::Class::FindField(self, hs.NewHandle(h_path_class_loader->GetClass()), "parent", in CreatePathClassLoader()
7954 mirror::Object* boot_cl = in CreatePathClassLoader()
7955 soa.Decode<mirror::Class*>(WellKnownClasses::java_lang_BootClassLoader)->AllocObject(self); in CreatePathClassLoader()
7979 std::fill_n(find_array_class_cache_, kFindArrayCacheSize, GcRoot<mirror::Class>(nullptr)); in DropFindArrayClassCache()
7997 auto* const class_loader = down_cast<mirror::ClassLoader*>(self->DecodeJObject(data.weak_root)); in VisitClassLoaders()
8004 void ClassLinker::InsertDexFileInToClassLoader(mirror::Object* dex_file, in InsertDexFileInToClassLoader()
8005 mirror::ClassLoader* class_loader) { in InsertDexFileInToClassLoader()
8024 auto* const class_loader = down_cast<mirror::ClassLoader*>(self->DecodeJObject(data.weak_root)); in CleanupClassLoaders()
8048 mirror::DexCache* dex_cache = in GetResolvedClasses()
8049 down_cast<mirror::DexCache*>(soa.Self()->DecodeJObject(data.weak_root)); in GetResolvedClasses()
8067 mirror::Class* klass = dex_cache->GetResolvedType(i); in GetResolvedClasses()
8078 mirror::DexCache* klass_dex_cache = klass->GetDexCache(); in GetResolvedClasses()
8116 mirror::DexCache* dex_cache = in GetClassDescriptorsForProfileKeys()
8117 down_cast<mirror::DexCache*>(soa.Self()->DecodeJObject(data.weak_root)); in GetClassDescriptorsForProfileKeys()
8155 Handle<mirror::DexCache> dex_cache,
8156 Handle<mirror::ClassLoader> class_loader,
8162 Handle<mirror::DexCache> dex_cache,
8163 Handle<mirror::ClassLoader> class_loader,