diff options
author | Mingyao Yang <mingyao@google.com> | 2014-09-10 12:03:22 -0700 |
---|---|---|
committer | Mingyao Yang <mingyao@google.com> | 2014-09-10 14:40:37 -0700 |
commit | faff0f05fef90577c9744505555675185832aacd (patch) | |
tree | 40b5130526b80fe0a59f815f19dc2b87b0a9f879 /runtime/mirror/class.cc | |
parent | 05382d22a2ebbc95142ec2fc46e2d56b23e699ee (diff) | |
download | art-faff0f05fef90577c9744505555675185832aacd.zip art-faff0f05fef90577c9744505555675185832aacd.tar.gz art-faff0f05fef90577c9744505555675185832aacd.tar.bz2 |
Remove reference_static_offsets used for iterating through class static fields.
Since static fields are contiguous in class object and there is no need to
traverse super classes, it's not meaningful to use reference_static_offsets.
Also especially with embedded vtable/imt, static field offset can't be encoded
with an unsigned integer anyway.
A corresponding change is made to Class.java to remove the member field.
Bug: 16236588
Change-Id: I1fde3cd9efce884945876f0658c63d992164fd94
Diffstat (limited to 'runtime/mirror/class.cc')
-rw-r--r-- | runtime/mirror/class.cc | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/runtime/mirror/class.cc b/runtime/mirror/class.cc index 760d54c..e7d8163 100644 --- a/runtime/mirror/class.cc +++ b/runtime/mirror/class.cc @@ -292,18 +292,6 @@ void Class::SetReferenceInstanceOffsets(uint32_t new_reference_offsets) { new_reference_offsets); } -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)POPCOUNT(new_reference_offsets), - NumReferenceStaticFieldsDuringLinking()); - } - // Not called within a transaction. - SetField32<false>(OFFSET_OF_OBJECT_MEMBER(Class, reference_static_offsets_), - new_reference_offsets); -} - bool Class::IsInSamePackage(const StringPiece& descriptor1, const StringPiece& descriptor2) { size_t i = 0; while (descriptor1[i] != '\0' && descriptor1[i] == descriptor2[i]) { |