diff options
author | Ian Rogers <irogers@google.com> | 2014-04-28 16:47:08 -0700 |
---|---|---|
committer | Ian Rogers <irogers@google.com> | 2014-04-29 14:36:28 -0700 |
commit | b0fa5dc7769c1e054032f39de0a3f6d6dd06f8cf (patch) | |
tree | 839d13ebfa7170967dd9b4abd434b7abda53da99 /runtime/mirror/class.cc | |
parent | 948740c1938860df055ddc801f20fd1707331e38 (diff) | |
download | art-b0fa5dc7769c1e054032f39de0a3f6d6dd06f8cf.zip art-b0fa5dc7769c1e054032f39de0a3f6d6dd06f8cf.tar.gz art-b0fa5dc7769c1e054032f39de0a3f6d6dd06f8cf.tar.bz2 |
Force inlining on trivial accessors.
Make volatility for GetFieldObject a template parameter.
Move some trivial mirror::String routines to a -inl.h.
Bug: 14285442
Change-Id: Ie23b11d4f18cb15a62c3bbb42837a8aaf6b68f92
Diffstat (limited to 'runtime/mirror/class.cc')
-rw-r--r-- | runtime/mirror/class.cc | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/runtime/mirror/class.cc b/runtime/mirror/class.cc index ad86e1f..64a849b 100644 --- a/runtime/mirror/class.cc +++ b/runtime/mirror/class.cc @@ -114,9 +114,9 @@ void Class::SetStatus(Status new_status, Thread* self) { } CHECK(sizeof(Status) == sizeof(uint32_t)) << PrettyClass(this); if (Runtime::Current()->IsActiveTransaction()) { - SetField32<true>(OFFSET_OF_OBJECT_MEMBER(Class, status_), new_status, false); + SetField32<true>(OFFSET_OF_OBJECT_MEMBER(Class, status_), new_status); } else { - SetField32<false>(OFFSET_OF_OBJECT_MEMBER(Class, status_), new_status, false); + SetField32<false>(OFFSET_OF_OBJECT_MEMBER(Class, status_), new_status); } // Classes that are being resolved or initialized need to notify waiters that the class status // changed. See ClassLinker::EnsureResolved and ClassLinker::WaitForInitializeClass. @@ -127,7 +127,7 @@ void Class::SetStatus(Status new_status, Thread* self) { } void Class::SetDexCache(DexCache* new_dex_cache) { - SetFieldObject<false>(OFFSET_OF_OBJECT_MEMBER(Class, dex_cache_), new_dex_cache, false); + SetFieldObject<false>(OFFSET_OF_OBJECT_MEMBER(Class, dex_cache_), new_dex_cache); } void Class::SetClassSize(uint32_t new_class_size) { @@ -136,7 +136,7 @@ void Class::SetClassSize(uint32_t new_class_size) { CHECK_GE(new_class_size, GetClassSize()) << " class=" << PrettyTypeOf(this); } // Not called within a transaction. - SetField32<false>(OFFSET_OF_OBJECT_MEMBER(Class, class_size_), new_class_size, false); + SetField32<false>(OFFSET_OF_OBJECT_MEMBER(Class, class_size_), new_class_size); } // Return the class' name. The exact format is bizarre, but it's the specified behavior for @@ -261,7 +261,7 @@ void Class::SetReferenceInstanceOffsets(uint32_t new_reference_offsets) { } // Not called within a transaction. SetField32<false>(OFFSET_OF_OBJECT_MEMBER(Class, reference_instance_offsets_), - new_reference_offsets, false); + new_reference_offsets); } void Class::SetReferenceStaticOffsets(uint32_t new_reference_offsets) { @@ -273,7 +273,7 @@ void Class::SetReferenceStaticOffsets(uint32_t new_reference_offsets) { } // Not called within a transaction. SetField32<false>(OFFSET_OF_OBJECT_MEMBER(Class, reference_static_offsets_), - new_reference_offsets, false); + new_reference_offsets); } bool Class::IsInSamePackage(const StringPiece& descriptor1, const StringPiece& descriptor2) { @@ -330,9 +330,9 @@ bool Class::IsThrowableClass() { void Class::SetClassLoader(ClassLoader* new_class_loader) { if (Runtime::Current()->IsActiveTransaction()) { - SetFieldObject<true>(OFFSET_OF_OBJECT_MEMBER(Class, class_loader_), new_class_loader, false); + SetFieldObject<true>(OFFSET_OF_OBJECT_MEMBER(Class, class_loader_), new_class_loader); } else { - SetFieldObject<false>(OFFSET_OF_OBJECT_MEMBER(Class, class_loader_), new_class_loader, false); + SetFieldObject<false>(OFFSET_OF_OBJECT_MEMBER(Class, class_loader_), new_class_loader); } } |