pub struct LocalState { /* private fields */ }

Implementations§

source§

impl LocalState

source

pub fn new(slots: Vec<LocalSlot>) -> Self

source

pub fn num_slots(&self) -> usize

Get the number of slots available in this state

source

pub fn get_type(&self, index: TempIndex) -> &Type

Get the type of the local slot at index

source

pub fn has_value(&self, index: TempIndex) -> bool

Check whether the local slot at index holds a value

source

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

source

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

source

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

source

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

source

pub fn save_destroyed_arg(&mut self, index: TempIndex, val: TypedValue)

Save a mutable argument that is destroyed

source

pub fn load_destroyed_arg(&mut self, index: TempIndex) -> TypedValue

Load a mutable argument that is destroyed

source

pub fn get_pc(&self) -> CodeOffset

Get the current PC location (i.e., which bytecode to be executed)

source

pub fn set_pc(&mut self, pc: CodeOffset)

Set the PC location to jump to on next execution

source

pub fn ready_pc_for_next_instruction(&mut self)

Decide the PC location for next bytecode instruction

source

pub fn collect_pointers(&self) -> BTreeMap<TempIndex, &Pointer>

Collect the pointers of the underlying values in the local slots

source

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

source

pub fn is_terminated(&self) -> bool

Check whether execution of the current function is finished or not

source

pub fn is_post_abort(&self) -> bool

Check whether we are executing in a post-abort status

source

pub fn terminate_with_abort(&mut self, abort_info: AbortInfo)

Mark that the current function terminated with an abort

source

pub fn terminate_with_return(&mut self, ret_vals: Vec<TypedValue>)

Mark that the current function terminated with return values

source

pub fn into_termination_status(self) -> TerminationStatus

Consume and reduce the state into termination status

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

const: unstable · source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> Same<T> for T

§

type Output = T

Should always be Self
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
const: unstable · source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for Twhere V: MultiLane<T>,

§

fn vzip(self) -> V