From b153906f2cd770ae460a480d3c9eb7ad421ff0ae Mon Sep 17 00:00:00 2001 From: Elliott Hughes Date: Sun, 11 Sep 2011 16:14:31 -0700 Subject: Use the right dex cache in the SGET/SPUT fast paths. Otherwise we get the wrong types. Change-Id: Ibd5278e0a94c3cb96b9c2f862b0ee6dcfd0bd15e --- src/compiler/codegen/arm/MethodCodegenDriver.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/compiler/codegen/arm/MethodCodegenDriver.cc') diff --git a/src/compiler/codegen/arm/MethodCodegenDriver.cc b/src/compiler/codegen/arm/MethodCodegenDriver.cc index a9d77ec4e1..929bbef9ce 100644 --- a/src/compiler/codegen/arm/MethodCodegenDriver.cc +++ b/src/compiler/codegen/arm/MethodCodegenDriver.cc @@ -162,7 +162,7 @@ static void genSput(CompilationUnit* cUnit, MIR* mir, RegLocation rlSrc) art::ClassLinker* class_linker = art::Runtime::Current()-> GetClassLinker(); const art::DexFile& dex_file = class_linker-> - FindDexFile(field->GetDeclaringClass()->GetDexCache()); + FindDexFile(cUnit->method->GetDeclaringClass()->GetDexCache()); const art::DexFile::FieldId& field_id = dex_file.GetFieldId(fieldIdx); int typeIdx = field_id.class_idx_; // Using fixed register to sync with slow path @@ -220,7 +220,7 @@ static void genSputWide(CompilationUnit* cUnit, MIR* mir, RegLocation rlSrc) art::ClassLinker* class_linker = art::Runtime::Current()-> GetClassLinker(); const art::DexFile& dex_file = class_linker-> - FindDexFile(field->GetDeclaringClass()->GetDexCache()); + FindDexFile(cUnit->method->GetDeclaringClass()->GetDexCache()); const art::DexFile::FieldId& field_id = dex_file.GetFieldId(fieldIdx); int typeIdx = field_id.class_idx_; // Using fixed register to sync with slow path @@ -278,7 +278,7 @@ static void genSgetWide(CompilationUnit* cUnit, MIR* mir, art::ClassLinker* class_linker = art::Runtime::Current()-> GetClassLinker(); const art::DexFile& dex_file = class_linker-> - FindDexFile(field->GetDeclaringClass()->GetDexCache()); + FindDexFile(cUnit->method->GetDeclaringClass()->GetDexCache()); const art::DexFile::FieldId& field_id = dex_file.GetFieldId(fieldIdx); int typeIdx = field_id.class_idx_; // Using fixed register to sync with slow path @@ -341,7 +341,7 @@ static void genSget(CompilationUnit* cUnit, MIR* mir, art::ClassLinker* class_linker = art::Runtime::Current()-> GetClassLinker(); const art::DexFile& dex_file = class_linker-> - FindDexFile(field->GetDeclaringClass()->GetDexCache()); + FindDexFile(cUnit->method->GetDeclaringClass()->GetDexCache()); const art::DexFile::FieldId& field_id = dex_file.GetFieldId(fieldIdx); int typeIdx = field_id.class_idx_; // Using fixed register to sync with slow path -- cgit v1.2.3-59-g8ed1b