diff options
author | Hiroshi Yamauchi <yamauchi@google.com> | 2015-03-20 20:49:09 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2015-03-20 20:49:11 +0000 |
commit | 3743174267159ec0c39bce1ca28c2081468dda94 (patch) | |
tree | f4e65f94ab6b0f0a823be26edc5108fd5d8862c6 /runtime/mirror | |
parent | a5bfefb1042dfd6b1338dba9287e21c7e432a61a (diff) | |
parent | e01a520fe0010f8abd344b5ed7120787d7ed1d71 (diff) | |
download | art-3743174267159ec0c39bce1ca28c2081468dda94.zip art-3743174267159ec0c39bce1ca28c2081468dda94.tar.gz art-3743174267159ec0c39bce1ca28c2081468dda94.tar.bz2 |
Merge "Assembly TLAB allocation fast path for x86_64."
Diffstat (limited to 'runtime/mirror')
-rw-r--r-- | runtime/mirror/class-inl.h | 4 | ||||
-rw-r--r-- | runtime/mirror/class.h | 6 |
2 files changed, 8 insertions, 2 deletions
diff --git a/runtime/mirror/class-inl.h b/runtime/mirror/class-inl.h index 97052f1..c368dc6 100644 --- a/runtime/mirror/class-inl.h +++ b/runtime/mirror/class-inl.h @@ -45,7 +45,7 @@ inline uint32_t Class::GetObjectSize() { bool is_variable_size = IsVariableSize<kVerifyFlags, kReadBarrierOption>(); CHECK(!is_variable_size) << " class=" << PrettyTypeOf(this); } - return GetField32(OFFSET_OF_OBJECT_MEMBER(Class, object_size_)); + return GetField32(ObjectSizeOffset()); } inline Class* Class::GetSuperClass() { @@ -523,7 +523,7 @@ inline uint32_t Class::GetAccessFlags() { << " IsArtField=" << (this == ArtField::GetJavaLangReflectArtField()) << " IsArtMethod=" << (this == ArtMethod::GetJavaLangReflectArtMethod()) << " descriptor=" << PrettyDescriptor(this); - return GetField32<kVerifyFlags>(OFFSET_OF_OBJECT_MEMBER(Class, access_flags_)); + return GetField32<kVerifyFlags>(AccessFlagsOffset()); } inline String* Class::GetName() { diff --git a/runtime/mirror/class.h b/runtime/mirror/class.h index e7f7c6e..2dff383 100644 --- a/runtime/mirror/class.h +++ b/runtime/mirror/class.h @@ -204,6 +204,9 @@ class MANAGED Class FINAL : public Object { template<VerifyObjectFlags kVerifyFlags = kDefaultVerifyFlags> ALWAYS_INLINE uint32_t GetAccessFlags() SHARED_LOCKS_REQUIRED(Locks::mutator_lock_); + static MemberOffset AccessFlagsOffset() { + return OFFSET_OF_OBJECT_MEMBER(Class, access_flags_); + } void SetAccessFlags(uint32_t new_access_flags) SHARED_LOCKS_REQUIRED(Locks::mutator_lock_); @@ -527,6 +530,9 @@ class MANAGED Class FINAL : public Object { template<VerifyObjectFlags kVerifyFlags = kDefaultVerifyFlags, ReadBarrierOption kReadBarrierOption = kWithReadBarrier> uint32_t GetObjectSize() SHARED_LOCKS_REQUIRED(Locks::mutator_lock_); + static MemberOffset ObjectSizeOffset() { + return OFFSET_OF_OBJECT_MEMBER(Class, object_size_); + } void SetObjectSize(uint32_t new_object_size) SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) { DCHECK(!IsVariableSize()); |