diff options
author | 2016-02-24 16:39:26 +0000 | |
---|---|---|
committer | 2016-02-25 14:40:21 +0000 | |
commit | 1bbdfd73a98b149c31f8a80888c7ee9ab2587630 (patch) | |
tree | f23816b520fd4b2a9b47642ac16bf37c5cec512f /runtime/base/bit_vector.h | |
parent | 7dc11782ff0a5dffcd8108f256f8975f0b3e8076 (diff) |
Verify encoded stack maps in debug builds.
Read all stack map data back after we write it and DCHECK the content.
Change-Id: Ia679594ac9e5805f6d4c56686030af153b45ea8b
Diffstat (limited to 'runtime/base/bit_vector.h')
-rw-r--r-- | runtime/base/bit_vector.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/runtime/base/bit_vector.h b/runtime/base/bit_vector.h index 9b55e708c8..424ebb70f6 100644 --- a/runtime/base/bit_vector.h +++ b/runtime/base/bit_vector.h @@ -229,6 +229,11 @@ class BitVector { */ int GetHighestBitSet() const; + // Minimum number of bits required to store this vector, 0 if none are set. + size_t GetNumberOfBits() const { + return GetHighestBitSet() + 1; + } + // Is bit set in storage. (No range check.) static bool IsBitSet(const uint32_t* storage, uint32_t idx) { return (storage[WordIndex(idx)] & BitMask(idx)) != 0; |