Start implementing jdb "locals".
This lets us show the names and types of the locals, but all the values
will show up as 0/null. We're going to have to walk the whole stack and
take callee-save frames into account to do that right.
Change-Id: Ic6e115513b6e65ae7ed4b7274e70bc514e83190a
diff --git a/src/object.h b/src/object.h
index 6a91970..98b36ab 100644
--- a/src/object.h
+++ b/src/object.h
@@ -211,8 +211,6 @@
return down_cast<const Class*>(this);
}
- bool IsClassClass() const;
-
bool IsObjectArray() const;
template<class T>
@@ -233,12 +231,7 @@
return down_cast<const Array*>(this);
}
- bool IsString() const;
-
- String* AsString() {
- DCHECK(IsString());
- return down_cast<String*>(this);
- }
+ String* AsString();
bool IsMethod() const;
@@ -1447,6 +1440,10 @@
return GetComponentType() != NULL;
}
+ bool IsClassClass() const;
+
+ bool IsStringClass() const;
+
Class* GetComponentType() const {
return GetFieldObject<Class*>(OFFSET_OF_OBJECT_MEMBER(Class, component_type_), false);
}
@@ -2126,11 +2123,6 @@
return GetClass() == java_lang_Class;
}
-inline bool Object::IsClassClass() const {
- Class* java_lang_Class = GetClass()->GetClass();
- return this == java_lang_Class;
-}
-
inline bool Object::IsObjectArray() const {
return IsArrayInstance() && !GetClass()->GetComponentType()->IsPrimitive();
}