Various bits of cleanup.
Most notable: PrettyField now includes the type (but, like PrettyMethod,
lets you turn this off), and there's a new PrettyClass, and PrettyType
has been renamed to PrettyTypeOf.
I've also moved the dalvik "sync" stuff into files named "monitor", and
made some of the implementation details private.
Change-Id: I39ea79b45e173f9ebbf9878bcead207766a5653f
diff --git a/src/java_lang_System.cc b/src/java_lang_System.cc
index 398eeb9..fc13839 100644
--- a/src/java_lang_System.cc
+++ b/src/java_lang_System.cc
@@ -105,7 +105,7 @@
namespace {
void ThrowArrayStoreException_NotAnArray(const char* identifier, Object* array) {
- std::string actualType(PrettyType(array));
+ std::string actualType(PrettyTypeOf(array));
Thread::Current()->ThrowNewException("Ljava/lang/ArrayStoreException;", "%s is not an array: %s", identifier, actualType.c_str());
}
@@ -153,8 +153,8 @@
if (srcComponentType->IsPrimitive() || dstComponentType->IsPrimitive()) {
// If one of the arrays holds a primitive type the other array must hold the exact same type.
if (srcComponentType->IsPrimitive() != dstComponentType->IsPrimitive() || srcComponentType != dstComponentType) {
- std::string srcType(PrettyType(srcArray));
- std::string dstType(PrettyType(dstArray));
+ std::string srcType(PrettyTypeOf(srcArray));
+ std::string dstType(PrettyTypeOf(dstArray));
self->ThrowNewException("Ljava/lang/ArrayStoreException;",
"Incompatible types: src=%s, dst=%s", srcType.c_str(), dstType.c_str());
return;
@@ -175,7 +175,7 @@
move32(dstBytes + dstPos * 8, srcBytes + srcPos * 8, length * 8);
break;
default:
- LOG(FATAL) << "Unknown primitive array type: " << PrettyType(srcArray);
+ LOG(FATAL) << "Unknown primitive array type: " << PrettyTypeOf(srcArray);
}
return;
@@ -229,8 +229,8 @@
move32(dstBytes + dstPos * width, srcBytes + srcPos * width, copyCount * width);
Heap::WriteBarrier(dstArray);
if (copyCount != length) {
- std::string actualSrcType(PrettyType(srcObj[copyCount]));
- std::string dstType(PrettyType(dstArray));
+ std::string actualSrcType(PrettyTypeOf(srcObj[copyCount]));
+ std::string dstType(PrettyTypeOf(dstArray));
self->ThrowNewException("Ljava/lang/ArrayStoreException;",
"source[%d] of type %s cannot be stored in destination array of type %s",
srcPos + copyCount, actualSrcType.c_str(), dstType.c_str());