summaryrefslogtreecommitdiff
path: root/runtime/class_linker_test.cc
diff options
context:
space:
mode:
author Alex Light <allight@google.com> 2020-01-09 10:55:49 -0800
committer Treehugger Robot <treehugger-gerrit@google.com> 2020-02-11 23:39:56 +0000
commit5e251ead219d8e9f4bb1e8c53f222f91d798d653 (patch)
tree6f7c571e468f07de198f5a8021f702ee40010c45 /runtime/class_linker_test.cc
parent8206ae846173c98b386d56ff3f290ad74a30b291 (diff)
Change j.l.r.Field to use ArtField index instead of dexFileIndex
Using the dexFileIndex to determine the ArtField a java.lang.reflect.Field object points to requires us to use a dex-cache and to update all existing Field objects if this index changes (for example due to class redefinition). This could be rather slow. This replaces the dex-file index with the index into the declaring class's SFields/IFields arrays where the specified ArtMethod is stored. Bug: 149236640 Test: ./test.py --host Change-Id: I9a7d69903ece0ea94e3b3e93b4c8a872ac4073e8
Diffstat (limited to 'runtime/class_linker_test.cc')
-rw-r--r--runtime/class_linker_test.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/runtime/class_linker_test.cc b/runtime/class_linker_test.cc
index 0969b1c50c..1e501a765b 100644
--- a/runtime/class_linker_test.cc
+++ b/runtime/class_linker_test.cc
@@ -719,8 +719,8 @@ struct AccessibleObjectOffsets : public CheckOffsets<mirror::AccessibleObject> {
struct FieldOffsets : public CheckOffsets<mirror::Field> {
FieldOffsets() : CheckOffsets<mirror::Field>(false, "Ljava/lang/reflect/Field;") {
addOffset(OFFSETOF_MEMBER(mirror::Field, access_flags_), "accessFlags");
+ addOffset(OFFSETOF_MEMBER(mirror::Field, art_field_index_), "artFieldIndex");
addOffset(OFFSETOF_MEMBER(mirror::Field, declaring_class_), "declaringClass");
- addOffset(OFFSETOF_MEMBER(mirror::Field, dex_field_index_), "dexFieldIndex");
addOffset(OFFSETOF_MEMBER(mirror::Field, offset_), "offset");
addOffset(OFFSETOF_MEMBER(mirror::Field, type_), "type");
}