Enum cranelift_codegen::data_value::DataValue[][src]

pub enum DataValue {
    B(bool),
    I8(i8),
    I16(i16),
    I32(i32),
    I64(i64),
    U8(u8),
    U16(u16),
    U32(u32),
    U64(u64),
    F32(Ieee32),
    F64(Ieee64),
    V128([u8; 16]),
}

Represent a data value. Where Value is an SSA reference, DataValue is the type + value that would be referred to by a Value.

Variants

B(bool)
I8(i8)
I16(i16)
I32(i32)
I64(i64)
U8(u8)
U16(u16)
U32(u32)
U64(u64)
F32(Ieee32)
F64(Ieee64)
V128([u8; 16])

Implementations

impl DataValue[src]

pub fn from_integer(
    imm: i64,
    ty: Type
) -> Result<DataValue, DataValueCastFailure>
[src]

Try to cast an immediate integer (a wrapped i64 on most Cranelift instructions) to the given Cranelift Type.

pub fn ty(&self) -> Type[src]

Return the Cranelift IR Type for this DataValue.

pub fn is_vector(&self) -> bool[src]

Return true if the value is a vector (i.e. DataValue::V128).

pub unsafe fn write_value_to(&self, p: *mut u128)[src]

Write a DataValue to a memory location.

pub unsafe fn read_value_from(p: *const u128, ty: Type) -> Self[src]

Read a DataValue from a memory location using a given Type.

Trait Implementations

impl Clone for DataValue[src]

impl Debug for DataValue[src]

impl Display for DataValue[src]

impl From<[u8; 16]> for DataValue[src]

impl From<Ieee32> for DataValue[src]

impl From<Ieee64> for DataValue[src]

impl From<Offset32> for DataValue[src]

impl From<bool> for DataValue[src]

impl From<i16> for DataValue[src]

impl From<i32> for DataValue[src]

impl From<i64> for DataValue[src]

impl From<i8> for DataValue[src]

impl From<u16> for DataValue[src]

impl From<u32> for DataValue[src]

impl From<u64> for DataValue[src]

impl From<u8> for DataValue[src]

impl PartialEq<DataValue> for DataValue[src]

impl PartialOrd<DataValue> for DataValue[src]

impl StructuralPartialEq for DataValue[src]

impl TryInto<[u8; 16]> for DataValue[src]

type Error = DataValueCastFailure

The type returned in the event of a conversion error.

impl TryInto<Ieee32> for DataValue[src]

type Error = DataValueCastFailure

The type returned in the event of a conversion error.

impl TryInto<Ieee64> for DataValue[src]

type Error = DataValueCastFailure

The type returned in the event of a conversion error.

impl TryInto<bool> for DataValue[src]

type Error = DataValueCastFailure

The type returned in the event of a conversion error.

impl TryInto<i16> for DataValue[src]

type Error = DataValueCastFailure

The type returned in the event of a conversion error.

impl TryInto<i32> for DataValue[src]

type Error = DataValueCastFailure

The type returned in the event of a conversion error.

impl TryInto<i64> for DataValue[src]

type Error = DataValueCastFailure

The type returned in the event of a conversion error.

impl TryInto<i8> for DataValue[src]

type Error = DataValueCastFailure

The type returned in the event of a conversion error.

impl TryInto<u16> for DataValue[src]

type Error = DataValueCastFailure

The type returned in the event of a conversion error.

impl TryInto<u32> for DataValue[src]

type Error = DataValueCastFailure

The type returned in the event of a conversion error.

impl TryInto<u64> for DataValue[src]

type Error = DataValueCastFailure

The type returned in the event of a conversion error.

impl TryInto<u8> for DataValue[src]

type Error = DataValueCastFailure

The type returned in the event of a conversion error.

Auto Trait Implementations

impl RefUnwindSafe for DataValue

impl Send for DataValue

impl Sync for DataValue

impl Unpin for DataValue

impl UnwindSafe for DataValue

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.