Add instance field get/put test
Still need to handle unresolved at compile-time case.
Change-Id: I4d9c82c4bbe4810aaa147ac19418706635a29a7f
diff --git a/src/compiler/Frontend.cc b/src/compiler/Frontend.cc
index 954f685..6c31cfe 100644
--- a/src/compiler/Frontend.cc
+++ b/src/compiler/Frontend.cc
@@ -703,6 +703,12 @@
if (PrettyMethod(method).find("virtualCall") != std::string::npos) {
compiling = true;
}
+ if (PrettyMethod(method).find("getFoo") != std::string::npos) {
+ compiling = true;
+ }
+ if (PrettyMethod(method).find("setFoo") != std::string::npos) {
+ compiling = true;
+ }
if (PrettyMethod(method).find("IntMath.<init>") != std::string::npos) {
compiling = true;
}
diff --git a/src/compiler/codegen/arm/Thumb2/Gen.cc b/src/compiler/codegen/arm/Thumb2/Gen.cc
index eb136b8..16adae7 100644
--- a/src/compiler/codegen/arm/Thumb2/Gen.cc
+++ b/src/compiler/codegen/arm/Thumb2/Gen.cc
@@ -374,13 +374,7 @@
Field* fieldPtr = cUnit->method->GetDeclaringClass()->GetDexCache()->
GetResolvedField(mir->dalvikInsn.vC);
if (fieldPtr == NULL) {
- /*
- * With current scheme, we should never be in a situation
- * in which the fieldPtr is null here. If something changes
- * and we need to handle it, generate code to load the field
- * pointer at run-time.
- */
- LOG(FATAL) << "Unexpected null field pointer";
+ UNIMPLEMENTED(FATAL) << "Need to handle unresolved field";
}
#if ANDROID_SMP != 0
bool isVolatile = dvmIsVolatileField(fieldPtr);
@@ -409,13 +403,7 @@
Field* fieldPtr = cUnit->method->GetDeclaringClass()->GetDexCache()->
GetResolvedField(mir->dalvikInsn.vC);
if (fieldPtr == NULL) {
- /*
- * With current scheme, we should never be in a situation
- * in which the fieldPtr is null here. If something changes
- * and we need to handle it, generate code to load the field
- * pointer at run-time.
- */
- LOG(FATAL) << "Unexpected null field pointer";
+ UNIMPLEMENTED(FATAL) << "Need to handle unresolved field";
}
#if ANDROID_SMP != 0
bool isVolatile = dvmIsVolatileField(fieldPtr);
@@ -445,13 +433,7 @@
Field* fieldPtr = cUnit->method->GetDeclaringClass()->GetDexCache()->
GetResolvedField(mir->dalvikInsn.vC);
if (fieldPtr == NULL) {
- /*
- * With current scheme, we should never be in a situation
- * in which the fieldPtr is null here. If something changes
- * and we need to handle it, generate code to load the field
- * pointer at run-time.
- */
- LOG(FATAL) << "Unexpected null field pointer";
+ UNIMPLEMENTED(FATAL) << "Need to handle unresolved field";
}
#if ANDROID_SMP != 0
bool isVolatile = dvmIsVolatileField(fieldPtr);
@@ -486,13 +468,7 @@
Field* fieldPtr = cUnit->method->GetDeclaringClass()->GetDexCache()->
GetResolvedField(mir->dalvikInsn.vC);
if (fieldPtr == NULL) {
- /*
- * With current scheme, we should never be in a situation
- * in which the fieldPtr is null here. If something changes
- * and we need to handle it, generate code to load the field
- * pointer at run-time.
- */
- LOG(FATAL) << "Unexpected null field pointer";
+ UNIMPLEMENTED(FATAL) << "Need to handle unresolved field";
}
#if ANDROID_SMP != 0
bool isVolatile = dvmIsVolatileField(fieldPtr);