summaryrefslogtreecommitdiff
path: root/runtime/mirror/class.h
diff options
context:
space:
mode:
authorVladimir Marko <vmarko@google.com>2018-11-09 17:12:23 +0000
committerVladimir Marko <vmarko@google.com>2018-11-12 15:26:21 +0000
commit104883b04617a850adf11f05e57c2fd29e09c83c (patch)
tree51d436588505a3ead506d633bdf97c9b4c934ae0 /runtime/mirror/class.h
parent00e96d054e2b656d4d0f99fc141d1701af4dba23 (diff)
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
Diffstat (limited to 'runtime/mirror/class.h')
-rw-r--r--runtime/mirror/class.h14
1 files changed, 0 insertions, 14 deletions
diff --git a/runtime/mirror/class.h b/runtime/mirror/class.h
index 74fca549ea..9923cd3426 100644
--- a/runtime/mirror/class.h
+++ b/runtime/mirror/class.h
@@ -484,20 +484,6 @@ class MANAGED Class final : public Object {
template<VerifyObjectFlags kVerifyFlags = kDefaultVerifyFlags>
ALWAYS_INLINE bool IsObjectArrayClass() REQUIRES_SHARED(Locks::mutator_lock_);
- template<VerifyObjectFlags kVerifyFlags = kDefaultVerifyFlags>
- bool IsIntArrayClass() REQUIRES_SHARED(Locks::mutator_lock_) {
- constexpr auto kNewFlags = static_cast<VerifyObjectFlags>(kVerifyFlags & ~kVerifyThis);
- auto* component_type = GetComponentType<kVerifyFlags>();
- return component_type != nullptr && component_type->template IsPrimitiveInt<kNewFlags>();
- }
-
- template<VerifyObjectFlags kVerifyFlags = kDefaultVerifyFlags>
- bool IsLongArrayClass() REQUIRES_SHARED(Locks::mutator_lock_) {
- constexpr auto kNewFlags = static_cast<VerifyObjectFlags>(kVerifyFlags & ~kVerifyThis);
- auto* component_type = GetComponentType<kVerifyFlags>();
- return component_type != nullptr && component_type->template IsPrimitiveLong<kNewFlags>();
- }
-
// Creates a raw object instance but does not invoke the default constructor.
template<bool kIsInstrumented, bool kCheckAddFinalizer = true>
ALWAYS_INLINE ObjPtr<Object> Alloc(Thread* self, gc::AllocatorType allocator_type)