Slow ART.
Run ART with the interpreter for all but boot.oat code.
Change-Id: I1654ecff6769a6c754f713be7580717d5ce07dc1
diff --git a/src/class_linker.cc b/src/class_linker.cc
index 76b3177..39fefcb 100644
--- a/src/class_linker.cc
+++ b/src/class_linker.cc
@@ -1561,7 +1561,12 @@
// Special case to get oat code without overwriting a trampoline.
const void* ClassLinker::GetOatCodeFor(const mirror::AbstractMethod* method) {
CHECK(Runtime::Current()->IsCompiler() || method->GetDeclaringClass()->IsInitializing());
- return GetOatMethodFor(method).GetCode();
+ const void* result = GetOatMethodFor(method).GetCode();
+ if (result == NULL) {
+ // No code? You must mean to go into the interpreter.
+ result = GetInterpreterEntryPoint();
+ }
+ return result;
}
const void* ClassLinker::GetOatCodeFor(const DexFile& dex_file, uint32_t method_idx) {
@@ -1611,8 +1616,10 @@
}
} else if (method->GetCode() == trampoline) {
const void* code = oat_class->GetOatMethod(method_index).GetCode();
- CHECK(code != NULL)
- << "Resolving a static trampoline but found no code for: " << PrettyMethod(method);
+ if (code == NULL) {
+ // No code? You must mean to go into the interpreter.
+ code = GetInterpreterEntryPoint();
+ }
method->SetCode(code);
}
method_index++;
@@ -1646,6 +1653,11 @@
Instrumentation* instrumentation = Runtime::Current()->GetInstrumentation();
instrumentation->SaveAndUpdateCode(method.get());
}
+
+ if (method->GetCode() == NULL) {
+ // No code? You must mean to go into the interpreter.
+ method->SetCode(GetInterpreterEntryPoint());
+ }
}
void ClassLinker::LoadClass(const DexFile& dex_file,