Use the right dex cache in the SGET/SPUT fast paths.
Otherwise we get the wrong types.
Change-Id: Ibd5278e0a94c3cb96b9c2f862b0ee6dcfd0bd15e
diff --git a/src/compiler/codegen/arm/MethodCodegenDriver.cc b/src/compiler/codegen/arm/MethodCodegenDriver.cc
index a9d77ec..929bbef 100644
--- a/src/compiler/codegen/arm/MethodCodegenDriver.cc
+++ b/src/compiler/codegen/arm/MethodCodegenDriver.cc
@@ -162,7 +162,7 @@
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 @@
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 @@
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 @@
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