diff options
Diffstat (limited to 'compiler/optimizing/nodes.h')
-rw-r--r-- | compiler/optimizing/nodes.h | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/compiler/optimizing/nodes.h b/compiler/optimizing/nodes.h index 2477c9fe51..fd00a5e2fe 100644 --- a/compiler/optimizing/nodes.h +++ b/compiler/optimizing/nodes.h @@ -4940,10 +4940,13 @@ class HInvokePolymorphic final : public HInvoke { dex::ProtoIndex GetProtoIndex() { return proto_idx_; } - // Whether we can do direct invocation of the method handle. - bool CanHaveFastPath() const { - return GetIntrinsic() == Intrinsics::kMethodHandleInvokeExact && - GetNumberOfArguments() >= 2 && + bool IsMethodHandleInvokeExact() const { + return GetIntrinsic() == Intrinsics::kMethodHandleInvokeExact; + } + + bool CanTargetInstanceMethod() const { + DCHECK(IsMethodHandleInvokeExact()); + return GetNumberOfArguments() >= 2 && InputAt(1)->GetType() == DataType::Type::kReference; } |