diff options
| author | 2014-02-13 12:22:03 +0000 | |
|---|---|---|
| committer | 2014-02-13 12:22:04 +0000 | |
| commit | ab4a4f2c6eb7ad5ddb7b63677ee12a5efb16d35c (patch) | |
| tree | eb8a3781b89b124f35ae7607aec37bd7ab70817c | |
| parent | 8b8adace3511e6fd68c6ae0eb80046d68186f8eb (diff) | |
| parent | e549da59446a9fb986fbf02fe4cd2e3d610bd051 (diff) | |
Merge "Pass correct is_static to ResolveField."
| -rw-r--r-- | compiler/driver/compiler_driver.cc | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/compiler/driver/compiler_driver.cc b/compiler/driver/compiler_driver.cc index 25d5a42306..5b228173b9 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<mirror::DexCache> dex_cache(soa.Self(), mUnit->GetClassLinker()->FindDexCache(*mUnit->GetDexFile())); SirtRef<mirror::ClassLoader> class_loader(soa.Self(), soa.Decode<mirror::ClassLoader*>(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<mirror::DexCache> 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<mirror::DexCache> dex_cache(soa.Self(), resolved_field->GetDeclaringClass()->GetDexCache()); mirror::Class* referrer_class = |