Home
last modified time | relevance | path

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

1234

/art/runtime/
Dclass_linker.cc567 mirror::Class* klass = GetClassRoot(class_root); in FinishInit() local
568 CHECK(klass != nullptr); in FinishInit()
569 DCHECK(klass->IsArrayClass() || klass->IsPrimitive() || klass->GetDexCache() != nullptr); in FinishInit()
1793 for (mirror::Class* klass : classes) { in VisitClassesWithoutClassesLock()
1794 if (!visitor(klass, arg)) { in VisitClassesWithoutClassesLock()
1827 mirror::Class* klass = classes->Get(i); in VisitClassesWithoutClassesLock() local
1828 if (klass != nullptr && !visitor(klass, arg)) { in VisitClassesWithoutClassesLock()
1932 mirror::Class* klass) { in EnsureResolved() argument
1933 DCHECK(klass != nullptr); in EnsureResolved()
1936 if (init_done_ && klass->IsTemp()) { in EnsureResolved()
[all …]
Dclass_linker_test.cc178 void AssertField(mirror::Class* klass, mirror::ArtField* field) in AssertField() argument
182 EXPECT_EQ(klass, field->GetDeclaringClass()); in AssertField()
189 void AssertClass(const std::string& descriptor, Handle<mirror::Class> klass) in AssertClass() argument
192 EXPECT_STREQ(descriptor.c_str(), klass->GetDescriptor(&temp)); in AssertClass()
194 EXPECT_FALSE(klass->HasSuperClass()); in AssertClass()
196 EXPECT_TRUE(klass->HasSuperClass()); in AssertClass()
197 EXPECT_TRUE(klass->GetSuperClass() != NULL); in AssertClass()
199 EXPECT_TRUE(klass->GetClass() != NULL); in AssertClass()
200 EXPECT_EQ(klass->GetClass(), klass->GetClass()->GetClass()); in AssertClass()
201 EXPECT_TRUE(klass->GetDexCache() != NULL); in AssertClass()
[all …]
Dclass_linker.h321 void VerifyClass(Handle<mirror::Class> klass) SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
322 bool VerifyClassUsingOatFile(const DexFile& dex_file, mirror::Class* klass,
326 Handle<mirror::Class> klass)
328 void ResolveMethodExceptionHandlerTypes(const DexFile& dex_file, mirror::ArtMethod* klass)
392 mirror::Class* InsertClass(const char* descriptor, mirror::Class* klass, size_t hash)
454 Handle<mirror::Class> klass,
459 Handle<mirror::Class> klass,
465 Handle<mirror::Class> klass, Handle<mirror::ArtField> dst)
470 Handle<mirror::Class> klass)
473 void FixupStaticTrampolines(mirror::Class* klass) SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
[all …]
/art/runtime/entrypoints/
Dentrypoint_utils-inl.h43 mirror::Class* klass = method->GetDexCacheResolvedType<false>(type_idx); in CheckObjectAlloc() local
44 if (UNLIKELY(klass == NULL)) { in CheckObjectAlloc()
45 klass = Runtime::Current()->GetClassLinker()->ResolveType(type_idx, method); in CheckObjectAlloc()
47 if (klass == NULL) { in CheckObjectAlloc()
55 if (UNLIKELY(!klass->IsInstantiable())) { in CheckObjectAlloc()
58 PrettyDescriptor(klass).c_str()); in CheckObjectAlloc()
63 if (UNLIKELY(!referrer->CanAccess(klass))) { in CheckObjectAlloc()
64 ThrowIllegalAccessErrorClass(referrer, klass); in CheckObjectAlloc()
69 if (UNLIKELY(!klass->IsInitialized())) { in CheckObjectAlloc()
71 Handle<mirror::Class> h_klass(hs.NewHandle(klass)); in CheckObjectAlloc()
[all …]
Dentrypoint_utils.cc46 mirror::Class* klass = referrer->GetDexCacheResolvedType<false>(type_idx); in CheckFilledNewArrayAlloc() local
47 if (UNLIKELY(klass == NULL)) { // Not in dex cache so try to resolve in CheckFilledNewArrayAlloc()
48 klass = Runtime::Current()->GetClassLinker()->ResolveType(type_idx, referrer); in CheckFilledNewArrayAlloc()
49 if (klass == NULL) { // Error in CheckFilledNewArrayAlloc()
54 if (UNLIKELY(klass->IsPrimitive() && !klass->IsPrimitiveInt())) { in CheckFilledNewArrayAlloc()
55 if (klass->IsPrimitiveLong() || klass->IsPrimitiveDouble()) { in CheckFilledNewArrayAlloc()
57 PrettyDescriptor(klass).c_str()); in CheckFilledNewArrayAlloc()
64 PrettyDescriptor(klass).c_str()); in CheckFilledNewArrayAlloc()
70 if (UNLIKELY(!referrer_klass->CanAccess(klass))) { in CheckFilledNewArrayAlloc()
71 ThrowIllegalAccessErrorClass(referrer_klass, klass); in CheckFilledNewArrayAlloc()
[all …]
/art/test/115-native-bridge/
Dnativebridge.cc50 jclass klass = env->FindClass("Main"); in trampoline_JNI_OnLoad() local
51 if (klass != nullptr) { in trampoline_JNI_OnLoad()
53 count1 = gNativeBridgeArtCallbacks->getNativeMethodCount(env, klass); in trampoline_JNI_OnLoad()
58 count2 = gNativeBridgeArtCallbacks->getNativeMethods(env, klass, methods.get(), count1); in trampoline_JNI_OnLoad()
68 mid = env->GetStaticMethodID(klass, methods[i].name, nb_method->signature); in trampoline_JNI_OnLoad()
70 mid = env->GetMethodID(klass, methods[i].name, nb_method->signature); in trampoline_JNI_OnLoad()
89 jclass klass) { in trampoline_Java_Main_testFindClassOnAttachedNativeThread() argument
94 return fnPtr(env, klass); in trampoline_Java_Main_testFindClassOnAttachedNativeThread()
98 jclass klass) { in trampoline_Java_Main_testFindFieldOnAttachedNativeThreadNative() argument
103 return fnPtr(env, klass); in trampoline_Java_Main_testFindFieldOnAttachedNativeThreadNative()
[all …]
/art/runtime/verifier/
Dreg_type_cache.cc146 mirror::Class* klass = NULL; in ResolveClass() local
148 klass = class_linker->FindClass(self, descriptor, class_loader); in ResolveClass()
150 klass = class_linker->LookupClass(descriptor, loader); in ResolveClass()
151 if (klass != nullptr && !klass->IsLoaded()) { in ResolveClass()
153 klass = nullptr; in ResolveClass()
156 return klass; in ResolveClass()
171 mirror::Class* klass = ResolveClass(descriptor, loader); in From() local
172 if (klass != NULL) { in From()
177 DCHECK(!precise || klass->IsInstantiable()); in From()
183 if (klass->CannotBeAssignedFromOtherTypes() || precise) { in From()
[all …]
Dreg_type.h231 bool CanAccessMember(mirror::Class* klass, uint32_t access_flags)
276 RegType(mirror::Class* klass, const std::string& descriptor, uint16_t cache_id) in RegType() argument
278 : descriptor_(descriptor), klass_(GcRoot<mirror::Class>(klass)), cache_id_(cache_id) { in RegType()
310 static ConflictType* CreateInstance(mirror::Class* klass, const std::string& descriptor,
318 ConflictType(mirror::Class* klass, const std::string& descriptor, uint16_t cache_id) in ConflictType() argument
320 : RegType(klass, descriptor, cache_id) { in ConflictType()
340 static UndefinedType* CreateInstance(mirror::Class* klass, const std::string& descriptor,
348 UndefinedType(mirror::Class* klass, const std::string& descriptor, uint16_t cache_id) in UndefinedType() argument
350 : RegType(klass, descriptor, cache_id) { in UndefinedType()
361 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 …]
/art/runtime/mirror/
Dclass.cc449 for (Class* klass = this; klass != nullptr; klass = klass->GetSuperClass()) { in FindDirectMethod() local
450 ArtMethod* method = klass->FindDeclaredDirectMethod(name, signature); in FindDirectMethod()
459 for (Class* klass = this; klass != nullptr; klass = klass->GetSuperClass()) { in FindDirectMethod() local
460 ArtMethod* method = klass->FindDeclaredDirectMethod(name, signature); in FindDirectMethod()
469 for (Class* klass = this; klass != nullptr; klass = klass->GetSuperClass()) { in FindDirectMethod() local
470 ArtMethod* method = klass->FindDeclaredDirectMethod(dex_cache, dex_method_idx); in FindDirectMethod()
513 for (Class* klass = this; klass != nullptr; klass = klass->GetSuperClass()) { in FindVirtualMethod() local
514 ArtMethod* method = klass->FindDeclaredVirtualMethod(name, signature); in FindVirtualMethod()
523 for (Class* klass = this; klass != nullptr; klass = klass->GetSuperClass()) { in FindVirtualMethod() local
524 ArtMethod* method = klass->FindDeclaredVirtualMethod(name, signature); in FindVirtualMethod()
[all …]
Dart_field.cc65 ArtField* ArtField::FindInstanceFieldWithOffset(mirror::Class* klass, uint32_t field_offset) { in FindInstanceFieldWithOffset() argument
66 DCHECK(klass != nullptr); in FindInstanceFieldWithOffset()
67 ObjectArray<ArtField>* instance_fields = klass->GetIFields(); in FindInstanceFieldWithOffset()
77 if (klass->GetSuperClass() != NULL) { in FindInstanceFieldWithOffset()
78 return FindInstanceFieldWithOffset(klass->GetSuperClass(), field_offset); in FindInstanceFieldWithOffset()
Dobject-inl.h180 inline bool Object::VerifierInstanceOf(Class* klass) { in VerifierInstanceOf() argument
181 DCHECK(klass != NULL); in VerifierInstanceOf()
183 return klass->IsInterface() || InstanceOf(klass); in VerifierInstanceOf()
187 inline bool Object::InstanceOf(Class* klass) { in InstanceOf() argument
188 DCHECK(klass != NULL); in InstanceOf()
190 return klass->IsAssignableFrom(GetClass<kVerifyFlags>()); in InstanceOf()
764 for (mirror::Class* klass = kIsStatic ? AsClass() : GetClass(); klass != nullptr; in VisitFieldsReferences() local
765 klass = kIsStatic ? nullptr : klass->GetSuperClass()) { in VisitFieldsReferences()
767 kIsStatic ? klass->NumReferenceStaticFields() : klass->NumReferenceInstanceFields(); in VisitFieldsReferences()
769 mirror::ArtField* field = kIsStatic ? klass->GetStaticField(i) : klass->GetInstanceField(i); in VisitFieldsReferences()
[all …]
Dclass-inl.h201 inline bool Class::Implements(Class* klass) { in Implements() argument
202 DCHECK(klass != NULL); in Implements()
203 DCHECK(klass->IsInterface()) << PrettyClass(this); in Implements()
210 if (iftable->GetInterface(i) == klass) { in Implements()
342 inline bool Class::IsSubClass(Class* klass) { in IsSubClass() argument
347 if (current == klass) { in IsSubClass()
478 inline void Class::SetVerifyErrorClass(Class* klass) { in SetVerifyErrorClass() argument
479 CHECK(klass != NULL) << PrettyClass(this); in SetVerifyErrorClass()
481 SetFieldObject<true>(OFFSET_OF_OBJECT_MEMBER(Class, verify_error_class_), klass); in SetVerifyErrorClass()
483 SetFieldObject<false>(OFFSET_OF_OBJECT_MEMBER(Class, verify_error_class_), klass); in SetVerifyErrorClass()
[all …]
/art/test/004-UnsafeTest/
Dunsafe_test.cc29 mirror::Class* klass = soa.Decode<mirror::Class*>(classObj); in Java_Main_vmArrayBaseOffset() local
31 Primitive::ComponentSize(klass->GetComponentType()->GetPrimitiveType())).Int32Value(); in Java_Main_vmArrayBaseOffset()
36 mirror::Class* klass = soa.Decode<mirror::Class*>(classObj); in Java_Main_vmArrayIndexScale() local
37 return Primitive::ComponentSize(klass->GetComponentType()->GetPrimitiveType()); in Java_Main_vmArrayIndexScale()
/art/compiler/
Dcommon_compiler_test.cc277 mirror::Class* klass = class_linker_->FindClass(self, class_descriptor.c_str(), loader); in MakeExecutable() local
278 CHECK(klass != nullptr) << "Class not found " << class_name; in MakeExecutable()
279 for (size_t i = 0; i < klass->NumDirectMethods(); i++) { in MakeExecutable()
280 MakeExecutable(klass->GetDirectMethod(i)); in MakeExecutable()
282 for (size_t i = 0; i < klass->NumVirtualMethods(); i++) { in MakeExecutable()
283 MakeExecutable(klass->GetVirtualMethod(i)); in MakeExecutable()
358 mirror::Class* klass = class_linker_->FindClass(self, class_descriptor.c_str(), loader); in CompileClass() local
359 CHECK(klass != nullptr) << "Class not found " << class_name; in CompileClass()
360 for (size_t i = 0; i < klass->NumDirectMethods(); i++) { in CompileClass()
361 CompileMethod(klass->GetDirectMethod(i)); in CompileClass()
[all …]
Dimage_test.cc174 mirror::Class* klass = class_linker_->FindSystemClass(soa.Self(), descriptor); in TEST_F() local
175 EXPECT_TRUE(klass != nullptr) << descriptor; in TEST_F()
178 EXPECT_LT(image_begin, reinterpret_cast<byte*>(klass)) << descriptor; in TEST_F()
179 EXPECT_LT(reinterpret_cast<byte*>(klass), image_end) << descriptor; in TEST_F()
181 EXPECT_TRUE(reinterpret_cast<byte*>(klass) >= image_end || in TEST_F()
182 reinterpret_cast<byte*>(klass) < image_begin) << descriptor; in TEST_F()
184 EXPECT_TRUE(Monitor::IsValidLockWord(klass->GetLockWord(false))); in TEST_F()
/art/runtime/entrypoints/quick/
Dquick_alloc_entrypoints.cc37 mirror::Class* klass, mirror::ArtMethod* method, Thread* self, \
41 return AllocObjectFromCodeResolved<instrumented_bool>(klass, method, self, allocator_type); \
44 mirror::Class* klass, mirror::ArtMethod* method, Thread* self, \
48 return AllocObjectFromCodeInitialized<instrumented_bool>(klass, method, self, allocator_type); \
66 mirror::Class* klass, mirror::ArtMethod* method, int32_t component_count, Thread* self, \
70 …return AllocArrayFromCodeResolved<false, instrumented_bool>(klass, method, component_count, self, \
115 extern "C" void* art_quick_alloc_array_resolved##suffix(void* klass, void*, int32_t); \
118 extern "C" void* art_quick_alloc_object_resolved##suffix(void* klass, void* method); \
119 extern "C" void* art_quick_alloc_object_initialized##suffix(void* klass, void* method); \
124 extern "C" void* art_quick_alloc_array_resolved##suffix##_instrumented(void* klass, void*, int32_t)…
[all …]
Dquick_cast_entrypoints.cc23 extern "C" uint32_t artIsAssignableFromCode(mirror::Class* klass, mirror::Class* ref_class) in artIsAssignableFromCode() argument
25 DCHECK(klass != NULL); in artIsAssignableFromCode()
27 return klass->IsAssignableFrom(ref_class) ? 1 : 0; in artIsAssignableFromCode()
/art/runtime/gc/
Dheap-inl.h39 inline mirror::Object* Heap::AllocObjectWithAllocator(Thread* self, mirror::Class* klass, in AllocObjectWithAllocator() argument
43 CheckPreconditionsForAllocObject(klass, byte_count); in AllocObjectWithAllocator()
51 if (kCheckLargeObject && UNLIKELY(ShouldAllocLargeObject(klass, byte_count))) { in AllocObjectWithAllocator()
52 return AllocLargeObject<kInstrumented, PreFenceVisitor>(self, klass, byte_count, in AllocObjectWithAllocator()
67 obj->SetClass(klass); in AllocObjectWithAllocator()
84 &klass); in AllocObjectWithAllocator()
91 return AllocObject<kInstrumented>(self, klass, byte_count, pre_fence_visitor); in AllocObjectWithAllocator()
98 obj->SetClass(klass); in AllocObjectWithAllocator()
115 WriteBarrierField(obj, mirror::Object::ClassOffset(), klass); in AllocObjectWithAllocator()
143 Dbg::RecordAllocation(klass, bytes_allocated); in AllocObjectWithAllocator()
[all …]
Dreference_processor.cc185 void ReferenceProcessor::DelayReferenceReferent(mirror::Class* klass, mirror::Reference* ref, in DelayReferenceReferent() argument
189 DCHECK(klass != nullptr); in DelayReferenceReferent()
190 DCHECK(klass->IsTypeOfReferenceClass()); in DelayReferenceReferent()
197 if (klass->IsSoftReferenceClass()) { in DelayReferenceReferent()
199 } else if (klass->IsWeakReferenceClass()) { in DelayReferenceReferent()
201 } else if (klass->IsFinalizerReferenceClass()) { in DelayReferenceReferent()
203 } else if (klass->IsPhantomReferenceClass()) { in DelayReferenceReferent()
206 LOG(FATAL) << "Invalid reference type " << PrettyClass(klass) << " " << std::hex in DelayReferenceReferent()
207 << klass->GetAccessFlags(); in DelayReferenceReferent()
/art/runtime/interpreter/
Dinterpreter.cc142 ScopedLocalRef<jclass> klass(soa.Env(), in InterpreterJni() local
147 jresult = fn(soa.Env(), klass.get()); in InterpreterJni()
153 ScopedLocalRef<jclass> klass(soa.Env(), in InterpreterJni() local
156 fn(soa.Env(), klass.get()); in InterpreterJni()
160 ScopedLocalRef<jclass> klass(soa.Env(), in InterpreterJni() local
163 result->SetZ(fn(soa.Env(), klass.get())); in InterpreterJni()
167 ScopedLocalRef<jclass> klass(soa.Env(), in InterpreterJni() local
170 result->SetB(fn(soa.Env(), klass.get(), args[0])); in InterpreterJni()
174 ScopedLocalRef<jclass> klass(soa.Env(), in InterpreterJni() local
177 result->SetI(fn(soa.Env(), klass.get(), args[0])); in InterpreterJni()
[all …]
/art/compiler/driver/
Dcompiler_driver.cc523 mirror::Class* klass = class_linker->FindClass(self, descriptor, class_loader); in GetDexToDexCompilationlevel() local
524 if (klass == nullptr) { in GetDexToDexCompilationlevel()
535 if (klass->IsVerified()) { in GetDexToDexCompilationlevel()
538 } else if (klass->IsCompileTimeVerified()) { in GetDexToDexCompilationlevel()
540 DCHECK_EQ(klass->GetStatus(), mirror::Class::kStatusRetryVerificationAtRuntime); in GetDexToDexCompilationlevel()
686 static bool RecordImageClassesVisitor(mirror::Class* klass, void* arg) in RecordImageClassesVisitor() argument
690 image_classes->insert(klass->GetDescriptor(&temp)); in RecordImageClassesVisitor()
711 Handle<mirror::Class> klass( in LoadImageClasses() local
713 if (klass.Get() == nullptr) { in LoadImageClasses()
738 Handle<mirror::Class> klass(hs.NewHandle( in LoadImageClasses() local
[all …]
/art/runtime/gc/collector/
Dmark_sweep-inl.h38 mirror::Class* klass = obj->GetClass<kVerifyNone>(); in ScanObjectVisit() local
39 if (UNLIKELY(klass == mirror::Class::GetJavaLangClass())) { in ScanObjectVisit()
41 } else if (UNLIKELY(klass->IsArrayClass<kVerifyNone>())) { in ScanObjectVisit()
/art/runtime/native/
Ddalvik_system_VMRuntime.cc247 mirror::Class* klass = dex_cache->GetResolvedType(type_idx); in PreloadDexCachesResolveType() local
248 if (klass != NULL) { in PreloadDexCachesResolveType()
255 klass = linker->FindPrimitiveClass(class_name[0]); in PreloadDexCachesResolveType()
257 klass = linker->LookupClass(class_name, NULL); in PreloadDexCachesResolveType()
259 if (klass == NULL) { in PreloadDexCachesResolveType()
263 dex_cache->SetResolvedType(type_idx, klass); in PreloadDexCachesResolveType()
265 if (!klass->IsInitialized()) { in PreloadDexCachesResolveType()
284 Handle<mirror::Class> klass(hs.NewHandle(dex_cache->GetResolvedType(field_id.class_idx_))); in PreloadDexCachesResolveField() local
285 if (klass.Get() == NULL) { in PreloadDexCachesResolveField()
289 field = mirror::Class::FindStaticField(self, klass, dex_cache.Get(), field_idx); in PreloadDexCachesResolveField()
[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()

1234