summaryrefslogtreecommitdiffstats
path: root/runtime/mirror/class.cc
diff options
context:
space:
mode:
authorVladimir Marko <vmarko@google.com>2014-05-02 11:53:22 +0100
committerVladimir Marko <vmarko@google.com>2014-05-02 12:21:02 +0100
commit8194963098247be6bca9cc4a54dbfa65c73e8ccc (patch)
tree547cc708e06e6541676b17066023ae6f07b2049b /runtime/mirror/class.cc
parent56a341a82ece9aa4f2a071629f3e1fd1adf988ae (diff)
downloadart-8194963098247be6bca9cc4a54dbfa65c73e8ccc.zip
art-8194963098247be6bca9cc4a54dbfa65c73e8ccc.tar.gz
art-8194963098247be6bca9cc4a54dbfa65c73e8ccc.tar.bz2
Replace CountOneBits and __builtin_popcount with POPCOUNT.
Clean up utils.h, make some functions constexpr. Change-Id: I2399100280cbce81c3c4f5765f0680c1ddcb5883
Diffstat (limited to 'runtime/mirror/class.cc')
-rw-r--r--runtime/mirror/class.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/runtime/mirror/class.cc b/runtime/mirror/class.cc
index 64a849b..662303e 100644
--- a/runtime/mirror/class.cc
+++ b/runtime/mirror/class.cc
@@ -257,7 +257,7 @@ void Class::SetReferenceInstanceOffsets(uint32_t new_reference_offsets) {
for (Class* c = this; c != NULL; c = c->GetSuperClass()) {
count += c->NumReferenceInstanceFieldsDuringLinking();
}
- CHECK_EQ((size_t)__builtin_popcount(new_reference_offsets), count);
+ CHECK_EQ((size_t)POPCOUNT(new_reference_offsets), count);
}
// Not called within a transaction.
SetField32<false>(OFFSET_OF_OBJECT_MEMBER(Class, reference_instance_offsets_),
@@ -268,7 +268,7 @@ void Class::SetReferenceStaticOffsets(uint32_t new_reference_offsets) {
if (new_reference_offsets != CLASS_WALK_SUPER) {
// Sanity check that the number of bits set in the reference offset bitmap
// agrees with the number of references
- CHECK_EQ((size_t)__builtin_popcount(new_reference_offsets),
+ CHECK_EQ((size_t)POPCOUNT(new_reference_offsets),
NumReferenceStaticFieldsDuringLinking());
}
// Not called within a transaction.