From e549da59446a9fb986fbf02fe4cd2e3d610bd051 Mon Sep 17 00:00:00 2001 From: Vladimir Marko Date: Wed, 12 Feb 2014 19:19:58 +0000 Subject: Pass correct is_static to ResolveField. Change-Id: I35ca25cd1b80b09c4e1e34d30c835d7dbd249b9e --- compiler/driver/compiler_driver.cc | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'compiler/driver/compiler_driver.cc') diff --git a/compiler/driver/compiler_driver.cc b/compiler/driver/compiler_driver.cc index 61e9fbb151..9bfd17000e 100644 --- a/compiler/driver/compiler_driver.cc +++ b/compiler/driver/compiler_driver.cc @@ -980,12 +980,12 @@ static mirror::Class* ComputeCompilingMethodsClass(ScopedObjectAccess& soa, } static mirror::ArtField* ComputeFieldReferencedFromCompilingMethod( - ScopedObjectAccess& soa, const DexCompilationUnit* mUnit, uint32_t field_idx) + ScopedObjectAccess& soa, const DexCompilationUnit* mUnit, uint32_t field_idx, bool is_static) SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) { SirtRef dex_cache(soa.Self(), mUnit->GetClassLinker()->FindDexCache(*mUnit->GetDexFile())); SirtRef class_loader(soa.Self(), soa.Decode(mUnit->GetClassLoader())); return mUnit->GetClassLinker()->ResolveField(*mUnit->GetDexFile(), field_idx, dex_cache, - class_loader, false); + class_loader, is_static); } static mirror::ArtMethod* ComputeMethodReferencedFromCompilingMethod(ScopedObjectAccess& soa, @@ -1030,7 +1030,8 @@ bool CompilerDriver::ComputeInstanceFieldInfo(uint32_t field_idx, const DexCompi *field_offset = -1; *is_volatile = true; // Try to resolve field and ignore if an Incompatible Class Change Error (ie is static). - mirror::ArtField* resolved_field = ComputeFieldReferencedFromCompilingMethod(soa, mUnit, field_idx); + mirror::ArtField* resolved_field = + ComputeFieldReferencedFromCompilingMethod(soa, mUnit, field_idx, false); if (resolved_field != NULL && !resolved_field->IsStatic()) { SirtRef dex_cache(soa.Self(), resolved_field->GetDeclaringClass()->GetDexCache()); @@ -1070,7 +1071,8 @@ bool CompilerDriver::ComputeStaticFieldInfo(uint32_t field_idx, const DexCompila *is_volatile = true; *is_initialized = false; // Try to resolve field and ignore if an Incompatible Class Change Error (ie isn't static). - mirror::ArtField* resolved_field = ComputeFieldReferencedFromCompilingMethod(soa, mUnit, field_idx); + mirror::ArtField* resolved_field = + ComputeFieldReferencedFromCompilingMethod(soa, mUnit, field_idx, true); if (resolved_field != NULL && resolved_field->IsStatic()) { SirtRef dex_cache(soa.Self(), resolved_field->GetDeclaringClass()->GetDexCache()); mirror::Class* referrer_class = -- cgit v1.2.3-59-g8ed1b