diff options
author | Nicolas Geoffray <ngeoffray@google.com> | 2016-02-18 14:43:42 +0000 |
---|---|---|
committer | Nicolas Geoffray <ngeoffray@google.com> | 2016-02-18 15:14:30 +0000 |
commit | e4084a5eb46dc6b99c0e0b74bcdecccaceb28fe7 (patch) | |
tree | d47f5a4ff9faae1736fc065e82d39110b9261e61 /compiler/driver/compiler_driver-inl.h | |
parent | a1f65135cd2315159ac302f904ba0c5ba0d7fd0e (diff) |
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
Diffstat (limited to 'compiler/driver/compiler_driver-inl.h')
-rw-r--r-- | compiler/driver/compiler_driver-inl.h | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/compiler/driver/compiler_driver-inl.h b/compiler/driver/compiler_driver-inl.h index 0d65bc7405..3cb63e7082 100644 --- a/compiler/driver/compiler_driver-inl.h +++ b/compiler/driver/compiler_driver-inl.h @@ -186,13 +186,7 @@ inline std::pair<bool, bool> CompilerDriver::IsClassOfStaticMemberAvailableToRef } else { // Search dex file for localized ssb index, may fail if member's class is a parent // of the class mentioned in the dex file and there is no dex cache entry. - std::string temp; - const DexFile::TypeId* type_id = - dex_file->FindTypeId(resolved_member->GetDeclaringClass()->GetDescriptor(&temp)); - if (type_id != nullptr) { - // medium path, needs check of static storage base being initialized - storage_idx = dex_file->GetIndexForTypeId(*type_id); - } + storage_idx = resolved_member->GetDeclaringClass()->FindTypeIndexInOtherDexFile(*dex_file); } if (storage_idx != DexFile::kDexNoIndex) { *storage_index = storage_idx; |