pub enum Def {
Load {
var: Variable,
address: Expression,
},
Store {
address: Expression,
value: Expression,
},
Assign {
var: Variable,
value: Expression,
},
}Expand description
A side-effectful operation. Can be a register assignment or a memory load/store operation.
Variants§
Load
Fields
var: VariableThe target register of the memory load.
The size of var also determines the number of bytes read from memory.
address: ExpressionThe expression computing the address from which to read from.
The size of address is required to match the pointer size of the corresponding CPU architecture.
A memory load into the register given by var.
Store
Fields
address: ExpressionThe expression computing the address that is written to.
The size of address is required to match the pointer size of the corresponding CPU architecture.
value: ExpressionThe expression computing the value that is written to memory.
The size of value also determines the number of bytes written.
A memory store operation.
Assign
Fields
value: ExpressionThe expression computing the value that is assigned to the register.
A register assignment, assigning the result of the expression value to the register var.
Trait Implementations§
source§impl<'de> Deserialize<'de> for Def
impl<'de> Deserialize<'de> for Def
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for Def
impl StructuralEq for Def
impl StructuralPartialEq for Def
Auto Trait Implementations§
impl RefUnwindSafe for Def
impl Send for Def
impl Sync for Def
impl Unpin for Def
impl UnwindSafe for Def
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
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.