// IndexBssMappingEntry describes a mapping of one or more indexes to their offsets in the .bss. // A sorted array of IndexBssMappingEntry is used to describe the mapping of method indexes, // type indexes or string indexes to offsets of their assigned slots in the .bss. // // The highest index and a mask are stored in a single `uint32_t index_and_mask` and the split // between the index and the mask is provided externally. The "mask" bits specify whether some // of the previous indexes are mapped to immediately preceding slots. This is permissible only // if the slots are consecutive and in the same order as indexes. // // The .bss offset of the slot associated with the highest index is stored in plain form as // `bss_offset`. If the mask specifies any smaller indexes being mapped to immediately // preceding slots, their offsets are calculated using an externally supplied size of the slot. struct IndexBssMappingEntry { static size_t IndexBits(uint32_t number_of_indexes) {
DCHECK_NE(number_of_indexes, 0u); return MinimumBitsToStore(number_of_indexes - 1u);
}
uint32_t GetMask(size_t index_bits) const {
DCHECK_LT(index_bits, 32u); // GetMask() is valid only if there is at least 1 mask bit. return index_and_mask >> index_bits;
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.