From 104883b04617a850adf11f05e57c2fd29e09c83c Mon Sep 17 00:00:00 2001 From: Vladimir Marko Date: Fri, 9 Nov 2018 17:12:23 +0000 Subject: Clean up primitive array helpers in Object. Refactor these helpers and avoid read barriers. Remove Class::Is{Int,Long}ArrayClass() and use the Object helpers instead. Remove the AsByteSizedArray() and AsShortSizedArray() helpers that essentially break the type system and rewrite their users, adding appropriate notes. {Float,Double}Array uses in Unsafe would have previously failed a DCHECK(). Test: Additional test in 004-UnsafeTest. Test: m test-art-host-gtest Test: testrunner.py --host --optimizing Change-Id: I88b7e3df7de883f64cfc5eb437a40646f2884685 --- runtime/mirror/class_ext-inl.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'runtime/mirror/class_ext-inl.h') diff --git a/runtime/mirror/class_ext-inl.h b/runtime/mirror/class_ext-inl.h index feaac8580a..8d68dc92f9 100644 --- a/runtime/mirror/class_ext-inl.h +++ b/runtime/mirror/class_ext-inl.h @@ -32,9 +32,7 @@ void ClassExt::VisitNativeRoots(Visitor& visitor, PointerSize pointer_size) { } int32_t len = arr->GetLength(); for (int32_t i = 0; i < len; i++) { - ArtMethod* method = arr->GetElementPtrSize(i, pointer_size); + ArtMethod* method = arr->GetElementPtrSize(i, pointer_size); if (method != nullptr) { method->VisitRoots(visitor, pointer_size); } -- cgit v1.2.3-59-g8ed1b