diff options
author | 2024-11-07 10:01:49 +0000 | |
---|---|---|
committer | 2024-11-12 14:27:31 +0000 | |
commit | 3051a5e03f32ca7aaae6041025ec60f90d41e34c (patch) | |
tree | 6d253e5c533e032ef1a43a914410d32f7e31081a /compiler/optimizing/intrinsics_x86_64.cc | |
parent | 20cdc427d5f5875c2d58f9fde775957ad2e28cfd (diff) |
Remove now unnecessary checks from invokeExact intrinsic.
Also rewrote tests to make sure that MethodHandle-s created via
const-method-handle and Java API behave identically. They can
be slightly different even if lookup is done in the same class
for the same method as const-method-handle can target copied
methods.
Bug: 297147201
Test: ./art/test/testrunner/testrunner.py -b --host --64
Test: ./art/test/testrunner/testrunner.py -b --jvm
Change-Id: I69cdf2c44f2838ee0e57eaa2e93a6ed5276c39fb
Diffstat (limited to 'compiler/optimizing/intrinsics_x86_64.cc')
-rw-r--r-- | compiler/optimizing/intrinsics_x86_64.cc | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/compiler/optimizing/intrinsics_x86_64.cc b/compiler/optimizing/intrinsics_x86_64.cc index 85c33d312f..b9d1a9f2c7 100644 --- a/compiler/optimizing/intrinsics_x86_64.cc +++ b/compiler/optimizing/intrinsics_x86_64.cc @@ -4288,17 +4288,6 @@ void IntrinsicCodeGeneratorX86_64::VisitMethodHandleInvokeExact(HInvoke* invoke) // If method is defined in the receiver's class, execute it as it is. __ j(kEqual, &execute_target_method); - __ testl(Address(temp, mirror::Class::AccessFlagsOffset()), Immediate(kAccInterface)); - // If `method`'s declaring class is not an interface, do virtual dispatch. - __ j(kZero, &do_virtual_dispatch); - - __ movl(temp, Address(method, ArtMethod::AccessFlagsOffset())); - // These flags are uint32_t and their signed value doesn't fit into int32_t (see b/377275405). - __ andl(temp, Immediate(bit_cast<int32_t, uint32_t>(kAccIntrinsic | kAccCopied))); - __ cmpl(temp, Immediate(kAccCopied)); - // If method is defined in an interface and is not copied it should be interface dispatched. - __ j(kNotEqual, slow_path->GetEntryLabel()); - __ Bind(&do_virtual_dispatch); // MethodIndex is uint16_t. __ movzxw(temp, Address(method, ArtMethod::MethodIndexOffset())); |