Struct CallFrame

Source
pub(crate) struct CallFrame<'brw, 'rt> {
    env: &'brw mut Rt<Env<'rt>>,
}
Expand description

A function call Frame.

This is a guard type that will pop the frame when it goes out of scope.

Fields§

§env: &'brw mut Rt<Env<'rt>>

Implementations§

Source§

impl<'brw, 'rt> CallFrame<'brw, 'rt>

Source

pub(crate) fn new(env: &'brw mut Rt<Env<'rt>>) -> Self

Create a new function call frame with a drop guard to be removed when this goes out of scope.

Source

pub(crate) fn new_with_args(env: &'brw mut Rt<Env<'rt>>, args: usize) -> Self

Create a new function call frame with the top args on the stack. This frame will be removed when the CallFrame goes out of scope.

Source

pub(crate) fn push_arg(&mut self, arg: impl IntoRoot<Slot<Gc<ObjectType<'rt>>>>)

Push an argument onto the stack as part of this call frame

Source

pub(crate) fn finalize_arguments(&mut self)

Set the total argument count before a function call

Source

pub(crate) fn arg_count(&self) -> usize

Source

pub(crate) fn arg_slice(&self) -> &[Rt<Slot<Gc<ObjectType<'rt>>>>]

Source

pub(crate) fn push_arg_slice(&mut self, src: &[Gc<ObjectType<'_>>])

Push a slice of arguments onto the stack as part of this call frame.

Methods from Deref<Target = Rt<Env<'rt>>>§

Source

fn inner(&self) -> &T

Source

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

Source

fn inner_ptr(&self) -> *const T

Source

fn inner_mut_ptr(&mut self) -> *mut T

Source

pub(crate) fn bind_ref<'a, 'ob>( &'a self, _: &'ob Context<'_>, ) -> &'a <T as WithLifetime<'ob>>::Out
where T: WithLifetime<'ob>,

Source

pub(crate) fn bind_mut<'a, 'ob>( &'a mut self, _: &'ob Context<'_>, ) -> &'a mut <T as WithLifetime<'ob>>::Out
where T: WithLifetime<'ob>,

Source

pub(crate) fn set<U: IntoRoot<T>>(&mut self, item: U)

Trait Implementations§

Source§

impl<'rt> Deref for CallFrame<'_, 'rt>

Source§

type Target = Rt<Env<'rt>>

The resulting type after dereferencing.
Source§

fn deref(&self) -> &Self::Target

Dereferences the value.
Source§

impl DerefMut for CallFrame<'_, '_>

Source§

fn deref_mut(&mut self) -> &mut Self::Target

Mutably dereferences the value.
Source§

impl Drop for CallFrame<'_, '_>

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more

Auto Trait Implementations§

§

impl<'brw, 'rt> Freeze for CallFrame<'brw, 'rt>

§

impl<'brw, 'rt> !RefUnwindSafe for CallFrame<'brw, 'rt>

§

impl<'brw, 'rt> !Send for CallFrame<'brw, 'rt>

§

impl<'brw, 'rt> !Sync for CallFrame<'brw, 'rt>

§

impl<'brw, 'rt> Unpin for CallFrame<'brw, 'rt>

§

impl<'brw, 'rt> !UnwindSafe for CallFrame<'brw, '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> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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<P, T> Receiver for P
where P: Deref<Target = T> + ?Sized, T: ?Sized,

Source§

type Target = T

🔬This is a nightly-only experimental API. (arbitrary_self_types)
The target type on which the method may be called.
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