rune::bytecode

Struct RootedVM

Source
struct RootedVM<'brw, 'env, 'rt> {
    pc: ProgramCounter,
    func: Rt<Slot<&'rt ByteFn>>,
    handlers: Rt<Vec<Handler<'rt>>>,
    env: &'brw mut Rt<Env<'env>>,
}
Expand description

Automatically derived from VM via #[derive(Trace)]

Fields§

§pc: ProgramCounter§func: Rt<Slot<&'rt ByteFn>>§handlers: Rt<Vec<Handler<'rt>>>§env: &'brw mut Rt<Env<'env>>

Implementations§

Source§

impl<'ob> RootedVM<'_, '_, '_>

Source

fn varref(&mut self, idx: u16, cx: &'ob Context<'_>) -> Result<()>

Source

fn varset(&mut self, idx: usize, cx: &Context<'_>) -> Result<()>

Source

fn varbind(&mut self, idx: u16, cx: &'ob Context<'_>)

Source

fn unbind(&mut self, idx: u16, cx: &'ob Context<'_>)

Source

fn get_const(&self, i: usize, cx: &'ob Context<'_>) -> Gc<ObjectType<'ob>>

Source

fn set_current_frame(&mut self, f: &ByteFn, offset: usize)

Source

fn unwind(&mut self, idx: usize, cx: &'ob Context<'_>)

Source

fn debug_enabled() -> bool

Source

fn prepare_lisp_args( &mut self, func: &ByteFn, arg_cnt: usize, name: &str, cx: &'ob Context<'_>, ) -> Result<()>

Prepare the arguments for lisp function call. This means filling all needed stack slots with nil and moving all the &rest arguments into a list.

Source

fn call( &mut self, arg_cnt: u16, cx: &'ob mut Context<'_>, ) -> Result<(), EvalError>

Source

fn run( &mut self, cx: &'ob mut Context<'_>, ) -> Result<Gc<ObjectType<'ob>>, EvalError>

Source

fn execute_bytecode( &mut self, cx: &'ob mut Context<'_>, ) -> Result<Gc<ObjectType<'ob>>, EvalError>

The main bytecode execution loop.

Auto Trait Implementations§

§

impl<'brw, 'env, 'rt> !Freeze for RootedVM<'brw, 'env, 'rt>

§

impl<'brw, 'env, 'rt> !RefUnwindSafe for RootedVM<'brw, 'env, 'rt>

§

impl<'brw, 'env, 'rt> !Send for RootedVM<'brw, 'env, 'rt>

§

impl<'brw, 'env, 'rt> !Sync for RootedVM<'brw, 'env, 'rt>

§

impl<'brw, 'env, 'rt> !Unpin for RootedVM<'brw, 'env, 'rt>

§

impl<'brw, 'env, 'rt> !UnwindSafe for RootedVM<'brw, 'env, 'rt>

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

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

Source§

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

Mutably borrows from an owned value. Read more
Source§

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

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, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

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

Performs the conversion.
Source§

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

Source§

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

The type returned in the event of a conversion error.
Source§

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

Performs the conversion.
§

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

§

fn vzip(self) -> V

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.