Home
last modified time | relevance | path

Searched refs:klass (Results 1 – 25 of 48) sorted by relevance

12

/art/runtime/gc/collector/
Dmark_sweep-inl.h38 mirror::Class* klass = obj->GetClass(); in ScanObjectVisit() local
39 DCHECK(klass != NULL); in ScanObjectVisit()
40 if (UNLIKELY(klass->IsArrayClass())) { in ScanObjectVisit()
44 if (klass->IsObjectArrayClass()) { in ScanObjectVisit()
47 } else if (UNLIKELY(klass == java_lang_Class_)) { in ScanObjectVisit()
48 DCHECK_EQ(klass->GetClass(), java_lang_Class_); in ScanObjectVisit()
52 VisitClassReferences(klass, obj, visitor); in ScanObjectVisit()
57 VisitOtherReferences(klass, obj, visitor); in ScanObjectVisit()
58 if (UNLIKELY(klass->IsReferenceClass())) { in ScanObjectVisit()
59 DelayReferenceReferent(klass, const_cast<mirror::Object*>(obj)); in ScanObjectVisit()
[all …]
/art/runtime/
Dclass_linker.cc516 mirror::Class* klass = GetClassRoot(class_root); in FinishInit() local
517 CHECK(klass != NULL); in FinishInit()
518 DCHECK(klass->IsArrayClass() || klass->IsPrimitive() || klass->GetDexCache() != NULL); in FinishInit()
1150 for (mirror::Class* klass : classes) { in VisitClassesWithoutClassesLock()
1151 if (!visitor(klass, arg)) { in VisitClassesWithoutClassesLock()
1237 mirror::Class* klass = k->AsClass(); in AllocClass() local
1238 klass->SetPrimitiveType(Primitive::kPrimNot); // Default to not being primitive. in AllocClass()
1239 klass->SetClassSize(class_size); in AllocClass()
1240 klass->SetDexClassDefIndex(DexFile::kDexNoIndex16); // Default to no valid class def index. in AllocClass()
1241 klass->SetDexTypeIndex(DexFile::kDexNoIndex16); // Default to no valid type index. in AllocClass()
[all …]
Dclass_linker_test.cc171 void AssertField(mirror::Class* klass, mirror::ArtField* field) in AssertField() argument
176 EXPECT_EQ(klass, field->GetDeclaringClass()); in AssertField()
181 void AssertClass(const std::string& descriptor, mirror::Class* klass) in AssertClass() argument
183 ClassHelper kh(klass); in AssertClass()
186 EXPECT_FALSE(klass->HasSuperClass()); in AssertClass()
188 EXPECT_TRUE(klass->HasSuperClass()); in AssertClass()
189 EXPECT_TRUE(klass->GetSuperClass() != NULL); in AssertClass()
191 EXPECT_TRUE(klass->GetClass() != NULL); in AssertClass()
192 EXPECT_EQ(klass->GetClass(), klass->GetClass()->GetClass()); in AssertClass()
193 EXPECT_TRUE(klass->GetDexCache() != NULL); in AssertClass()
[all …]
Dclass_linker.h309 void VerifyClass(mirror::Class* klass) SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
310 bool VerifyClassUsingOatFile(const DexFile& dex_file, mirror::Class* klass,
313 void ResolveClassExceptionHandlerTypes(const DexFile& dex_file, mirror::Class* klass)
315 void ResolveMethodExceptionHandlerTypes(const DexFile& dex_file, mirror::ArtMethod* klass)
356 mirror::Class* InsertClass(const char* descriptor, mirror::Class* klass, size_t hash)
414 SirtRef<mirror::Class>& klass,
419 SirtRef<mirror::Class>& klass, SirtRef<mirror::ArtField>& dst)
424 SirtRef<mirror::Class>& klass)
427 void FixupStaticTrampolines(mirror::Class* klass) SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
440 bool InitializeClass(mirror::Class* klass, bool can_run_clinit, bool can_init_parents)
[all …]
Dcommon_test.h461 mirror::Class* klass = class_linker_->FindClass(class_descriptor.c_str(), class_loader); in CompileClass() local
462 CHECK(klass != NULL) << "Class not found " << class_name; in CompileClass()
463 for (size_t i = 0; i < klass->NumDirectMethods(); i++) { in CompileClass()
464 CompileMethod(klass->GetDirectMethod(i)); in CompileClass()
466 for (size_t i = 0; i < klass->NumVirtualMethods(); i++) { in CompileClass()
467 CompileMethod(klass->GetVirtualMethod(i)); in CompileClass()
485 mirror::Class* klass = class_linker_->FindClass(class_descriptor.c_str(), class_loader); in CompileDirectMethod() local
486 CHECK(klass != NULL) << "Class not found " << class_name; in CompileDirectMethod()
487 mirror::ArtMethod* method = klass->FindDirectMethod(method_name, signature); in CompileDirectMethod()
499 mirror::Class* klass = class_linker_->FindClass(class_descriptor.c_str(), class_loader); in CompileVirtualMethod() local
[all …]
/art/runtime/entrypoints/
Dentrypoint_utils.h49 mirror::Class* klass = method->GetDexCacheResolvedTypes()->Get(type_idx); in AllocObjectFromCode() local
51 if (UNLIKELY(klass == NULL)) { in AllocObjectFromCode()
52 klass = runtime->GetClassLinker()->ResolveType(type_idx, method); in AllocObjectFromCode()
53 if (klass == NULL) { in AllocObjectFromCode()
59 if (UNLIKELY(!klass->IsInstantiable())) { in AllocObjectFromCode()
62 PrettyDescriptor(klass).c_str()); in AllocObjectFromCode()
66 if (UNLIKELY(!referrer->CanAccess(klass))) { in AllocObjectFromCode()
67 ThrowIllegalAccessErrorClass(referrer, klass); in AllocObjectFromCode()
71 if (!klass->IsInitialized() && in AllocObjectFromCode()
72 !runtime->GetClassLinker()->EnsureInitialized(klass, true, true)) { in AllocObjectFromCode()
[all …]
Dentrypoint_utils.cc44 mirror::Class* klass = referrer->GetDexCacheResolvedTypes()->Get(type_idx); in CheckAndAllocArrayFromCode() local
45 if (UNLIKELY(klass == NULL)) { // Not in dex cache so try to resolve in CheckAndAllocArrayFromCode()
46 klass = Runtime::Current()->GetClassLinker()->ResolveType(type_idx, referrer); in CheckAndAllocArrayFromCode()
47 if (klass == NULL) { // Error in CheckAndAllocArrayFromCode()
52 if (UNLIKELY(klass->IsPrimitive() && !klass->IsPrimitiveInt())) { in CheckAndAllocArrayFromCode()
53 if (klass->IsPrimitiveLong() || klass->IsPrimitiveDouble()) { in CheckAndAllocArrayFromCode()
55 PrettyDescriptor(klass).c_str()); in CheckAndAllocArrayFromCode()
61 PrettyDescriptor(klass).c_str()); in CheckAndAllocArrayFromCode()
67 if (UNLIKELY(!referrer_klass->CanAccess(klass))) { in CheckAndAllocArrayFromCode()
68 ThrowIllegalAccessErrorClass(referrer_klass, klass); in CheckAndAllocArrayFromCode()
[all …]
/art/runtime/verifier/
Dreg_type_cache.cc138 mirror::Class* klass = NULL; in ResolveClass() local
140 klass = class_linker->FindClass(descriptor, loader); in ResolveClass()
142 klass = class_linker->LookupClass(descriptor, loader); in ResolveClass()
143 if (klass != NULL && !klass->IsLoaded()) { in ResolveClass()
145 klass = NULL; in ResolveClass()
148 return klass; in ResolveClass()
170 mirror::Class* klass = ResolveClass(descriptor, loader); in From() local
171 if (klass != NULL) { in From()
176 DCHECK(!precise || klass->IsInstantiable()); in From()
182 if (klass->CannotBeAssignedFromOtherTypes() || precise) { in From()
[all …]
Dreg_type.h229 bool CanAccessMember(mirror::Class* klass, uint32_t access_flags) const
273 RegType(mirror::Class* klass, const std::string& descriptor, uint16_t cache_id) in RegType() argument
275 : descriptor_(descriptor), klass_(klass), cache_id_(cache_id) { in RegType()
307 static ConflictType* CreateInstance(mirror::Class* klass, const std::string& descriptor,
315 ConflictType(mirror::Class* klass, const std::string& descriptor, uint16_t cache_id) in ConflictType() argument
317 : RegType(klass, descriptor, cache_id) { in ConflictType()
337 static UndefinedType* CreateInstance(mirror::Class* klass, const std::string& descriptor,
345 UndefinedType(mirror::Class* klass, const std::string& descriptor, uint16_t cache_id) in UndefinedType() argument
347 : RegType(klass, descriptor, cache_id) { in UndefinedType()
358 PrimitiveType(mirror::Class* klass, const std::string& descriptor, uint16_t cache_id)
[all …]
Dreg_type.cc67 PrimitiveType::PrimitiveType(mirror::Class* klass, const std::string& descriptor, uint16_t cache_id) in PrimitiveType() argument
69 : RegType(klass, descriptor, cache_id) { in PrimitiveType()
70 CHECK(klass != NULL); in PrimitiveType()
74 Cat1Type::Cat1Type(mirror::Class* klass, const std::string& descriptor, uint16_t cache_id) in Cat1Type() argument
76 : PrimitiveType(klass, descriptor, cache_id) { in Cat1Type()
79 Cat2Type::Cat2Type(mirror::Class* klass, const std::string& descriptor, uint16_t cache_id) in Cat2Type() argument
81 : PrimitiveType(klass, descriptor, cache_id) { in Cat2Type()
145 DoubleHiType* DoubleHiType::CreateInstance(mirror::Class* klass, const std::string& descriptor, in CreateInstance() argument
148 instance_ = new DoubleHiType(klass, descriptor, cache_id); in CreateInstance()
165 DoubleLoType* DoubleLoType::CreateInstance(mirror::Class* klass, const std::string& descriptor, in CreateInstance() argument
[all …]
Dreg_type_cache-inl.h28 mirror::Class* klass = NULL; in CreatePrimitiveTypeInstance() local
31 klass = art::Runtime::Current()->GetClassLinker()->FindSystemClass(descriptor.c_str()); in CreatePrimitiveTypeInstance()
33 Type* entry = Type::CreateInstance(klass, descriptor, RegTypeCache::primitive_count_); in CreatePrimitiveTypeInstance()
Dmethod_verifier_test.cc33 mirror::Class* klass = class_linker_->FindSystemClass(descriptor.c_str()); in VerifyClass() local
37 ASSERT_TRUE(MethodVerifier::VerifyClass(klass, true, &error_msg) == MethodVerifier::kNoFailure) in VerifyClass()
/art/runtime/mirror/
Dobject.cc67 for (const Class* klass = c; klass != NULL; klass = klass->GetSuperClass()) { in Clone() local
68 size_t num_reference_fields = klass->NumReferenceInstanceFields(); in Clone()
70 ArtField* field = klass->GetInstanceField(i); in Clone()
Dclass.cc399 for (const Class* klass = this; klass != NULL; klass = klass->GetSuperClass()) { in FindDirectMethod() local
400 ArtMethod* method = klass->FindDeclaredDirectMethod(name, signature); in FindDirectMethod()
409 for (const Class* klass = this; klass != NULL; klass = klass->GetSuperClass()) { in FindDirectMethod() local
410 ArtMethod* method = klass->FindDeclaredDirectMethod(dex_cache, dex_method_idx); in FindDirectMethod()
444 for (const Class* klass = this; klass != NULL; klass = klass->GetSuperClass()) { in FindVirtualMethod() local
445 ArtMethod* method = klass->FindDeclaredVirtualMethod(name, signature); in FindVirtualMethod()
454 for (const Class* klass = this; klass != NULL; klass = klass->GetSuperClass()) { in FindVirtualMethod() local
455 ArtMethod* method = klass->FindDeclaredVirtualMethod(dex_cache, dex_method_idx); in FindVirtualMethod()
Dobject-inl.h74 inline bool Object::VerifierInstanceOf(const Class* klass) const { in VerifierInstanceOf() argument
75 DCHECK(klass != NULL); in VerifierInstanceOf()
77 return klass->IsInterface() || InstanceOf(klass); in VerifierInstanceOf()
80 inline bool Object::InstanceOf(const Class* klass) const { in InstanceOf() argument
81 DCHECK(klass != NULL); in InstanceOf()
83 return klass->IsAssignableFrom(GetClass()); in InstanceOf()
Dclass-inl.h143 inline bool Class::Implements(const Class* klass) const { in Implements() argument
144 DCHECK(klass != NULL); in Implements()
145 DCHECK(klass->IsInterface()) << PrettyClass(this); in Implements()
152 if (iftable->GetInterface(i) == klass) { in Implements()
198 inline bool Class::IsSubClass(const Class* klass) const { in IsSubClass() argument
203 if (current == klass) { in IsSubClass()
323 inline void Class::SetVerifyErrorClass(Class* klass) { in SetVerifyErrorClass() argument
324 CHECK(klass != NULL) << PrettyClass(this); in SetVerifyErrorClass()
325 SetFieldObject(OFFSET_OF_OBJECT_MEMBER(Class, verify_error_class_), klass, false); in SetVerifyErrorClass()
Dclass.h328 for (Class* klass = this; klass->GetSuperClass() != NULL; klass = klass->GetSuperClass()) { in Depth() local
441 bool IsSubClass(const Class* klass) const
758 void SetVerifyErrorClass(Class* klass) SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
760 bool Implements(const Class* klass) const
762 bool IsArrayAssignableFromArray(const Class* klass) const
764 bool IsAssignableFromArray(const Class* klass) const
/art/compiler/
Dimage_writer.cc243 bool ImageWriter::IsImageClass(const Class* klass) { in IsImageClass() argument
244 return compiler_driver_.IsImageClass(ClassHelper(klass).GetDescriptor()); in IsImageClass()
275 Class* klass = dex_cache->GetResolvedType(i); in PruneNonImageClasses() local
276 if (klass != NULL && !IsImageClass(klass)) { in PruneNonImageClasses()
296 bool ImageWriter::NonImageClassesVisitor(Class* klass, void* arg) { in NonImageClassesVisitor() argument
298 if (!context->image_writer->IsImageClass(klass)) { in NonImageClassesVisitor()
299 context->non_image_classes->insert(ClassHelper(klass).GetDescriptor()); in NonImageClassesVisitor()
326 Class* klass = obj->AsClass(); in CheckNonImageClassesRemovedCallback() local
327 if (!image_writer->IsImageClass(klass)) { in CheckNonImageClassesRemovedCallback()
329 CHECK(image_writer->IsImageClass(klass)) << ClassHelper(klass).GetDescriptor() in CheckNonImageClassesRemovedCallback()
[all …]
Dimage_test.cc151 mirror::Class* klass = class_linker_->FindSystemClass(descriptor); in TEST_F() local
152 EXPECT_TRUE(klass != NULL) << descriptor; in TEST_F()
153 EXPECT_LT(image_begin, reinterpret_cast<byte*>(klass)) << descriptor; in TEST_F()
156 EXPECT_LT(reinterpret_cast<byte*>(klass), image_end) << descriptor; in TEST_F()
159 EXPECT_GT(reinterpret_cast<byte*>(klass), image_end) << descriptor; in TEST_F()
161 EXPECT_TRUE(Monitor::IsValidLockWord(*klass->GetRawLockWordAddress())); in TEST_F()
Doat_test.cc129 mirror::Class* klass = class_linker->FindClass(descriptor, NULL); in TEST_F() local
132 for (size_t i = 0; i < klass->NumDirectMethods(); i++, method_index++) { in TEST_F()
133 CheckMethod(klass->GetDirectMethod(i), in TEST_F()
137 CheckMethod(klass->GetVirtualMethod(i), in TEST_F()
/art/runtime/entrypoints/quick/
Dquick_cast_entrypoints.cc26 extern "C" uint32_t artIsAssignableFromCode(const mirror::Class* klass, in artIsAssignableFromCode() argument
29 DCHECK(klass != NULL); in artIsAssignableFromCode()
31 return klass->IsAssignableFrom(ref_class) ? 1 : 0; in artIsAssignableFromCode()
/art/compiler/driver/
Dcompiler_driver.cc506 mirror::Class* klass = class_linker->FindClass(descriptor, class_loader); in GetDexToDexCompilationlevel() local
507 if (klass == NULL) { in GetDexToDexCompilationlevel()
521 } else if (klass->IsVerified()) { in GetDexToDexCompilationlevel()
524 } else if (klass->IsCompileTimeVerified()) { in GetDexToDexCompilationlevel()
526 DCHECK_EQ(klass->GetStatus(), mirror::Class::kStatusRetryVerificationAtRuntime); in GetDexToDexCompilationlevel()
664 static bool RecordImageClassesVisitor(mirror::Class* klass, void* arg) in RecordImageClassesVisitor() argument
668 image_classes->insert(ClassHelper(klass).GetDescriptor()); in RecordImageClassesVisitor()
686 SirtRef<mirror::Class> klass(self, class_linker->FindSystemClass(descriptor.c_str())); in LoadImageClasses() local
687 if (klass.get() == NULL) { in LoadImageClasses()
711 SirtRef<mirror::Class> klass(self, class_linker->ResolveType(*dex_file, exception_type_idx, in LoadImageClasses() local
[all …]
/art/dalvikvm/
Ddalvikvm.cc74 ScopedLocalRef<jclass> klass(env, env->FindClass(class_name.c_str())); in InvokeMain() local
75 if (klass.get() == NULL) { in InvokeMain()
81 jmethodID method = env->GetStaticMethodID(klass.get(), "main", "([Ljava/lang/String;)V"); in InvokeMain()
90 if (!IsMethodPublic(env, klass.get(), method)) { in InvokeMain()
97 env->CallStaticVoidMethod(klass.get(), method, args.get()); in InvokeMain()
/art/compiler/jni/
Djni_compiler_test.cc364 jint Java_MyClassNatives_fooSII(JNIEnv* env, jclass klass, jint x, jint y) { in Java_MyClassNatives_fooSII() argument
369 EXPECT_TRUE(klass != NULL); in Java_MyClassNatives_fooSII()
370 EXPECT_TRUE(env->IsInstanceOf(JniCompilerTest::jobj_, klass)); in Java_MyClassNatives_fooSII()
387 jdouble Java_MyClassNatives_fooSDD(JNIEnv* env, jclass klass, jdouble x, jdouble y) { in Java_MyClassNatives_fooSDD() argument
392 EXPECT_TRUE(klass != NULL); in Java_MyClassNatives_fooSDD()
393 EXPECT_TRUE(env->IsInstanceOf(JniCompilerTest::jobj_, klass)); in Java_MyClassNatives_fooSDD()
415 jobject Java_MyClassNatives_fooSIOO(JNIEnv* env, jclass klass, jint x, jobject y, in Java_MyClassNatives_fooSIOO() argument
421 EXPECT_TRUE(klass != NULL); in Java_MyClassNatives_fooSIOO()
422 EXPECT_TRUE(env->IsInstanceOf(JniCompilerTest::jobj_, klass)); in Java_MyClassNatives_fooSIOO()
430 return klass; in Java_MyClassNatives_fooSIOO()
[all …]
/art/runtime/gc/accounting/
Dspace_bitmap.cc181 mirror::Class* klass, void* arg) in WalkInstanceFields() argument
184 mirror::Class* super = klass->GetSuperClass(); in WalkInstanceFields()
189 mirror::ObjectArray<mirror::ArtField>* fields = klass->GetIFields(); in WalkInstanceFields()
215 mirror::Class* klass = obj->GetClass(); in WalkFieldsInOrder() local
216 WalkInstanceFields(visited, callback, obj, klass, arg); in WalkFieldsInOrder()
219 mirror::ObjectArray<mirror::ArtField>* fields = klass->GetSFields(); in WalkFieldsInOrder()

12