Revert "Remove interpreter entrypoint in ArtMethod."
Build failures on bots. Investigating.
This reverts commit fa2c054b28d4b540c1b3651401a7a091282a015f.
Change-Id: Id65b2009aa66cb291fb8c39758a58e0b0d22616c
diff --git a/runtime/class_linker.cc b/runtime/class_linker.cc
index 0694227..23c5942 100644
--- a/runtime/class_linker.cc
+++ b/runtime/class_linker.cc
@@ -1195,9 +1195,13 @@
if (kIsDebugBuild && !method->IsRuntimeMethod()) {
CHECK(method->GetDeclaringClass() != nullptr);
}
- if (!method->IsNative() && !method->IsRuntimeMethod() && !method->IsResolutionMethod()) {
- method->SetEntryPointFromQuickCompiledCodePtrSize(GetQuickToInterpreterBridge(),
- image_pointer_size_);
+ if (!method->IsNative()) {
+ method->SetEntryPointFromInterpreterPtrSize(
+ artInterpreterToInterpreterBridge, image_pointer_size_);
+ if (!method->IsRuntimeMethod() && method != runtime->GetResolutionMethod()) {
+ method->SetEntryPointFromQuickCompiledCodePtrSize(GetQuickToInterpreterBridge(),
+ image_pointer_size_);
+ }
}
}
}
@@ -2202,6 +2206,11 @@
// Install entry point from interpreter.
bool enter_interpreter = NeedsInterpreter(method, method->GetEntryPointFromQuickCompiledCode());
+ if (enter_interpreter && !method->IsNative()) {
+ method->SetEntryPointFromInterpreter(artInterpreterToInterpreterBridge);
+ } else {
+ method->SetEntryPointFromInterpreter(artInterpreterToCompiledCodeBridge);
+ }
if (method->IsAbstract()) {
method->SetEntryPointFromQuickCompiledCode(GetQuickToInterpreterBridge());
@@ -3507,6 +3516,7 @@
// At runtime the method looks like a reference and argument saving method, clone the code
// related parameters from this method.
out->SetEntryPointFromQuickCompiledCode(GetQuickProxyInvokeHandler());
+ out->SetEntryPointFromInterpreter(artInterpreterToCompiledCodeBridge);
}
void ClassLinker::CheckProxyMethod(ArtMethod* method, ArtMethod* prototype) const {
@@ -5637,15 +5647,18 @@
const void* method_code) const {
OatFile::OatMethod oat_method = CreateOatMethod(method_code);
oat_method.LinkMethod(method);
+ method->SetEntryPointFromInterpreter(artInterpreterToCompiledCodeBridge);
}
void ClassLinker::SetEntryPointsToInterpreter(ArtMethod* method) const {
if (!method->IsNative()) {
+ method->SetEntryPointFromInterpreter(artInterpreterToInterpreterBridge);
method->SetEntryPointFromQuickCompiledCode(GetQuickToInterpreterBridge());
} else {
const void* quick_method_code = GetQuickGenericJniStub();
OatFile::OatMethod oat_method = CreateOatMethod(quick_method_code);
oat_method.LinkMethod(method);
+ method->SetEntryPointFromInterpreter(artInterpreterToCompiledCodeBridge);
}
}