diff options
author | 2017-12-08 16:27:49 +0000 | |
---|---|---|
committer | 2017-12-11 11:40:35 +0000 | |
commit | a64b52deb0c792b8a0d47546edb8a2f8a7816c33 (patch) | |
tree | 0f98c035e2da07a17501debc4d1f49281d2f9e41 /runtime/class_linker.h | |
parent | af94020190a2153834e30fc962e28c3b63d7ffc2 (diff) |
Do not pass DexFile to ClassLinker::Lookup/ResolveString().
The DexFile can be easily retrieved from the DexCache,
so reduce the number of arguments that need to be passed.
Test: m test-art-host-gtest
Test: testrunner.py --host --optimizing
Change-Id: I8c4cec43b31b27de7e4e94374fdd69c6d6ca6c13
Diffstat (limited to 'runtime/class_linker.h')
-rw-r--r-- | runtime/class_linker.h | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/runtime/class_linker.h b/runtime/class_linker.h index a5cde5b592..6a5768ec27 100644 --- a/runtime/class_linker.h +++ b/runtime/class_linker.h @@ -243,17 +243,15 @@ class ClassLinker { REQUIRES(!Locks::classlinker_classes_lock_) REQUIRES_SHARED(Locks::mutator_lock_); - // Resolve a String with the given index from the DexFile, storing the - // result in the DexCache. - ObjPtr<mirror::String> ResolveString(const DexFile& dex_file, - dex::StringIndex string_idx, + // Resolve a String with the given index from the DexFile associated with the given DexCache, + // storing the result in the DexCache. + ObjPtr<mirror::String> ResolveString(dex::StringIndex string_idx, Handle<mirror::DexCache> dex_cache) REQUIRES_SHARED(Locks::mutator_lock_); - // Find a String with the given index from the DexFile, storing the - // result in the DexCache if found. Return null if not found. - ObjPtr<mirror::String> LookupString(const DexFile& dex_file, - dex::StringIndex string_idx, + // Find a String with the given index from the DexFile associated with the given DexCache, + // storing the result in the DexCache if found. Return null if not found. + ObjPtr<mirror::String> LookupString(dex::StringIndex string_idx, ObjPtr<mirror::DexCache> dex_cache) REQUIRES_SHARED(Locks::mutator_lock_); |