Proxy method has only one direct method and it is a constructor which
is cloned from java.lang.reflect.Proxy class together with code.
As a result its body is a compiled quick code and frame size should be
computed accordingly in contrast with other virtual methods which are
invoked through stub.
Change-Id: I0ac99b2f567b281c9342152bad1149dd6cd39480
Signed-off-by: Serguei Katkov <serguei.i.katkov@intel.com>
(cherry picked from commit
805bab1738549b2477b3ad4d9d57fd7c681451b9)
return QuickMethodFrameInfo(kStackAlignment, 0u, 0u);
}
Runtime* runtime = Runtime::Current();
- if (UNLIKELY(IsAbstract()) || UNLIKELY(IsProxyMethod())) {
+ // For Proxy method we exclude direct method (there is only one direct method - constructor).
+ // Direct method is cloned from original java.lang.reflect.Proxy class together with code
+ // and as a result it is executed as usual quick compiled method without any stubs.
+ // So the frame info should be returned as it is a quick method not a stub.
+ if (UNLIKELY(IsAbstract()) || UNLIKELY(IsProxyMethod() && !IsDirect())) {
return runtime->GetCalleeSaveMethodFrameInfo(Runtime::kRefsAndArgs);
}
if (UNLIKELY(IsRuntimeMethod())) {