diff options
-rw-r--r-- | runtime/class_linker_test.cc | 2 | ||||
-rw-r--r-- | runtime/mirror/method_handle_impl.h | 3 |
2 files changed, 5 insertions, 0 deletions
diff --git a/runtime/class_linker_test.cc b/runtime/class_linker_test.cc index 8ae7687433..1176bb133e 100644 --- a/runtime/class_linker_test.cc +++ b/runtime/class_linker_test.cc @@ -786,6 +786,8 @@ struct MethodHandleOffsets : public CheckOffsets<mirror::MethodHandle> { struct MethodHandleImplOffsets : public CheckOffsets<mirror::MethodHandleImpl> { MethodHandleImplOffsets() : CheckOffsets<mirror::MethodHandleImpl>( false, "Ljava/lang/invoke/MethodHandleImpl;") { + addOffset(OFFSETOF_MEMBER(mirror::MethodHandleImpl, field_), "field"); + addOffset(OFFSETOF_MEMBER(mirror::MethodHandleImpl, target_), "target"); addOffset(OFFSETOF_MEMBER(mirror::MethodHandleImpl, target_class_or_info_), "targetClassOrMethodHandleInfo"); } diff --git a/runtime/mirror/method_handle_impl.h b/runtime/mirror/method_handle_impl.h index 427a20013e..b5d1d9ad25 100644 --- a/runtime/mirror/method_handle_impl.h +++ b/runtime/mirror/method_handle_impl.h @@ -22,6 +22,7 @@ #include "base/macros.h" #include "class.h" #include "method_type.h" +#include "mirror/field.h" #include "obj_ptr.h" #include "object.h" @@ -128,7 +129,9 @@ class MANAGED MethodHandleImpl : public MethodHandle { REQUIRES_SHARED(Locks::mutator_lock_) REQUIRES(!Roles::uninterruptible_); private: + HeapReference<mirror::Field> field_; HeapReference<mirror::Object> target_class_or_info_; // Unused by the runtime. + uint64_t target_; friend struct art::MethodHandleImplOffsets; // for verifying offset information DISALLOW_IMPLICIT_CONSTRUCTORS(MethodHandleImpl); |