pub struct CompiledExpr { /* private fields */ }Expand description
A compiled expression: flat bytecode evaluated on a stack VM.
Implementations§
Source§impl CompiledExpr
impl CompiledExpr
pub fn new(bytecode: ExprBytecode) -> Self
Sourcepub fn eval_u64(&self, memory: *mut u8) -> u64
pub fn eval_u64(&self, memory: *mut u8) -> u64
Evaluate against raw simulator memory, returning the result as u64. For wide results, returns the low 64 bits.
Sourcepub fn eval_value(&self, memory: *mut u8) -> TestbenchValue
pub fn eval_value(&self, memory: *mut u8) -> TestbenchValue
Evaluate and return the full TestbenchValue (preserves wide results).
pub fn eval_bool(&self, memory: *mut u8) -> bool
Sourcepub fn constant_u64(&self) -> Option<u64>
pub fn constant_u64(&self) -> Option<u64>
Returns the value when this expression does not read simulator memory.
Trait Implementations§
Source§impl Clone for CompiledExpr
impl Clone for CompiledExpr
Source§fn clone(&self) -> CompiledExpr
fn clone(&self) -> CompiledExpr
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for CompiledExpr
impl RefUnwindSafe for CompiledExpr
impl Send for CompiledExpr
impl Sync for CompiledExpr
impl Unpin for CompiledExpr
impl UnsafeUnpin for CompiledExpr
impl UnwindSafe for CompiledExpr
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