summaryrefslogtreecommitdiff
path: root/runtime/mirror/class-inl.h
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/mirror/class-inl.h')
-rw-r--r--runtime/mirror/class-inl.h13
1 files changed, 13 insertions, 0 deletions
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