Use u32 in Type API (#4280)
Move from passing and returning u8 and u16 values to u32 in many of the functions. This removes a number of type conversions and gives a small compilation time speedup, around ~0.7% on my aarch64 machine. Copyright (c) 2022, Arm Limited.
This commit is contained in:
@@ -99,8 +99,8 @@ impl StackMap {
|
||||
pub fn get_bit(&self, bit_index: usize) -> bool {
|
||||
assert!(bit_index < NUM_BITS * self.bitmap.len());
|
||||
let word_index = bit_index / NUM_BITS;
|
||||
let word_offset = (bit_index % NUM_BITS) as u8;
|
||||
self.bitmap[word_index].contains(word_offset)
|
||||
let word_offset = bit_index % NUM_BITS;
|
||||
self.bitmap[word_index].contains(word_offset as u32)
|
||||
}
|
||||
|
||||
/// Returns the raw bitmap that represents this stack map.
|
||||
|
||||
Reference in New Issue
Block a user