summaryrefslogtreecommitdiff
path: root/compiler/driver/compiler_driver-inl.h
diff options
context:
space:
mode:
authorVladimir Marko <vmarko@google.com>2017-12-08 14:09:45 +0000
committerVladimir Marko <vmarko@google.com>2017-12-08 17:54:25 +0000
commite11dd50ac2b5ccbf3b02213b7361f55b1f1a90da (patch)
treeea958df5f757369119cc84968f3b77210faf593f /compiler/driver/compiler_driver-inl.h
parent2ba3557b6d2ea65956f7a98e6f0fd921f35792a5 (diff)
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
Diffstat (limited to 'compiler/driver/compiler_driver-inl.h')
-rw-r--r--compiler/driver/compiler_driver-inl.h21
1 files changed, 6 insertions, 15 deletions
diff --git a/compiler/driver/compiler_driver-inl.h b/compiler/driver/compiler_driver-inl.h
index 7e118d5d85..42fc4aa5ba 100644
--- a/compiler/driver/compiler_driver-inl.h
+++ b/compiler/driver/compiler_driver-inl.h
@@ -58,13 +58,13 @@ inline ObjPtr<mirror::Class> CompilerDriver::ResolveCompilingMethodsClass(
return ResolveClass(soa, dex_cache, class_loader, referrer_method_id.class_idx_, mUnit);
}
-inline ArtField* CompilerDriver::ResolveFieldWithDexFile(
- const ScopedObjectAccess& soa, Handle<mirror::DexCache> dex_cache,
- Handle<mirror::ClassLoader> class_loader, const DexFile* dex_file,
- uint32_t field_idx, bool is_static) {
- DCHECK_EQ(dex_cache->GetDexFile(), dex_file);
+inline ArtField* CompilerDriver::ResolveField(const ScopedObjectAccess& soa,
+ Handle<mirror::DexCache> dex_cache,
+ Handle<mirror::ClassLoader> class_loader,
+ uint32_t field_idx,
+ bool is_static) {
ArtField* resolved_field = Runtime::Current()->GetClassLinker()->ResolveField(
- *dex_file, field_idx, dex_cache, class_loader, is_static);
+ field_idx, dex_cache, class_loader, is_static);
DCHECK_EQ(resolved_field == nullptr, soa.Self()->IsExceptionPending());
if (UNLIKELY(resolved_field == nullptr)) {
// Clean up any exception left by type resolution.
@@ -79,15 +79,6 @@ inline ArtField* CompilerDriver::ResolveFieldWithDexFile(
return resolved_field;
}
-inline ArtField* CompilerDriver::ResolveField(
- const ScopedObjectAccess& soa, Handle<mirror::DexCache> dex_cache,
- Handle<mirror::ClassLoader> class_loader, const DexCompilationUnit* mUnit,
- uint32_t field_idx, bool is_static) {
- DCHECK_EQ(class_loader.Get(), mUnit->GetClassLoader().Get());
- return ResolveFieldWithDexFile(soa, dex_cache, class_loader, mUnit->GetDexFile(), field_idx,
- is_static);
-}
-
inline std::pair<bool, bool> CompilerDriver::IsFastInstanceField(
ObjPtr<mirror::DexCache> dex_cache,
ObjPtr<mirror::Class> referrer_class,