• Home
  • Raw
  • Download

Lines Matching refs:mirror

54     mirror::Object* exception = self->GetException();  in AssertNonExistentClass()
56 mirror::Class* exception_class = in AssertNonExistentClass()
67 void AssertPrimitiveClass(const std::string& descriptor, mirror::Class* primitive) in AssertPrimitiveClass()
78 EXPECT_EQ(mirror::Class::kStatusInitialized, primitive->GetStatus()); in AssertPrimitiveClass()
105 mirror::ClassLoader* class_loader) in AssertArrayClass()
109 Handle<mirror::ClassLoader> loader(hs.NewHandle(class_loader)); in AssertArrayClass()
110 Handle<mirror::Class> array( in AssertArrayClass()
119 void AssertArrayClass(const std::string& array_descriptor, Handle<mirror::Class> array) in AssertArrayClass()
133 EXPECT_EQ(mirror::Class::kStatusInitialized, array->GetStatus()); in AssertArrayClass()
154 mirror::Class* direct_interface0 = mirror::Class::GetDirectInterface(self, array, 0); in AssertArrayClass()
157 mirror::Class* direct_interface1 = mirror::Class::GetDirectInterface(self, array, 1); in AssertArrayClass()
159 mirror::Class* array_ptr = array->GetComponentType(); in AssertArrayClass()
179 void AssertField(mirror::Class* klass, ArtField* field) in AssertField()
187 void AssertClass(const std::string& descriptor, Handle<mirror::Class> klass) in AssertClass()
209 EXPECT_TRUE(mirror::Class::IsInSamePackage(klass->GetDescriptor(&temp), in AssertClass()
224 mirror::IfTable* iftable = klass->GetIfTable(); in AssertClass()
226 mirror::Class* interface = iftable->GetInterface(i); in AssertClass()
290 sizeof(mirror::HeapReference<mirror::Object>)); in AssertClass()
294 mirror::Class* field_type = field->GetType<true>(); in AssertClass()
306 sizeof(mirror::HeapReference<mirror::Object>)); in AssertClass()
319 mirror::Class* k = klass.Get(); in AssertClass()
325 if (klass->GetReferenceInstanceOffsets() != mirror::Class::kClassWalkSuper) { in AssertClass()
333 void AssertDexFileClass(mirror::ClassLoader* class_loader, const std::string& descriptor) in AssertDexFileClass()
338 Handle<mirror::Class> klass( in AssertDexFileClass()
353 void AssertDexFile(const DexFile& dex, mirror::ClassLoader* class_loader) in AssertDexFile()
370 mirror::DexCache* dex_cache = class_linker_->FindDexCache(Thread::Current(), dex); in AssertDexFile()
374 mirror::DexCache::GetElementPtrSize(resolved_methods, i, sizeof(void*)) != nullptr) in AssertDexFile()
381 void VisitRoot(mirror::Object* root, const RootInfo& info ATTRIBUTE_UNUSED) OVERRIDE { in VisitRoot()
403 mirror::Class* klass = in Check()
490 struct ObjectOffsets : public CheckOffsets<mirror::Object> {
491 ObjectOffsets() : CheckOffsets<mirror::Object>(false, "Ljava/lang/Object;") { in ObjectOffsets()
492 addOffset(OFFSETOF_MEMBER(mirror::Object, klass_), "shadow$_klass_"); in ObjectOffsets()
493 addOffset(OFFSETOF_MEMBER(mirror::Object, monitor_), "shadow$_monitor_"); in ObjectOffsets()
495 addOffset(OFFSETOF_MEMBER(mirror::Object, x_rb_ptr_), "shadow$_x_rb_ptr_"); in ObjectOffsets()
496 addOffset(OFFSETOF_MEMBER(mirror::Object, x_xpadding_), "shadow$_x_xpadding_"); in ObjectOffsets()
501 struct ClassOffsets : public CheckOffsets<mirror::Class> {
502 ClassOffsets() : CheckOffsets<mirror::Class>(false, "Ljava/lang/Class;") { in ClassOffsets()
503 addOffset(OFFSETOF_MEMBER(mirror::Class, access_flags_), "accessFlags"); in ClassOffsets()
504 addOffset(OFFSETOF_MEMBER(mirror::Class, annotation_type_), "annotationType"); in ClassOffsets()
505 addOffset(OFFSETOF_MEMBER(mirror::Class, class_flags_), "classFlags"); in ClassOffsets()
506 addOffset(OFFSETOF_MEMBER(mirror::Class, class_loader_), "classLoader"); in ClassOffsets()
507 addOffset(OFFSETOF_MEMBER(mirror::Class, class_size_), "classSize"); in ClassOffsets()
508 addOffset(OFFSETOF_MEMBER(mirror::Class, clinit_thread_id_), "clinitThreadId"); in ClassOffsets()
509 addOffset(OFFSETOF_MEMBER(mirror::Class, component_type_), "componentType"); in ClassOffsets()
510 addOffset(OFFSETOF_MEMBER(mirror::Class, copied_methods_offset_), "copiedMethodsOffset"); in ClassOffsets()
511 addOffset(OFFSETOF_MEMBER(mirror::Class, dex_cache_), "dexCache"); in ClassOffsets()
512 addOffset(OFFSETOF_MEMBER(mirror::Class, dex_cache_strings_), "dexCacheStrings"); in ClassOffsets()
513 addOffset(OFFSETOF_MEMBER(mirror::Class, dex_class_def_idx_), "dexClassDefIndex"); in ClassOffsets()
514 addOffset(OFFSETOF_MEMBER(mirror::Class, dex_type_idx_), "dexTypeIndex"); in ClassOffsets()
515 addOffset(OFFSETOF_MEMBER(mirror::Class, ifields_), "iFields"); in ClassOffsets()
516 addOffset(OFFSETOF_MEMBER(mirror::Class, iftable_), "ifTable"); in ClassOffsets()
517 addOffset(OFFSETOF_MEMBER(mirror::Class, methods_), "methods"); in ClassOffsets()
518 addOffset(OFFSETOF_MEMBER(mirror::Class, name_), "name"); in ClassOffsets()
519 addOffset(OFFSETOF_MEMBER(mirror::Class, num_reference_instance_fields_), in ClassOffsets()
521 addOffset(OFFSETOF_MEMBER(mirror::Class, num_reference_static_fields_), in ClassOffsets()
523 addOffset(OFFSETOF_MEMBER(mirror::Class, object_size_), "objectSize"); in ClassOffsets()
524 addOffset(OFFSETOF_MEMBER(mirror::Class, primitive_type_), "primitiveType"); in ClassOffsets()
525 addOffset(OFFSETOF_MEMBER(mirror::Class, reference_instance_offsets_), in ClassOffsets()
527 addOffset(OFFSETOF_MEMBER(mirror::Class, sfields_), "sFields"); in ClassOffsets()
528 addOffset(OFFSETOF_MEMBER(mirror::Class, status_), "status"); in ClassOffsets()
529 addOffset(OFFSETOF_MEMBER(mirror::Class, super_class_), "superClass"); in ClassOffsets()
530 addOffset(OFFSETOF_MEMBER(mirror::Class, verify_error_), "verifyError"); in ClassOffsets()
531 addOffset(OFFSETOF_MEMBER(mirror::Class, virtual_methods_offset_), "virtualMethodsOffset"); in ClassOffsets()
532 addOffset(OFFSETOF_MEMBER(mirror::Class, vtable_), "vtable"); in ClassOffsets()
536 struct StringOffsets : public CheckOffsets<mirror::String> {
537 StringOffsets() : CheckOffsets<mirror::String>(false, "Ljava/lang/String;") { in StringOffsets()
538 addOffset(OFFSETOF_MEMBER(mirror::String, count_), "count"); in StringOffsets()
539 addOffset(OFFSETOF_MEMBER(mirror::String, hash_code_), "hash"); in StringOffsets()
543 struct ThrowableOffsets : public CheckOffsets<mirror::Throwable> {
544 ThrowableOffsets() : CheckOffsets<mirror::Throwable>(false, "Ljava/lang/Throwable;") { in ThrowableOffsets()
545 addOffset(OFFSETOF_MEMBER(mirror::Throwable, backtrace_), "backtrace"); in ThrowableOffsets()
546 addOffset(OFFSETOF_MEMBER(mirror::Throwable, cause_), "cause"); in ThrowableOffsets()
547 addOffset(OFFSETOF_MEMBER(mirror::Throwable, detail_message_), "detailMessage"); in ThrowableOffsets()
548 addOffset(OFFSETOF_MEMBER(mirror::Throwable, stack_trace_), "stackTrace"); in ThrowableOffsets()
549 addOffset(OFFSETOF_MEMBER(mirror::Throwable, suppressed_exceptions_), "suppressedExceptions"); in ThrowableOffsets()
553 struct StackTraceElementOffsets : public CheckOffsets<mirror::StackTraceElement> {
554 StackTraceElementOffsets() : CheckOffsets<mirror::StackTraceElement>( in StackTraceElementOffsets()
556 addOffset(OFFSETOF_MEMBER(mirror::StackTraceElement, declaring_class_), "declaringClass"); in StackTraceElementOffsets()
557 addOffset(OFFSETOF_MEMBER(mirror::StackTraceElement, file_name_), "fileName"); in StackTraceElementOffsets()
558 addOffset(OFFSETOF_MEMBER(mirror::StackTraceElement, line_number_), "lineNumber"); in StackTraceElementOffsets()
559 addOffset(OFFSETOF_MEMBER(mirror::StackTraceElement, method_name_), "methodName"); in StackTraceElementOffsets()
563 struct ClassLoaderOffsets : public CheckOffsets<mirror::ClassLoader> {
564 ClassLoaderOffsets() : CheckOffsets<mirror::ClassLoader>(false, "Ljava/lang/ClassLoader;") { in ClassLoaderOffsets()
565 addOffset(OFFSETOF_MEMBER(mirror::ClassLoader, allocator_), "allocator"); in ClassLoaderOffsets()
566 addOffset(OFFSETOF_MEMBER(mirror::ClassLoader, class_table_), "classTable"); in ClassLoaderOffsets()
567 addOffset(OFFSETOF_MEMBER(mirror::ClassLoader, packages_), "packages"); in ClassLoaderOffsets()
568 addOffset(OFFSETOF_MEMBER(mirror::ClassLoader, parent_), "parent"); in ClassLoaderOffsets()
569 addOffset(OFFSETOF_MEMBER(mirror::ClassLoader, proxyCache_), "proxyCache"); in ClassLoaderOffsets()
573 struct ProxyOffsets : public CheckOffsets<mirror::Proxy> {
574 ProxyOffsets() : CheckOffsets<mirror::Proxy>(false, "Ljava/lang/reflect/Proxy;") { in ProxyOffsets()
575 addOffset(OFFSETOF_MEMBER(mirror::Proxy, h_), "h"); in ProxyOffsets()
579 struct DexCacheOffsets : public CheckOffsets<mirror::DexCache> {
580 DexCacheOffsets() : CheckOffsets<mirror::DexCache>(false, "Ljava/lang/DexCache;") { in DexCacheOffsets()
581 addOffset(OFFSETOF_MEMBER(mirror::DexCache, dex_), "dex"); in DexCacheOffsets()
582 addOffset(OFFSETOF_MEMBER(mirror::DexCache, dex_file_), "dexFile"); in DexCacheOffsets()
583 addOffset(OFFSETOF_MEMBER(mirror::DexCache, location_), "location"); in DexCacheOffsets()
584 addOffset(OFFSETOF_MEMBER(mirror::DexCache, num_resolved_fields_), "numResolvedFields"); in DexCacheOffsets()
585 addOffset(OFFSETOF_MEMBER(mirror::DexCache, num_resolved_methods_), "numResolvedMethods"); in DexCacheOffsets()
586 addOffset(OFFSETOF_MEMBER(mirror::DexCache, num_resolved_types_), "numResolvedTypes"); in DexCacheOffsets()
587 addOffset(OFFSETOF_MEMBER(mirror::DexCache, num_strings_), "numStrings"); in DexCacheOffsets()
588 addOffset(OFFSETOF_MEMBER(mirror::DexCache, resolved_fields_), "resolvedFields"); in DexCacheOffsets()
589 addOffset(OFFSETOF_MEMBER(mirror::DexCache, resolved_methods_), "resolvedMethods"); in DexCacheOffsets()
590 addOffset(OFFSETOF_MEMBER(mirror::DexCache, resolved_types_), "resolvedTypes"); in DexCacheOffsets()
591 addOffset(OFFSETOF_MEMBER(mirror::DexCache, strings_), "strings"); in DexCacheOffsets()
595 struct ReferenceOffsets : public CheckOffsets<mirror::Reference> {
596 ReferenceOffsets() : CheckOffsets<mirror::Reference>(false, "Ljava/lang/ref/Reference;") { in ReferenceOffsets()
597 addOffset(OFFSETOF_MEMBER(mirror::Reference, pending_next_), "pendingNext"); in ReferenceOffsets()
598 addOffset(OFFSETOF_MEMBER(mirror::Reference, queue_), "queue"); in ReferenceOffsets()
599 addOffset(OFFSETOF_MEMBER(mirror::Reference, queue_next_), "queueNext"); in ReferenceOffsets()
600 addOffset(OFFSETOF_MEMBER(mirror::Reference, referent_), "referent"); in ReferenceOffsets()
604 struct FinalizerReferenceOffsets : public CheckOffsets<mirror::FinalizerReference> {
605 FinalizerReferenceOffsets() : CheckOffsets<mirror::FinalizerReference>( in FinalizerReferenceOffsets()
607 addOffset(OFFSETOF_MEMBER(mirror::FinalizerReference, next_), "next"); in FinalizerReferenceOffsets()
608 addOffset(OFFSETOF_MEMBER(mirror::FinalizerReference, prev_), "prev"); in FinalizerReferenceOffsets()
609 addOffset(OFFSETOF_MEMBER(mirror::FinalizerReference, zombie_), "zombie"); in FinalizerReferenceOffsets()
613 struct AccessibleObjectOffsets : public CheckOffsets<mirror::AccessibleObject> {
614 AccessibleObjectOffsets() : CheckOffsets<mirror::AccessibleObject>( in AccessibleObjectOffsets()
616 addOffset(mirror::AccessibleObject::FlagOffset().Uint32Value(), "override"); in AccessibleObjectOffsets()
620 struct FieldOffsets : public CheckOffsets<mirror::Field> {
621 FieldOffsets() : CheckOffsets<mirror::Field>(false, "Ljava/lang/reflect/Field;") { in FieldOffsets()
622 addOffset(OFFSETOF_MEMBER(mirror::Field, access_flags_), "accessFlags"); in FieldOffsets()
623 addOffset(OFFSETOF_MEMBER(mirror::Field, declaring_class_), "declaringClass"); in FieldOffsets()
624 addOffset(OFFSETOF_MEMBER(mirror::Field, dex_field_index_), "dexFieldIndex"); in FieldOffsets()
625 addOffset(OFFSETOF_MEMBER(mirror::Field, offset_), "offset"); in FieldOffsets()
626 addOffset(OFFSETOF_MEMBER(mirror::Field, type_), "type"); in FieldOffsets()
630 struct AbstractMethodOffsets : public CheckOffsets<mirror::AbstractMethod> {
631 AbstractMethodOffsets() : CheckOffsets<mirror::AbstractMethod>( in AbstractMethodOffsets()
633 addOffset(OFFSETOF_MEMBER(mirror::AbstractMethod, access_flags_), "accessFlags"); in AbstractMethodOffsets()
634 addOffset(OFFSETOF_MEMBER(mirror::AbstractMethod, art_method_), "artMethod"); in AbstractMethodOffsets()
635 addOffset(OFFSETOF_MEMBER(mirror::AbstractMethod, declaring_class_), "declaringClass"); in AbstractMethodOffsets()
636 addOffset(OFFSETOF_MEMBER(mirror::AbstractMethod, declaring_class_of_overridden_method_), in AbstractMethodOffsets()
638 addOffset(OFFSETOF_MEMBER(mirror::AbstractMethod, dex_method_index_), "dexMethodIndex"); in AbstractMethodOffsets()
685 Handle<mirror::ClassLoader> class_loader( in TEST_F()
686 hs.NewHandle(soa.Decode<mirror::ClassLoader*>(LoadDex("Nested")))); in TEST_F()
688 mirror::Class* outer = class_linker_->FindClass(soa.Self(), "LNested;", class_loader); in TEST_F()
693 mirror::Class* inner = class_linker_->FindClass(soa.Self(), "LNested$Inner;", class_loader); in TEST_F()
715 mirror::Class* JavaLangObject = class_linker_->FindSystemClass(soa.Self(), "Ljava/lang/Object;"); in TEST_F()
725 EXPECT_EQ(mirror::Class::kStatusInitialized, JavaLangObject->GetStatus()); in TEST_F()
757 Handle<mirror::ClassLoader> class_loader( in TEST_F()
758 hs.NewHandle(soa.Decode<mirror::ClassLoader*>(LoadDex("MyClass")))); in TEST_F()
760 mirror::Class* MyClass = class_linker_->FindClass(soa.Self(), "LMyClass;", class_loader); in TEST_F()
769 EXPECT_EQ(mirror::Class::kStatusResolved, MyClass->GetStatus()); in TEST_F()
811 mirror::Class* array_class = class_linker_->FindSystemClass(soa.Self(), "[Ljava/lang/String;"); in TEST_F()
812 mirror::ObjectArray<mirror::String>* array = in TEST_F()
813 mirror::ObjectArray<mirror::String>::Alloc(soa.Self(), array_class, 0); in TEST_F()
815 reinterpret_cast<uintptr_t>(array->GetRawData(sizeof(mirror::HeapReference<mirror::String>), in TEST_F()
817 if (sizeof(mirror::HeapReference<mirror::String>) == sizeof(int32_t)) { in TEST_F()
827 Handle<mirror::LongArray> long_array(hs.NewHandle(mirror::LongArray::Alloc(soa.Self(), 0))); in TEST_F()
832 Handle<mirror::DoubleArray> double_array(hs.NewHandle(mirror::DoubleArray::Alloc(soa.Self(), 0))); in TEST_F()
837 Handle<mirror::IntArray> int_array(hs.NewHandle(mirror::IntArray::Alloc(soa.Self(), 0))); in TEST_F()
842 Handle<mirror::CharArray> char_array(hs.NewHandle(mirror::CharArray::Alloc(soa.Self(), 0))); in TEST_F()
847 Handle<mirror::ShortArray> short_array(hs.NewHandle(mirror::ShortArray::Alloc(soa.Self(), 0))); in TEST_F()
859 ScopedNullHandle<mirror::ClassLoader> class_loader; in TEST_F()
860 mirror::Class* c; in TEST_F()
882 Handle<mirror::ClassLoader> class_loader_1( in TEST_F()
883 hs.NewHandle(soa.Decode<mirror::ClassLoader*>(LoadDex("MyClass")))); in TEST_F()
884 Handle<mirror::ClassLoader> class_loader_2( in TEST_F()
885 hs.NewHandle(soa.Decode<mirror::ClassLoader*>(LoadDex("MyClass")))); in TEST_F()
886 mirror::Class* MyClass_1 = class_linker_->FindClass(soa.Self(), "LMyClass;", class_loader_1); in TEST_F()
887 mirror::Class* MyClass_2 = class_linker_->FindClass(soa.Self(), "LMyClass;", class_loader_2); in TEST_F()
896 Handle<mirror::ClassLoader> class_loader( in TEST_F()
897 hs.NewHandle(soa.Decode<mirror::ClassLoader*>(LoadDex("Statics")))); in TEST_F()
898 Handle<mirror::Class> statics( in TEST_F()
910 ArtField* s0 = mirror::Class::FindStaticField(soa.Self(), statics, "s0", "Z"); in TEST_F()
915 ArtField* s1 = mirror::Class::FindStaticField(soa.Self(), statics, "s1", "B"); in TEST_F()
920 ArtField* s2 = mirror::Class::FindStaticField(soa.Self(), statics, "s2", "C"); in TEST_F()
925 ArtField* s3 = mirror::Class::FindStaticField(soa.Self(), statics, "s3", "S"); in TEST_F()
930 ArtField* s4 = mirror::Class::FindStaticField(soa.Self(), statics, "s4", "I"); in TEST_F()
935 ArtField* s5 = mirror::Class::FindStaticField(soa.Self(), statics, "s5", "J"); in TEST_F()
940 ArtField* s6 = mirror::Class::FindStaticField(soa.Self(), statics, "s6", "F"); in TEST_F()
945 ArtField* s7 = mirror::Class::FindStaticField(soa.Self(), statics, "s7", "D"); in TEST_F()
950 ArtField* s8 = mirror::Class::FindStaticField(soa.Self(), statics, "s8", in TEST_F()
955 mirror::String::AllocFromModifiedUtf8(soa.Self(), "robot")); in TEST_F()
973 Handle<mirror::ClassLoader> class_loader( in TEST_F()
974 hs.NewHandle(soa.Decode<mirror::ClassLoader*>(LoadDex("Interfaces")))); in TEST_F()
975 Handle<mirror::Class> I( in TEST_F()
977 Handle<mirror::Class> J( in TEST_F()
979 Handle<mirror::Class> K( in TEST_F()
981 Handle<mirror::Class> A( in TEST_F()
983 Handle<mirror::Class> B( in TEST_F()
1022 ArtField* Afoo = mirror::Class::FindStaticField(soa.Self(), A, "foo", "Ljava/lang/String;"); in TEST_F()
1023 ArtField* Bfoo = mirror::Class::FindStaticField(soa.Self(), B, "foo", "Ljava/lang/String;"); in TEST_F()
1024 ArtField* Jfoo = mirror::Class::FindStaticField(soa.Self(), J, "foo", "Ljava/lang/String;"); in TEST_F()
1025 ArtField* Kfoo = mirror::Class::FindStaticField(soa.Self(), K, "foo", "Ljava/lang/String;"); in TEST_F()
1042 Handle<mirror::ClassLoader> class_loader( in TEST_F()
1043 hs.NewHandle(soa.Decode<mirror::ClassLoader*>(jclass_loader))); in TEST_F()
1044 mirror::Class* klass = class_linker_->FindClass(soa.Self(), "LStaticsFromCode;", class_loader); in TEST_F()
1050 mirror::Class* uninit = ResolveVerifyAndClinit(type_idx, clinit, soa.Self(), true, false); in TEST_F()
1053 mirror::Class* init = ResolveVerifyAndClinit(type_idx, getS0, soa.Self(), true, false); in TEST_F()
1060 mirror::Class* c; in TEST_F()
1096 mirror::Class* klass = class_linker_->GetClassRoot(ClassLinker::ClassRoot(i)); in TEST_F()
1105 ScopedNullHandle<mirror::ClassLoader> class_loader; in TEST_F()
1106 mirror::Class* c; in TEST_F()
1110 EXPECT_EQ(c->GetClassSize(), mirror::Class::ClassClassSize(sizeof(void*))); in TEST_F()
1114 EXPECT_EQ(c->GetClassSize(), mirror::Object::ClassSize(sizeof(void*))); in TEST_F()
1118 EXPECT_EQ(c->GetClassSize(), mirror::String::ClassSize(sizeof(void*))); in TEST_F()
1122 EXPECT_EQ(c->GetClassSize(), mirror::DexCache::ClassSize(sizeof(void*))); in TEST_F()
1133 static void CheckVerificationAttempted(mirror::Class* c, bool preverified) in CheckVerificationAttempted()
1145 mirror::Class* JavaLangObject = class_linker_->FindSystemClass(soa.Self(), "Ljava/lang/Object;"); in TEST_F()
1157 Handle<mirror::Class> security_manager(hs.NewHandle(class_linker_->FindSystemClass( in TEST_F()
1172 Handle<mirror::ClassLoader> class_loader( in TEST_F()
1173 hs.NewHandle(soa.Decode<mirror::ClassLoader*>(LoadDex("Statics")))); in TEST_F()
1174 Handle<mirror::Class> statics( in TEST_F()
1187 Handle<mirror::ClassLoader> class_loader( in TEST_F()
1188 hs.NewHandle(soa.Decode<mirror::ClassLoader*>(LoadDex("Statics")))); in TEST_F()
1191 Handle<mirror::Class> jlo_class( in TEST_F()
1197 Handle<mirror::Class> statics( in TEST_F()
1208 MutableHandle<mirror::DexCache> dex_cache(hs.NewHandle<mirror::DexCache>(nullptr)); in TEST_F()
1212 dex_cache.Assign(down_cast<mirror::DexCache*>(soa.Self()->DecodeJObject(data.weak_root))); in TEST_F()
1222 Handle<mirror::String> location(hs.NewHandle(mirror::String::AllocFromUtf16(soa.Self(), in TEST_F()