Home
last modified time | relevance | path

Searched refs:field (Results 1 – 25 of 62) sorted by relevance

123

/art/runtime/entrypoints/portable/
Dportable_field_entrypoints.cc28 mirror::ArtField* field = FindFieldFast(field_idx, in art_portable_set32_static_from_code() local
32 if (LIKELY(field != NULL)) { in art_portable_set32_static_from_code()
34 field->Set32<false>(field->GetDeclaringClass(), new_value); in art_portable_set32_static_from_code()
37 field = FindFieldFromCode<StaticPrimitiveWrite, true>(field_idx, referrer, Thread::Current(), in art_portable_set32_static_from_code()
39 if (LIKELY(field != NULL)) { in art_portable_set32_static_from_code()
41 field->Set32<false>(field->GetDeclaringClass(), new_value); in art_portable_set32_static_from_code()
51 …mirror::ArtField* field = FindFieldFast(field_idx, referrer, StaticPrimitiveWrite, sizeof(uint64_t… in art_portable_set64_static_from_code() local
52 if (LIKELY(field != NULL)) { in art_portable_set64_static_from_code()
54 field->Set64<false>(field->GetDeclaringClass(), new_value); in art_portable_set64_static_from_code()
57 field = FindFieldFromCode<StaticPrimitiveWrite, true>(field_idx, referrer, Thread::Current(), in art_portable_set64_static_from_code()
[all …]
/art/runtime/entrypoints/quick/
Dquick_field_entrypoints.cc32 mirror::ArtField* field = FindFieldFast(field_idx, referrer, StaticPrimitiveRead, in artGet32StaticFromCode() local
34 if (LIKELY(field != NULL)) { in artGet32StaticFromCode()
35 return field->Get32(field->GetDeclaringClass()); in artGet32StaticFromCode()
38 field = FindFieldFromCode<StaticPrimitiveRead, true>(field_idx, referrer, self, sizeof(int32_t)); in artGet32StaticFromCode()
39 if (LIKELY(field != NULL)) { in artGet32StaticFromCode()
40 return field->Get32(field->GetDeclaringClass()); in artGet32StaticFromCode()
49 mirror::ArtField* field = FindFieldFast(field_idx, referrer, StaticPrimitiveRead, in artGet64StaticFromCode() local
51 if (LIKELY(field != NULL)) { in artGet64StaticFromCode()
52 return field->Get64(field->GetDeclaringClass()); in artGet64StaticFromCode()
55 field = FindFieldFromCode<StaticPrimitiveRead, true>(field_idx, referrer, self, sizeof(int64_t)); in artGet64StaticFromCode()
[all …]
/art/test/046-reflect/src/
DMain.java53 void printFieldInfo(Field field) { in printFieldInfo() argument
54 System.out.println("Field name is " + field.getName()); in printFieldInfo()
56 + field.getDeclaringClass().getName()); in printFieldInfo()
57 System.out.println(" Field type is " + field.getType().getName()); in printFieldInfo()
59 + Integer.toHexString(field.getModifiers())); in printFieldInfo()
67 Field field = null; in showStrings() local
69 field = target.getField("string1"); in showStrings()
70 one = (String) field.get(instance); in showStrings()
72 field = target.getField("string2"); in showStrings()
73 two = (String) field.get(instance); in showStrings()
[all …]
/art/test/035-enum/src/
DMain.java26 Field field; in main() local
28 field = Shubbery.class.getDeclaredField("CRAWLING"); in main()
33 System.out.println("found field " + field.getName()); in main()
34 System.out.println(" synthetic? " + field.isSynthetic()); in main()
35 System.out.println(" enum? " + field.isEnumConstant()); in main()
/art/test/064-field-access/src/
DMain.java51 public Object getValue(Field field, Object obj, char type, in getValue() argument
57 result = field.getBoolean(obj); in getValue()
60 result = field.getByte(obj); in getValue()
63 result = field.getShort(obj); in getValue()
66 result = field.getChar(obj); in getValue()
69 result = field.getInt(obj); in getValue()
72 result = field.getLong(obj); in getValue()
75 result = field.getFloat(obj); in getValue()
78 result = field.getDouble(obj); in getValue()
81 result = field.get(obj); in getValue()
[all …]
/art/test/128-reg-spilling-on-implicit-nullcheck/src/
DMain.java27 t7q = f.field; in main()
42 public int field; field in TestClass
43 public void meth() {field = 1;} in meth()
/art/test/073-mismatched-field/
Dinfo.txt1 Test behavior when an instance field is overlapped (through separate
2 compilation) by a static field. The VM is expected to detect the conflict
3 and throw an IncompatibleClassChangeError when the field is accessed.
/art/test/005-annotations/src/android/test/anno/
DTestAnnotations.java103 Field field; in testArrays() local
107 field = TestAnnotations.class.getDeclaredField("thing1"); in testArrays()
108 annotations = field.getAnnotations(); in testArrays()
109 System.out.println(field + ": " + annotations[0].toString()); in testArrays()
111 field = TestAnnotations.class.getDeclaredField("thing2"); in testArrays()
112 annotations = field.getAnnotations(); in testArrays()
113 System.out.println(field + ": " + annotations[0].toString()); in testArrays()
/art/runtime/mirror/
Dobject.cc211 ArtField* field = fields->Get(i); in CheckFieldAssignmentImpl() local
212 if (field->GetOffset().Int32Value() == field_offset.Int32Value()) { in CheckFieldAssignmentImpl()
213 CHECK_NE(field->GetTypeAsPrimitiveType(), Primitive::kPrimNot); in CheckFieldAssignmentImpl()
215 FieldHelper fh(hs.NewHandle(field)); in CheckFieldAssignmentImpl()
231 ArtField* field = fields->Get(i); in CheckFieldAssignmentImpl() local
232 if (field->GetOffset().Int32Value() == field_offset.Int32Value()) { in CheckFieldAssignmentImpl()
233 CHECK_NE(field->GetTypeAsPrimitiveType(), Primitive::kPrimNot); in CheckFieldAssignmentImpl()
235 FieldHelper fh(hs.NewHandle(field)); in CheckFieldAssignmentImpl()
Dart_field.cc68 mirror::ArtField* field = instance_fields->GetWithoutChecks(i); in FindInstanceFieldWithOffset() local
69 if (field->GetOffset().Uint32Value() == field_offset) { in FindInstanceFieldWithOffset()
70 return field; in FindInstanceFieldWithOffset()
Ddex_cache.h117 ArtField* field = GetResolvedFields()->Get(field_idx); in GetResolvedField() local
118 if (UNLIKELY(field == nullptr || field->GetDeclaringClass()->IsErroneous())) { in GetResolvedField()
121 return field; in GetResolvedField()
/art/runtime/
Ddex_file.cc493 const DexFile::FieldId& field = GetFieldId(mid); in FindFieldId() local
494 if (class_idx > field.class_idx_) { in FindFieldId()
496 } else if (class_idx < field.class_idx_) { in FindFieldId()
499 if (name_idx > field.name_idx_) { in FindFieldId()
501 } else if (name_idx < field.name_idx_) { in FindFieldId()
504 if (type_idx > field.type_idx_) { in FindFieldId()
506 } else if (type_idx < field.type_idx_) { in FindFieldId()
509 return &field; in FindFieldId()
1201 void EncodedStaticFieldValueIterator::ReadValueToField(mirror::ArtField* field) const { in ReadValueToField()
1203 … case kBoolean: field->SetBoolean<kTransactionActive>(field->GetDeclaringClass(), jval_.z); break; in ReadValueToField()
[all …]
Dcommon_throws.cc330 mirror::ArtField* field, bool is_read) { in ThrowNullPointerExceptionForFieldAccess() argument
333 << " field '" << PrettyField(field, true) << "' on a null object reference"; in ThrowNullPointerExceptionForFieldAccess()
414 mirror::ArtField* field = in ThrowNullPointerExceptionFromDexPC() local
417 ThrowNullPointerExceptionForFieldAccess(throw_location, field, true /* read */); in ThrowNullPointerExceptionFromDexPC()
425 mirror::ArtField* field = in ThrowNullPointerExceptionFromDexPC() local
428 if (field != NULL) { in ThrowNullPointerExceptionFromDexPC()
430 ThrowNullPointerExceptionForFieldAccess(throw_location, field, true /* read */); in ThrowNullPointerExceptionFromDexPC()
445 mirror::ArtField* field = in ThrowNullPointerExceptionFromDexPC() local
448 ThrowNullPointerExceptionForFieldAccess(throw_location, field, false /* write */); in ThrowNullPointerExceptionFromDexPC()
456 mirror::ArtField* field = in ThrowNullPointerExceptionFromDexPC() local
[all …]
Dinstrumentation.h86 uint32_t dex_pc, mirror::ArtField* field) = 0;
90 … uint32_t dex_pc, mirror::ArtField* field, const JValue& field_value) = 0;
295 mirror::ArtField* field) const in FieldReadEvent() argument
298 FieldReadEventImpl(thread, this_object, method, dex_pc, field); in FieldReadEvent()
305 mirror::ArtField* field, const JValue& field_value) const in FieldWriteEvent() argument
308 FieldWriteEventImpl(thread, this_object, method, dex_pc, field, field_value); in FieldWriteEvent()
371 mirror::ArtField* field) const
375 mirror::ArtField* field, const JValue& field_value) const
Dclass_linker_test.cc175 void AssertField(mirror::Class* klass, mirror::ArtField* field) in AssertField() argument
177 EXPECT_TRUE(field != NULL); in AssertField()
178 EXPECT_TRUE(field->GetClass() != NULL); in AssertField()
179 EXPECT_EQ(klass, field->GetDeclaringClass()); in AssertField()
180 EXPECT_TRUE(field->GetName() != NULL); in AssertField()
182 FieldHelper fh(hs.NewHandle(field)); in AssertField()
266 mirror::ArtField* field = klass->GetInstanceField(i); in AssertClass() local
267 AssertField(klass.Get(), field); in AssertClass()
268 EXPECT_FALSE(field->IsStatic()); in AssertClass()
272 mirror::ArtField* field = klass->GetStaticField(i); in AssertClass() local
[all …]
Dscoped_thread_state_change.h150 mirror::ArtField* field = reinterpret_cast<mirror::ArtField*>(fid); in DecodeField() local
151 return ReadBarrier::BarrierForRoot<mirror::ArtField, kWithReadBarrier>(&field); in DecodeField()
154 jfieldID EncodeField(mirror::ArtField* field) const in EncodeField() argument
159 return reinterpret_cast<jfieldID>(field); in EncodeField()
/art/test/067-preemptive-unpark/src/
DMain.java50 Field field = Unsafe.class.getDeclaredField("THE_ONE"); in setUp() local
51 field.setAccessible(true); in setUp()
53 UNSAFE = (Unsafe) field.get(null); in setUp()
/art/test/069-field-type/
Dinfo.txt2 inappropriate object type in an instance field. By compiling two
3 versions of the field-holder class we can bypass the compiler's type
/art/runtime/quick/
Dinline_method_analyser.cc335 mirror::ArtField* field = dex_cache->GetResolvedField(field_idx); in ComputeSpecialAccessorInfo() local
336 if (method == nullptr || field == nullptr || field->IsStatic()) { in ComputeSpecialAccessorInfo()
340 mirror::Class* field_class = field->GetDeclaringClass(); in ComputeSpecialAccessorInfo()
341 if (!method_class->CanAccessResolvedField(field_class, field, dex_cache, field_idx) || in ComputeSpecialAccessorInfo()
342 (is_put && field->IsFinal() && method_class != field_class)) { in ComputeSpecialAccessorInfo()
345 DCHECK_GE(field->GetOffset().Int32Value(), 0); in ComputeSpecialAccessorInfo()
347 result->field_offset = field->GetOffset().Int32Value(); in ComputeSpecialAccessorInfo()
348 result->is_volatile = field->IsVolatile(); in ComputeSpecialAccessorInfo()
/art/test/201-built-in-exception-detail-messages/src/
DMain.java357 Field field = A.class.getField("b"); in reflection() local
358 field.set(new A(), 5); in reflection()
366 Field field = A.class.getField("i"); in reflection() local
367 field.set(new A(), null); in reflection()
375 Field field = A.class.getField("i"); in reflection() local
376 field.set(new A(), "hello, world!"); in reflection()
/art/test/064-field-access/
Dinfo.txt4 attempting to set a protected field from an unrelated class causes an
6 the field causes an IllegalArgumentException. If code does both at the
/art/runtime/gc/accounting/
Dspace_bitmap.cc194 mirror::ArtField* field = fields->Get(i); in WalkInstanceFields() local
195 if (!field->IsPrimitiveType()) { in WalkInstanceFields()
196 mirror::Object* value = field->GetObj(obj); in WalkInstanceFields()
223 mirror::ArtField* field = fields->Get(i); in WalkFieldsInOrder() local
224 if (!field->IsPrimitiveType()) { in WalkFieldsInOrder()
225 mirror::Object* value = field->GetObj(NULL); in WalkFieldsInOrder()
/art/test/004-JniTest/
Djni_test.cc83 jfieldID field = env->GetStaticFieldID(clazz, "testFindFieldOnAttachedNativeThreadField", "Z"); in testFindFieldOnAttachedNativeThread() local
84 assert(field != nullptr); in testFindFieldOnAttachedNativeThread()
87 env->SetStaticBooleanField(clazz, field, JNI_TRUE); in testFindFieldOnAttachedNativeThread()
113 jobject field = env->CallObjectMethod(clazz, getFieldMetodId, field_name); in testReflectFieldGetFromAttachedNativeThread() local
114 assert(field != nullptr); in testReflectFieldGetFromAttachedNativeThread()
126 jboolean value = env->CallBooleanMethod(field, getBooleanMetodId, /* ignored */ clazz); in testReflectFieldGetFromAttachedNativeThread()
/art/test/110-field-access/
Dinfo.txt1 Test code generation for field accesses.
/art/test/035-enum/
Dexpected.txt1 found field CRAWLING

123