From 9d156d500801accee919b6d51e22d6ddcdcd4a05 Mon Sep 17 00:00:00 2001 From: Mathieu Chartier Date: Thu, 6 Oct 2016 17:44:26 -0700 Subject: Move Heap parameters to ObjPtr Deleted some unused object dumping code. Test: test-art-host Bug: 31113334 Change-Id: I747220caafe6679591fd4b361d7f50383a046164 --- runtime/mirror/array-inl.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'runtime/mirror/array-inl.h') diff --git a/runtime/mirror/array-inl.h b/runtime/mirror/array-inl.h index 9d7f98fe62..7cbcac8030 100644 --- a/runtime/mirror/array-inl.h +++ b/runtime/mirror/array-inl.h @@ -100,10 +100,10 @@ class SetLengthVisitor { explicit SetLengthVisitor(int32_t length) : length_(length) { } - void operator()(Object* obj, size_t usable_size ATTRIBUTE_UNUSED) const + void operator()(ObjPtr obj, size_t usable_size ATTRIBUTE_UNUSED) const REQUIRES_SHARED(Locks::mutator_lock_) { // Avoid AsArray as object is not yet in live bitmap or allocation stack. - Array* array = down_cast(obj); + ObjPtr array = ObjPtr::DownCast(obj); // DCHECK(array->IsArrayInstance()); array->SetLength(length_); } @@ -124,10 +124,10 @@ class SetLengthToUsableSizeVisitor { component_size_shift_(component_size_shift) { } - void operator()(Object* obj, size_t usable_size) const + void operator()(ObjPtr obj, size_t usable_size) const REQUIRES_SHARED(Locks::mutator_lock_) { // Avoid AsArray as object is not yet in live bitmap or allocation stack. - Array* array = down_cast(obj); + ObjPtr array = ObjPtr::DownCast(obj); // DCHECK(array->IsArrayInstance()); int32_t length = (usable_size - header_size_) >> component_size_shift_; DCHECK_GE(length, minimum_length_); -- cgit v1.2.3-59-g8ed1b