Revert "lambda: Add support for invoke-interface for boxed innate lambdas"

955-lambda is flaky

Bug: 24618608
Bug: 25107649

This reverts commit 457e874459ae638145cab6d572e34d48480e39d2.

Change-Id: I24884344d21d7a4262e53e3f5dba57032687ddb7
diff --git a/runtime/art_method-inl.h b/runtime/art_method-inl.h
index b6e811f..cf548ad 100644
--- a/runtime/art_method-inl.h
+++ b/runtime/art_method-inl.h
@@ -292,7 +292,7 @@
 }
 
 inline const char* ArtMethod::GetShorty(uint32_t* out_length) {
-  DCHECK(!IsProxyMethod() || IsLambdaProxyMethod());  // OK: lambda proxies use parent dex cache.
+  DCHECK(!IsProxyMethod());
   const DexFile* dex_file = GetDexFile();
   return dex_file->GetMethodShorty(dex_file->GetMethodId(GetDexMethodIndex()), out_length);
 }
@@ -354,31 +354,10 @@
 }
 
 inline const DexFile::TypeList* ArtMethod::GetParameterTypeList() {
-  // XX: Do proxy methods have a dex file?  not sure.
+  DCHECK(!IsProxyMethod());
   const DexFile* dex_file = GetDexFile();
-  const DexFile::MethodId* method_id = nullptr;
-
-  if (kIsDebugBuild) {
-    if (UNLIKELY(IsProxyMethod())) {
-      // Proxy method case.
-      CHECK(IsLambdaProxyMethod()) << "Cannot GetParameterTypeList for java.lang.reflect.Proxy";
-
-      //
-      // We do not have a method ID, so look up one of the supers we overrode,
-      // it will have the same exact parameter type list as we do.
-
-      // Lambda proxy classes have the dex cache from their single interface parent.
-      // Proxy classes have multiple interface parents, so they use the root dexcache instead.
-      //
-      // For lambda proxy classes only, get the type list data from the parent.
-      // (code happens to look the same as the usual non-proxy path).
-    }
-  }
-
-  method_id = &dex_file->GetMethodId(GetDexMethodIndex());
-  DCHECK(method_id != nullptr);
-
-  const DexFile::ProtoId& proto = dex_file->GetMethodPrototype(*method_id);
+  const DexFile::ProtoId& proto = dex_file->GetMethodPrototype(
+      dex_file->GetMethodId(GetDexMethodIndex()));
   return dex_file->GetProtoParameters(proto);
 }
 
@@ -418,20 +397,12 @@
 }
 
 inline mirror::DexCache* ArtMethod::GetDexCache() {
-  DCHECK(!IsProxyMethod() || IsLambdaProxyMethod());  // OK: lambda proxies use parent dex cache.
+  DCHECK(!IsProxyMethod());
   return GetDeclaringClass()->GetDexCache();
 }
 
 inline bool ArtMethod::IsProxyMethod() {
-  return GetDeclaringClass()->IsAnyProxyClass();
-}
-
-inline bool ArtMethod::IsReflectProxyMethod() {
-  return GetDeclaringClass()->IsReflectProxyClass();
-}
-
-inline bool ArtMethod::IsLambdaProxyMethod() {
-  return GetDeclaringClass()->IsLambdaProxyClass();
+  return GetDeclaringClass()->IsProxyClass();
 }
 
 inline ArtMethod* ArtMethod::GetInterfaceMethodIfProxy(size_t pointer_size) {
@@ -477,9 +448,9 @@
 void ArtMethod::VisitRoots(RootVisitorType& visitor, size_t pointer_size) {
   ArtMethod* interface_method = nullptr;
   mirror::Class* klass = declaring_class_.Read();
-  if (UNLIKELY(klass != nullptr && klass->IsAnyProxyClass())) {
+  if (UNLIKELY(klass != nullptr && klass->IsProxyClass())) {
     // For normal methods, dex cache shortcuts will be visited through the declaring class.
-    // However, for any proxies we need to keep the interface method alive, so we visit its roots.
+    // However, for proxies we need to keep the interface method alive, so we visit its roots.
     interface_method = mirror::DexCache::GetElementPtrSize(
         GetDexCacheResolvedMethods(pointer_size),
         GetDexMethodIndex(),