From 0875b0ad9825077ca7a9043552272ac0732130f2 Mon Sep 17 00:00:00 2001 From: Andra Danciu Date: Fri, 28 Aug 2020 11:49:44 +0000 Subject: X86: Extend VarHandle.get() to work with instance fields. Test: ART_HEAP_POISONING=true art/test.py --host --32 -r -t 712-varhandle-invocations Test: ART_HEAP_POISONING=false art/test.py --host --32 -r -t 712-varhandle-invocations Bug: 65872996 Change-Id: Ie64baf4d7d9bf3422c0e41b30d95ea903c2fabaa --- compiler/optimizing/instruction_builder.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'compiler/optimizing/instruction_builder.cc') diff --git a/compiler/optimizing/instruction_builder.cc b/compiler/optimizing/instruction_builder.cc index f5cdf3607b..84d79e5d2d 100644 --- a/compiler/optimizing/instruction_builder.cc +++ b/compiler/optimizing/instruction_builder.cc @@ -1174,8 +1174,8 @@ bool HInstructionBuilder::BuildInvokePolymorphic(uint32_t dex_pc, bool needs_ret_type_check = resolved_method->GetIntrinsic() == static_cast(Intrinsics::kVarHandleGet) && return_type == DataType::Type::kReference && - // VarHandle.get() is only implemented for static fields for now. - number_of_arguments == 1u; + // VarHandle.get() is only implemented for fields now. + number_of_arguments < 3u; if (needs_ret_type_check) { ScopedObjectAccess soa(Thread::Current()); ArtMethod* referrer = graph_->GetArtMethod(); -- cgit v1.2.3-59-g8ed1b