pub struct RegSpan(/* private fields */);Expand description
A RegSpan of contiguous Reg indices.
§Note
- Represents an amount of contiguous
Regindices. - For the sake of space efficiency the actual number of
Regof theRegSpanis stored externally and provided inRegSpan::iterwhen there is a need to iterate over theRegof theRegSpan.
The caller is responsible for providing the correct length. Due to Wasm validation guided bytecode construction we assert that the externally stored length is valid.
Implementations§
Source§impl RegSpan
impl RegSpan
Sourcepub fn iter_sized(self, len: usize) -> RegSpanIter ⓘ
pub fn iter_sized(self, len: usize) -> RegSpanIter ⓘ
Returns a RegSpanIter yielding len Regs.
Sourcepub fn iter(self, len: u16) -> RegSpanIter ⓘ
pub fn iter(self, len: u16) -> RegSpanIter ⓘ
Returns a RegSpanIter yielding len Regs.
Sourcepub fn has_overlapping_copies(results: Self, values: Self, len: u16) -> bool
pub fn has_overlapping_copies(results: Self, values: Self, len: u16) -> bool
Returns true if copy_span results <- values has overlapping copies.
§Examples
[ ]: empty never overlaps[ 1 <- 0 ]: single element never overlaps[ 0 <- 1, 1 <- 2, 2 <- 3 ]: no overlap[ 1 <- 0, 2 <- 1 ]: overlaps!
Trait Implementations§
Source§impl Ord for RegSpan
impl Ord for RegSpan
Source§impl PartialOrd for RegSpan
impl PartialOrd for RegSpan
impl Copy for RegSpan
impl Eq for RegSpan
impl StructuralPartialEq for RegSpan
Auto Trait Implementations§
impl Freeze for RegSpan
impl RefUnwindSafe for RegSpan
impl Send for RegSpan
impl Sync for RegSpan
impl Unpin for RegSpan
impl UnwindSafe for RegSpan
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more