summaryrefslogtreecommitdiff
path: root/runtime/art_method.h
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/art_method.h')
-rw-r--r--runtime/art_method.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/runtime/art_method.h b/runtime/art_method.h
index 30dc09f67f..51520ddd4c 100644
--- a/runtime/art_method.h
+++ b/runtime/art_method.h
@@ -356,6 +356,14 @@ class EXPORT ArtMethod final {
}
static bool IsMemorySharedMethod(uint32_t access_flags) {
+ // There's an overlap with `kAccMemorySharedMethod` and `kAccIntrinsicBits` but that's OK as
+ // intrinsics are always in the boot image and therefore memory shared.
+ static_assert((kAccMemorySharedMethod & kAccIntrinsicBits) != 0,
+ "kAccMemorySharedMethod deliberately overlaps intrinsic bits");
+ if (IsIntrinsic(access_flags)) {
+ return true;
+ }
+
return (access_flags & kAccMemorySharedMethod) != 0;
}