From e4084a5eb46dc6b99c0e0b74bcdecccaceb28fe7 Mon Sep 17 00:00:00 2001 From: Nicolas Geoffray Date: Thu, 18 Feb 2016 14:43:42 +0000 Subject: 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 --- runtime/mirror/class.cc | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'runtime/mirror/class.cc') diff --git a/runtime/mirror/class.cc b/runtime/mirror/class.cc index cdc6204665..9190e44144 100644 --- a/runtime/mirror/class.cc +++ b/runtime/mirror/class.cc @@ -1048,5 +1048,11 @@ uint32_t Class::Depth() { 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 -- cgit v1.2.3-59-g8ed1b