ART: Fix computation of frame size for direct proxy methods

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>
diff --git a/runtime/mirror/art_method-inl.h b/runtime/mirror/art_method-inl.h
index 84f204f..c50c703 100644
--- a/runtime/mirror/art_method-inl.h
+++ b/runtime/mirror/art_method-inl.h
@@ -347,7 +347,11 @@
     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())) {