diff options
author | 2016-10-06 17:44:26 -0700 | |
---|---|---|
committer | 2016-10-12 09:49:49 -0700 | |
commit | 9d156d500801accee919b6d51e22d6ddcdcd4a05 (patch) | |
tree | 92129562c0ba1673c660297f26444a4a2ad31459 /runtime/mirror/string-inl.h | |
parent | 078483d4dfd049d5b3f192a99e2dfdc355e4754f (diff) |
Move Heap parameters to ObjPtr
Deleted some unused object dumping code.
Test: test-art-host
Bug: 31113334
Change-Id: I747220caafe6679591fd4b361d7f50383a046164
Diffstat (limited to 'runtime/mirror/string-inl.h')
-rw-r--r-- | runtime/mirror/string-inl.h | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/runtime/mirror/string-inl.h b/runtime/mirror/string-inl.h index aea6ff1579..cf902af0c0 100644 --- a/runtime/mirror/string-inl.h +++ b/runtime/mirror/string-inl.h @@ -43,10 +43,10 @@ class SetStringCountVisitor { 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 @@ class SetStringCountAndBytesVisitor { : 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 @@ class SetStringCountAndValueVisitorFromCharArray { 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 @@ class SetStringCountAndValueVisitorFromString { 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_); |