Move Heap parameters to ObjPtr
Deleted some unused object dumping code.
Test: test-art-host
Bug: 31113334
Change-Id: I747220caafe6679591fd4b361d7f50383a046164
diff --git a/runtime/mirror/string-inl.h b/runtime/mirror/string-inl.h
index aea6ff1..cf902af 100644
--- a/runtime/mirror/string-inl.h
+++ b/runtime/mirror/string-inl.h
@@ -43,10 +43,10 @@
explicit SetStringCountVisitor(int32_t count) : count_(count) {
}
- void operator()(Object* obj, size_t usable_size ATTRIBUTE_UNUSED) const
+ void operator()(ObjPtr<Object> obj, size_t usable_size ATTRIBUTE_UNUSED) const
REQUIRES_SHARED(Locks::mutator_lock_) {
// Avoid AsString as object is not yet in live bitmap or allocation stack.
- String* string = down_cast<String*>(obj);
+ ObjPtr<String> string = ObjPtr<String>::DownCast(obj);
string->SetCount(count_);
DCHECK(!string->IsCompressed() || kUseStringCompression);
}
@@ -63,10 +63,10 @@
: count_(count), src_array_(src_array), offset_(offset), high_byte_(high_byte) {
}
- void operator()(Object* obj, size_t usable_size ATTRIBUTE_UNUSED) const
+ void operator()(ObjPtr<Object> obj, size_t usable_size ATTRIBUTE_UNUSED) const
REQUIRES_SHARED(Locks::mutator_lock_) {
// Avoid AsString as object is not yet in live bitmap or allocation stack.
- String* string = down_cast<String*>(obj);
+ ObjPtr<String> string = ObjPtr<String>::DownCast(obj);
string->SetCount(count_);
DCHECK(!string->IsCompressed() || kUseStringCompression);
int32_t length = String::GetLengthFromCount(count_);
@@ -99,10 +99,10 @@
count_(count), src_array_(src_array), offset_(offset) {
}
- void operator()(Object* obj, size_t usable_size ATTRIBUTE_UNUSED) const
+ void operator()(ObjPtr<Object> obj, size_t usable_size ATTRIBUTE_UNUSED) const
REQUIRES_SHARED(Locks::mutator_lock_) {
// Avoid AsString as object is not yet in live bitmap or allocation stack.
- String* string = down_cast<String*>(obj);
+ ObjPtr<String> string = ObjPtr<String>::DownCast(obj);
string->SetCount(count_);
const uint16_t* const src = src_array_->GetData() + offset_;
const int32_t length = String::GetLengthFromCount(count_);
@@ -131,10 +131,10 @@
count_(count), src_string_(src_string), offset_(offset) {
}
- void operator()(Object* obj, size_t usable_size ATTRIBUTE_UNUSED) const
+ void operator()(ObjPtr<Object> obj, size_t usable_size ATTRIBUTE_UNUSED) const
REQUIRES_SHARED(Locks::mutator_lock_) {
// Avoid AsString as object is not yet in live bitmap or allocation stack.
- String* string = down_cast<String*>(obj);
+ ObjPtr<String> string = ObjPtr<String>::DownCast(obj);
string->SetCount(count_);
const int32_t length = String::GetLengthFromCount(count_);
bool compressible = kUseStringCompression && String::GetCompressionFlagFromCount(count_);