Disable support for proxy method in nterp.

They do not fall into the regular baseline JIT path (ie they cannot have
profiling info), so just bail on them for now.

Test: 044-proxy, wifi-tests
Bug: 112676029
Bug: 157658616
Bug: 160543640
Change-Id: I292d85f5d6bfd0edaad1d26e53f85f3780254fd7
diff --git a/runtime/art_method.cc b/runtime/art_method.cc
index 135e806..cfb5928 100644
--- a/runtime/art_method.cc
+++ b/runtime/art_method.cc
@@ -762,9 +762,17 @@
           image_pointer_size);
     }
   }
-  // Clear the profiling info for the same reasons as the JIT code.
+    if (interpreter::IsNterpSupported() &&
+        (GetEntryPointFromQuickCompiledCodePtrSize(image_pointer_size) ==
+            interpreter::GetNterpEntryPoint())) {
+    // If the entrypoint is nterp, it's too early to check if the new method
+    // will support it. So for simplicity, use the interpreter bridge.
+    SetEntryPointFromQuickCompiledCodePtrSize(GetQuickToInterpreterBridge(), image_pointer_size);
+  }
+
+  // Clear the data pointer, it will be set if needed by the caller.
   if (!src->IsNative()) {
-    SetProfilingInfoPtrSize(nullptr, image_pointer_size);
+    SetDataPtrSize(nullptr, image_pointer_size);
   }
   // Clear hotness to let the JIT properly decide when to compile this method.
   hotness_count_ = 0;