summaryrefslogtreecommitdiff
path: root/runtime/class_linker.cc
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/class_linker.cc')
-rw-r--r--runtime/class_linker.cc11
1 files changed, 11 insertions, 0 deletions
diff --git a/runtime/class_linker.cc b/runtime/class_linker.cc
index e894037ae3..2040263cc6 100644
--- a/runtime/class_linker.cc
+++ b/runtime/class_linker.cc
@@ -3838,6 +3838,17 @@ void ClassLinker::LoadMethod(const DexFile& dex_file,
} else {
dst->SetCodeItem(dst->GetDexFile()->GetCodeItem(method.GetCodeItemOffset()));
}
+ bool has_all_references = true;
+ const char* shorty = dst->GetShorty();
+ for (size_t i = 1, e = strlen(shorty); i < e; ++i) {
+ if (shorty[i] != 'L') {
+ has_all_references = false;
+ break;
+ }
+ }
+ if (has_all_references) {
+ dst->SetNterpEntryPointFastPathFlag();
+ }
} else {
dst->SetDataPtrSize(nullptr, image_pointer_size_);
DCHECK_EQ(method.GetCodeItemOffset(), 0u);