pub struct LocalState { /* private fields */ }
Implementations
sourceimpl LocalState
impl LocalState
pub fn new(slots: Vec<LocalSlot>, skip_specs: bool) -> Self
sourcepub fn has_value(&self, index: TempIndex) -> bool
pub fn has_value(&self, index: TempIndex) -> bool
Check whether the local slot at index
holds a value
sourcepub fn get_value(&self, index: TempIndex) -> TypedValue
pub fn get_value(&self, index: TempIndex) -> TypedValue
Get the value held in local slot index
. Panics if the slot does not hold a value
sourcepub fn put_value_override(&mut self, index: TempIndex, val: TypedValue)
pub fn put_value_override(&mut self, index: TempIndex, val: TypedValue)
Put the value held in local slot index
. Override if the slot already holds a value
sourcepub fn put_value(&mut self, index: TempIndex, val: TypedValue)
pub fn put_value(&mut self, index: TempIndex, val: TypedValue)
Put the value held in local slot index
. Panics if the slot already holds a value
sourcepub fn del_value(&mut self, index: TempIndex) -> TypedValue
pub fn del_value(&mut self, index: TempIndex) -> TypedValue
Delete the value held in local slot index
. Panics if the slot does not hold a value
sourcepub fn save_destroyed_arg(&mut self, index: TempIndex, val: TypedValue)
pub fn save_destroyed_arg(&mut self, index: TempIndex, val: TypedValue)
Save a mutable argument that is destroyed
sourcepub fn load_destroyed_arg(&mut self, index: TempIndex) -> TypedValue
pub fn load_destroyed_arg(&mut self, index: TempIndex) -> TypedValue
Load a mutable argument that is destroyed
sourcepub fn mark_uninit(&mut self, index: TempIndex)
pub fn mark_uninit(&mut self, index: TempIndex)
Mark a mutable reference is uninitialized explicitly
sourcepub fn unset_uninit(&mut self, index: TempIndex) -> bool
pub fn unset_uninit(&mut self, index: TempIndex) -> bool
Unset the mark that the mutable reference is uninitialized, return True if unset
sourcepub fn get_pc(&self) -> CodeOffset
pub fn get_pc(&self) -> CodeOffset
Get the current PC location (i.e., which bytecode to be executed)
sourcepub fn set_pc(&mut self, pc: CodeOffset)
pub fn set_pc(&mut self, pc: CodeOffset)
Set the PC location to jump to on next execution
sourcepub fn ready_pc_for_next_instruction(&mut self)
pub fn ready_pc_for_next_instruction(&mut self)
Decide the PC location for next bytecode instruction
sourcepub fn collect_pointers(&self) -> BTreeMap<TempIndex, &Pointer>
pub fn collect_pointers(&self) -> BTreeMap<TempIndex, &Pointer>
Collect the pointers of the underlying values in the local slots
sourcepub fn transit_to_post_abort(&mut self, info: AbortInfo)
pub fn transit_to_post_abort(&mut self, info: AbortInfo)
Mark that an abort is raised and we will be executing the abort action next
sourcepub fn is_terminated(&self) -> bool
pub fn is_terminated(&self) -> bool
Check whether execution of the current function is finished or not
sourcepub fn is_post_abort(&self) -> bool
pub fn is_post_abort(&self) -> bool
Check whether we are executing in a post-abort status
sourcepub fn terminate_with_abort(&mut self, abort_info: AbortInfo)
pub fn terminate_with_abort(&mut self, abort_info: AbortInfo)
Mark that the current function terminated with an abort
sourcepub fn terminate_with_return(&mut self, ret_vals: Vec<TypedValue>)
pub fn terminate_with_return(&mut self, ret_vals: Vec<TypedValue>)
Mark that the current function terminated with return values
sourcepub fn into_termination_status(self) -> TerminationStatus
pub fn into_termination_status(self) -> TerminationStatus
Consume and reduce the state into termination status
sourcepub fn skip_specs(&mut self)
pub fn skip_specs(&mut self)
Mark the spec checking disabled for the rest of the function
sourcepub fn is_spec_skipped(&self) -> bool
pub fn is_spec_skipped(&self) -> bool
Check whether we are skipping the specs
Auto Trait Implementations
impl RefUnwindSafe for LocalState
impl Send for LocalState
impl Sync for LocalState
impl Unpin for LocalState
impl UnwindSafe for LocalState
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more