diff options
| -rw-r--r-- | dex2oat/linker/oat_writer.h | 1 | ||||
| -rw-r--r-- | runtime/class_linker.h | 2 | ||||
| -rw-r--r-- | runtime/mirror/class-inl.h | 13 | ||||
| -rw-r--r-- | runtime/mirror/class.h | 14 |
4 files changed, 19 insertions, 11 deletions
diff --git a/dex2oat/linker/oat_writer.h b/dex2oat/linker/oat_writer.h index cc0e83a0e5..48215bbeef 100644 --- a/dex2oat/linker/oat_writer.h +++ b/dex2oat/linker/oat_writer.h @@ -19,6 +19,7 @@ #include <stdint.h> #include <cstddef> +#include <list> #include <memory> #include <vector> diff --git a/runtime/class_linker.h b/runtime/class_linker.h index f023a39b88..4f4cb4b942 100644 --- a/runtime/class_linker.h +++ b/runtime/class_linker.h @@ -17,6 +17,7 @@ #ifndef ART_RUNTIME_CLASS_LINKER_H_ #define ART_RUNTIME_CLASS_LINKER_H_ +#include <list> #include <set> #include <string> #include <unordered_map> @@ -89,6 +90,7 @@ template<class T> class ObjectLock; class Runtime; class ScopedObjectAccessAlreadyRunnable; template<size_t kNumReferences> class PACKED(4) StackHandleScope; +class Thread; enum VisitRootFlags : uint8_t; diff --git a/runtime/mirror/class-inl.h b/runtime/mirror/class-inl.h index 40c7d30707..fe498133fe 100644 --- a/runtime/mirror/class-inl.h +++ b/runtime/mirror/class-inl.h @@ -39,6 +39,7 @@ #include "runtime.h" #include "string.h" #include "subtype_check.h" +#include "thread-current-inl.h" namespace art { namespace mirror { @@ -1117,6 +1118,18 @@ inline void Class::SetClassLoader(ObjPtr<ClassLoader> new_class_loader) { } } +inline void Class::SetRecursivelyInitialized() { + DCHECK_EQ(GetLockOwnerThreadId(), Thread::Current()->GetThreadId()); + uint32_t flags = GetField32(OFFSET_OF_OBJECT_MEMBER(Class, access_flags_)); + SetAccessFlags(flags | kAccRecursivelyInitialized); +} + +inline void Class::SetHasDefaultMethods() { + DCHECK_EQ(GetLockOwnerThreadId(), Thread::Current()->GetThreadId()); + uint32_t flags = GetField32(OFFSET_OF_OBJECT_MEMBER(Class, access_flags_)); + SetAccessFlags(flags | kAccHasDefaultMethod); +} + } // namespace mirror } // namespace art diff --git a/runtime/mirror/class.h b/runtime/mirror/class.h index f7a41f7f56..d35d526dab 100644 --- a/runtime/mirror/class.h +++ b/runtime/mirror/class.h @@ -30,7 +30,6 @@ #include "object.h" #include "object_array.h" #include "read_barrier_option.h" -#include "thread-current-inl.h" namespace art { @@ -52,6 +51,7 @@ template<typename T> class ArraySlice; class Signature; class StringPiece; template<size_t kNumReferences> class PACKED(4) StackHandleScope; +class Thread; namespace mirror { @@ -223,17 +223,9 @@ class MANAGED Class final : public Object { SetAccessFlags(flags | kAccSkipHiddenapiChecks); } - ALWAYS_INLINE void SetRecursivelyInitialized() REQUIRES_SHARED(Locks::mutator_lock_) { - DCHECK_EQ(GetLockOwnerThreadId(), Thread::Current()->GetThreadId()); - uint32_t flags = GetField32(OFFSET_OF_OBJECT_MEMBER(Class, access_flags_)); - SetAccessFlags(flags | kAccRecursivelyInitialized); - } + ALWAYS_INLINE void SetRecursivelyInitialized() REQUIRES_SHARED(Locks::mutator_lock_); - ALWAYS_INLINE void SetHasDefaultMethods() REQUIRES_SHARED(Locks::mutator_lock_) { - DCHECK_EQ(GetLockOwnerThreadId(), Thread::Current()->GetThreadId()); - uint32_t flags = GetField32(OFFSET_OF_OBJECT_MEMBER(Class, access_flags_)); - SetAccessFlags(flags | kAccHasDefaultMethod); - } + ALWAYS_INLINE void SetHasDefaultMethods() REQUIRES_SHARED(Locks::mutator_lock_); ALWAYS_INLINE void SetFinalizable() REQUIRES_SHARED(Locks::mutator_lock_) { uint32_t flags = GetField32(OFFSET_OF_OBJECT_MEMBER(Class, access_flags_)); |