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>
impl<'brw, 'rt> CallFrame<'brw, 'rt>
Sourcepub(crate) fn new(env: &'brw mut Rt<Env<'rt>>) -> Self
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.
Sourcepub(crate) fn new_with_args(env: &'brw mut Rt<Env<'rt>>, args: usize) -> Self
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.
Sourcepub(crate) fn push_arg(&mut self, arg: impl IntoRoot<Slot<Gc<ObjectType<'rt>>>>)
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
Sourcepub(crate) fn finalize_arguments(&mut self)
pub(crate) fn finalize_arguments(&mut self)
Set the total argument count before a function call
pub(crate) fn arg_count(&self) -> usize
pub(crate) fn arg_slice(&self) -> &[Rt<Slot<Gc<ObjectType<'rt>>>>]
Sourcepub(crate) fn push_arg_slice(&mut self, src: &[Gc<ObjectType<'_>>])
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>>>§
fn inner(&self) -> &T
fn inner_mut(&mut self) -> &mut T
fn inner_ptr(&self) -> *const T
fn inner_mut_ptr(&mut self) -> *mut T
pub(crate) fn bind_ref<'a, 'ob>(
&'a self,
_: &'ob Context<'_>,
) -> &'a <T as WithLifetime<'ob>>::Outwhere
T: WithLifetime<'ob>,
pub(crate) fn bind_mut<'a, 'ob>(
&'a mut self,
_: &'ob Context<'_>,
) -> &'a mut <T as WithLifetime<'ob>>::Outwhere
T: WithLifetime<'ob>,
pub(crate) fn set<U: IntoRoot<T>>(&mut self, item: U)
Trait Implementations§
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> 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