pub struct Locals {
inner: SmallVec<[LocalSlot; 16]>,
}
Expand description
Solidity’s implementation uses 16 slots for locals. ref: https://docs.soliditylang.org/en/v0.8.20/internals/optimizer.html#stackcompressor
Fields§
§inner: SmallVec<[LocalSlot; 16]>
Implementations§
source§impl Locals
impl Locals
sourcepub fn offset_of(&self, index: usize) -> Result<SmallVec<[u8; 32]>>
pub fn offset_of(&self, index: usize) -> Result<SmallVec<[u8; 32]>>
Get the lower significant bytes of the byte offset of a local.
- Parameter: If the local is a parameter, the offset is relative to the offset of the calldata.
- Variable: If the local is a variable, the offset is relative to the offset of the memory.
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for Locals
impl Send for Locals
impl Sync for Locals
impl Unpin for Locals
impl UnwindSafe for Locals
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