Small inlining improvements.
- Use the type_index in the current dex file for classes not
defined in the current dex file.
- Make the loading of the vtable field of a class have no side effects
to enable gvn'ing it.
Note that those improvements only affect the JIT, where we don't have
checker support.
Change-Id: I519f52bd8270f2b828f0920a1214da33cf788f41
diff --git a/runtime/mirror/class.cc b/runtime/mirror/class.cc
index cdc6204..9190e44 100644
--- a/runtime/mirror/class.cc
+++ b/runtime/mirror/class.cc
@@ -1048,5 +1048,11 @@
return depth;
}
+uint32_t Class::FindTypeIndexInOtherDexFile(const DexFile& dex_file) {
+ std::string temp;
+ const DexFile::TypeId* type_id = dex_file.FindTypeId(GetDescriptor(&temp));
+ return (type_id == nullptr) ? DexFile::kDexNoIndex : dex_file.GetIndexForTypeId(*type_id);
+}
+
} // namespace mirror
} // namespace art