pub enum MirType {
Scalar(ScalarType),
Vector(VectorType),
}Expand description
Every type MIR can name. MIR is a register machine, so an aggregate is not one of
them: an aggregate crossing a function boundary travels as a pointer plus an
Aggregate marker on the parameter.
Variants§
Scalar(ScalarType)
Vector(VectorType)
Implementations§
Source§impl MirType
impl MirType
Sourcepub fn signed_integer(self, value: i64) -> i64
pub fn signed_integer(self, value: i64) -> i64
Reads value as this type’s two’s complement, sign-extended to 64 bits.
Sourcepub fn unsigned_integer(self, value: i64) -> u64
pub fn unsigned_integer(self, value: i64) -> u64
Reads value as this type’s unsigned bits, zero-extended to 64 bits.
Sourcepub fn size_bytes(&self) -> usize
pub fn size_bytes(&self) -> usize
Size of the type in bytes
Sourcepub fn ptr_in(space: AddressSpace) -> MirType
pub fn ptr_in(space: AddressSpace) -> MirType
A pointer into space.
Trait Implementations§
impl Copy for MirType
impl Eq for MirType
impl StructuralPartialEq for MirType
Auto Trait Implementations§
impl Freeze for MirType
impl RefUnwindSafe for MirType
impl Send for MirType
impl Sync for MirType
impl Unpin for MirType
impl UnsafeUnpin for MirType
impl UnwindSafe for MirType
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