[−][src]Trait rustc_middle::mir::interpret::pointer::PointerArithmetic

pub trait PointerArithmetic: HasDataLayout {
    pub fn pointer_size(&self) -> Size { ... }
pub fn machine_usize_max(&self) -> u64 { ... }
pub fn machine_isize_min(&self) -> i64 { ... }
pub fn machine_isize_max(&self) -> i64 { ... }
pub fn truncate_to_ptr(&self, (val, over): (u64, bool)) -> (u64, bool) { ... }
pub fn overflowing_offset(&self, val: u64, i: u64) -> (u64, bool) { ... }
pub fn overflowing_signed_offset(&self, val: u64, i: i64) -> (u64, bool) { ... }
pub fn offset<'tcx>(&self, val: u64, i: u64) -> InterpResult<'tcx, u64> { ... }
pub fn signed_offset<'tcx>(
        &self,
        val: u64,
        i: i64
    ) -> InterpResult<'tcx, u64> { ... } }

Provided methods

pub fn pointer_size(&self) -> Size[src]

pub fn machine_usize_max(&self) -> u64[src]

pub fn machine_isize_min(&self) -> i64[src]

pub fn machine_isize_max(&self) -> i64[src]

pub fn truncate_to_ptr(&self, (val, over): (u64, bool)) -> (u64, bool)[src]

Helper function: truncate given value-"overflowed flag" pair to pointer size and update "overflowed flag" if there was an overflow. This should be called by all the other methods before returning!

pub fn overflowing_offset(&self, val: u64, i: u64) -> (u64, bool)[src]

pub fn overflowing_signed_offset(&self, val: u64, i: i64) -> (u64, bool)[src]

pub fn offset<'tcx>(&self, val: u64, i: u64) -> InterpResult<'tcx, u64>[src]

pub fn signed_offset<'tcx>(&self, val: u64, i: i64) -> InterpResult<'tcx, u64>[src]

Loading content...

Implementors

impl<T: HasDataLayout> PointerArithmetic for T[src]

Loading content...