• Home
  • Raw
  • Download

Lines Matching refs:cls

234   mirror::Class* GetClassContent(ObjPtr<mirror::Class> cls) REQUIRES_SHARED(Locks::mutator_lock_) {  in GetClassContent()  argument
235 if (cls == nullptr || IsInBootImage(cls.Ptr())) { in GetClassContent()
236 return cls.Ptr(); in GetClassContent()
238 const dex::ClassDef* class_def = cls->GetClassDef(); in GetClassContent()
239 DCHECK(class_def != nullptr) << cls->PrettyClass(); in GetClassContent()
241 DCHECK(it != classes_.end()) << cls->PrettyClass(); in GetClassContent()
459 bool CanEmitHelper(Handle<mirror::Class> cls) REQUIRES_SHARED(Locks::mutator_lock_) { in CanEmitHelper() argument
462 if (!ContainsElement(dex_files_, &cls->GetDexFile())) { in CanEmitHelper()
468 MutableHandle<mirror::Class> other_class = hs.NewHandle(cls->GetSuperClass()); in CanEmitHelper()
473 other_class.Assign(cls->GetComponentType()); in CanEmitHelper()
478 for (size_t i = 0, num_interfaces = cls->NumDirectInterfaces(); i < num_interfaces; ++i) { in CanEmitHelper()
479 other_class.Assign(cls->GetDirectInterface(i)); in CanEmitHelper()
487 bool CanEmit(Handle<mirror::Class> cls) REQUIRES_SHARED(Locks::mutator_lock_) { in CanEmit() argument
488 if (cls == nullptr) { in CanEmit()
492 if (!cls->IsResolved() || cls->IsErroneous()) { in CanEmit()
497 if (cls->IsProxyClass()) { in CanEmit()
502 if (helper_->IsInBootImage(cls.Get())) { in CanEmit()
506 if (cls->IsBootStrapClassLoaded()) { in CanEmit()
511 DCHECK(!cls->IsPrimitive()); in CanEmit()
513 if (cls->IsArrayClass()) { in CanEmit()
514 if (cls->IsBootStrapClassLoaded()) { in CanEmit()
517 return helper_->IsInBootImage(cls.Get()); in CanEmit()
519 ObjPtr<mirror::Class> temp = cls.Get(); in CanEmit()
525 const dex::ClassDef* class_def = cls->GetClassDef(); in CanEmit()
534 if (CanEmitHelper(cls)) { in CanEmit()
544 MutableHandle<mirror::Class> cls(obj.GetReference()); in Visit() local
545 if (CanEmit(cls)) { in Visit()
546 if (cls->IsBootStrapClassLoaded()) { in Visit()
547 DCHECK(helper_->IsInBootImage(cls.Get())); in Visit()
549 uint32_t hash = cls->DescriptorHash(); in Visit()
550 helper_->class_table_.InsertWithHash(ClassTable::TableSlot(cls.Get(), hash), hash); in Visit()
552 classes_to_write_.push_back(cls); in Visit()
600 for (Handle<mirror::Class> cls : classes_to_write) { in EmitClasses()
602 CopyClass(cls.Get()); in EmitClasses()
622 ObjPtr<mirror::Class> cls = old_types_array->Get(i); in EmitClasses() local
623 if (cls == nullptr) { in EmitClasses()
625 } else if (IsInBootImage(cls.Ptr())) { in EmitClasses()
626 if (!cls->IsPrimitive()) { in EmitClasses()
631 uint32_t hash = cls->DescriptorHash(); in EmitClasses()
632 class_table_.InsertWithHash(ClassTable::TableSlot(cls.Ptr(), hash), hash); in EmitClasses()
634 content_array->Set(i, cls.Ptr()); in EmitClasses()
635 } else if (cls->IsArrayClass()) { in EmitClasses()
637 cls->GetDescriptor(&class_name); in EmitClasses()
647 DCHECK(!cls->IsPrimitive()); in EmitClasses()
648 DCHECK(!cls->IsProxyClass()); in EmitClasses()
649 const dex::ClassDef* class_def = cls->GetClassDef(); in EmitClasses()
813 mirror::Class* cls = reinterpret_cast<mirror::Class*>(&objects_[entry.second]); in RelocateNativePointers() local
814 cls->FixupNativePointers(cls, kRuntimePointerSize, visitor); in RelocateNativePointers()
815 RelocateMethodPointerArrays(cls, visitor); in RelocateNativePointers()
818 mirror::Class* cls = reinterpret_cast<mirror::Class*>(&objects_[it.second]); in RelocateNativePointers() local
819 cls->FixupNativePointers(cls, kRuntimePointerSize, visitor); in RelocateNativePointers()
820 RelocateMethodPointerArrays(cls, visitor); in RelocateNativePointers()
852 void CopyFieldArrays(ObjPtr<mirror::Class> cls, uint32_t class_image_address) in CopyFieldArrays() argument
855 cls->GetSFieldsPtr(), cls->GetIFieldsPtr(), in CopyFieldArrays()
879 void CopyMethodArrays(ObjPtr<mirror::Class> cls, in CopyMethodArrays() argument
883 size_t number_of_methods = cls->NumMethods(); in CopyMethodArrays()
893 memcpy(dest_array, cls->GetMethodsPtr(), size); in CopyMethodArrays()
894 native_relocations_.Put(cls->GetMethodsPtr(), in CopyMethodArrays()
898 ArtMethod* method = &cls->GetMethodsPtr()->At(i); in CopyMethodArrays()
903 if (declaring_class == cls) { in CopyMethodArrays()
934 } else if (!cls->IsVerified()) { in CopyMethodArrays()
967 void CopyImTable(ObjPtr<mirror::Class> cls) REQUIRES_SHARED(Locks::mutator_lock_) { in CopyImTable() argument
968 ImTable* table = cls->GetImt(kRuntimePointerSize); in CopyImTable()
1367 bool IsInitialized(mirror::Class* cls) REQUIRES_SHARED(Locks::mutator_lock_) { in IsInitialized() argument
1368 if (IsInBootImage(cls)) { in IsInitialized()
1369 const OatDexFile* oat_dex_file = cls->GetDexFile().GetOatDexFile(); in IsInitialized()
1371 uint16_t class_def_index = cls->GetDexClassDefIndex(); in IsInitialized()
1375 return cls->IsVisiblyInitialized<kVerifyNone>(); in IsInitialized()
1381 bool TryInitializeClass(mirror::Class* copy, ObjPtr<mirror::Class> cls, uint32_t class_offset) in TryInitializeClass() argument
1383 if (!cls->IsVerified()) { in TryInitializeClass()
1386 if (cls->IsArrayClass()) { in TryInitializeClass()
1391 mirror::Class* super = GetClassContent(cls->GetSuperClass()); in TryInitializeClass()
1393 << "App image classes should always have a super class: " << cls->PrettyClass(); in TryInitializeClass()
1399 if (cls->FindClassInitializer(kRuntimePointerSize) != nullptr) { in TryInitializeClass()
1405 if (!cls->IsInterface()) { in TryInitializeClass()
1406 for (size_t i = 0; i < cls->NumDirectInterfaces(); i++) { in TryInitializeClass()
1407 mirror::Class* itf = GetClassContent(cls->GetDirectInterface(i)); in TryInitializeClass()
1415 if (cls->NumStaticFields() == 0u) { in TryInitializeClass()
1420 EncodedStaticFieldValueIterator it(cls->GetDexFile(), *cls->GetClassDef()); in TryInitializeClass()
1429 ClassAccessor accessor(cls->GetDexFile(), *cls->GetClassDef()); in TryInitializeClass()
1435 cls->GetDexCache(), in TryInitializeClass()
1436 cls->GetClassLoader(), in TryInitializeClass()
1470 linker->LookupString(dex::StringIndex(it.GetJavaValue().i), cls->GetDexCache()); in TryInitializeClass()
1506 linker->LookupResolvedType(dex::TypeIndex(it.GetJavaValue().i), cls); in TryInitializeClass()
1553 uint32_t CopyClass(ObjPtr<mirror::Class> cls) REQUIRES_SHARED(Locks::mutator_lock_) { in CopyClass() argument
1554 DCHECK(!cls->IsBootStrapClassLoaded()); in CopyClass()
1556 if (cls->IsArrayClass()) { in CopyClass()
1558 cls->GetDescriptor(&class_name); in CopyClass()
1563 offset = CopyObject(cls); in CopyClass()
1566 const dex::ClassDef* class_def = cls->GetClassDef(); in CopyClass()
1571 offset = CopyObject(cls); in CopyClass()
1575 uint32_t hash = cls->DescriptorHash(); in CopyClass()
1581 DCHECK(inserted) << "Class " << cls->PrettyDescriptor() in CopyClass()
1582 << " (" << cls.Ptr() << ") already inserted"; in CopyClass()
1587 if (cls->IsArrayClass()) { in CopyClass()
1590 copy->SetStatusInternal(cls->IsVerified() ? ClassStatus::kVerified : ClassStatus::kResolved); in CopyClass()
1595 MemberOffset static_offset = cls->GetFirstReferenceStaticFieldOffset(kRuntimePointerSize); in CopyClass()
1598 cls->GetClassSize() - static_offset.Uint32Value()); in CopyClass()
1602 bool is_class_initialized = TryInitializeClass(copy, cls, offset); in CopyClass()
1607 if (!cls->IsArrayClass() && !cls->IsFinalizable()) { in CopyClass()
1608 copy->SetObjectSizeAllocFastPath(RoundUp(cls->GetObjectSize(), kObjectAlignment)); in CopyClass()
1610 if (cls->IsInterface()) { in CopyClass()
1621 CopyFieldArrays(cls, class_image_address); in CopyClass()
1622 CopyMethodArrays(cls, class_image_address, is_class_initialized); in CopyClass()
1623 if (cls->ShouldHaveImt()) { in CopyClass()
1624 CopyImTable(cls); in CopyClass()