From e11dd50ac2b5ccbf3b02213b7361f55b1f1a90da Mon Sep 17 00:00:00 2001 From: Vladimir Marko Date: Fri, 8 Dec 2017 14:09:45 +0000 Subject: Do not pass DexFile to ClassLinker::ResolveField*(). 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: I0579db64c63afea789c7c9ad8db81e37c9248e97 --- compiler/driver/compiler_driver.h | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) (limited to 'compiler/driver/compiler_driver.h') diff --git a/compiler/driver/compiler_driver.h b/compiler/driver/compiler_driver.h index ce7ec4520d..ab788e326f 100644 --- a/compiler/driver/compiler_driver.h +++ b/compiler/driver/compiler_driver.h @@ -232,17 +232,11 @@ class CompilerDriver { // Resolve a field. Returns null on failure, including incompatible class change. // NOTE: Unlike ClassLinker's ResolveField(), this method enforces is_static. - ArtField* ResolveField( - const ScopedObjectAccess& soa, Handle dex_cache, - Handle class_loader, const DexCompilationUnit* mUnit, - uint32_t field_idx, bool is_static) - REQUIRES_SHARED(Locks::mutator_lock_); - - // Resolve a field with a given dex file. - ArtField* ResolveFieldWithDexFile( - const ScopedObjectAccess& soa, Handle dex_cache, - Handle class_loader, const DexFile* dex_file, - uint32_t field_idx, bool is_static) + ArtField* ResolveField(const ScopedObjectAccess& soa, + Handle dex_cache, + Handle class_loader, + uint32_t field_idx, + bool is_static) REQUIRES_SHARED(Locks::mutator_lock_); // Can we fast-path an IGET/IPUT access to an instance field? If yes, compute the field offset. @@ -271,9 +265,9 @@ class CompilerDriver { REQUIRES(!Locks::mutator_lock_); ArtField* ComputeInstanceFieldInfo(uint32_t field_idx, - const DexCompilationUnit* mUnit, - bool is_put, - const ScopedObjectAccess& soa) + const DexCompilationUnit* mUnit, + bool is_put, + const ScopedObjectAccess& soa) REQUIRES_SHARED(Locks::mutator_lock_); -- cgit v1.2.3-59-g8ed1b