pub struct FunctionPrototype {
pub name: Option<String>,
pub async_function: bool,
pub arity: u16,
pub variadic: bool,
pub capture_count: u16,
pub local_count: u16,
pub max_stack: u16,
pub code: Vec<Instruction>,
pub source_map: SourceMap,
pub handlers: Vec<TryEntry>,
}Expand description
A compiled function. The entry function has arity and capture count 0;
fn/defn forms contribute the remaining prototypes.
Fields§
§name: Option<String>§async_function: boolCalling this prototype creates a child async execution and returns its stable result promise instead of the direct body value.
arity: u16Required argument count. Always 0 for the entry function. When
variadic is set this counts only the fixed parameters.
variadic: boolWhether the last parameter binds the remaining arguments as a
Value::List ([a b & rest]).
capture_count: u16Number of captured values the frame expects in the slots directly above the parameters. Always 0 for the entry function.
local_count: u16Number of local slots the frame allocates.
max_stack: u16Declared operand-stack high-water mark; the validator recomputes and verifies it.
code: Vec<Instruction>§source_map: SourceMap§handlers: Vec<TryEntry>Static handler table for try/catch/finally; empty for
functions without protected regions.
Trait Implementations§
Source§impl Clone for FunctionPrototype
impl Clone for FunctionPrototype
Source§fn clone(&self) -> FunctionPrototype
fn clone(&self) -> FunctionPrototype
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for FunctionPrototype
impl RefUnwindSafe for FunctionPrototype
impl Send for FunctionPrototype
impl Sync for FunctionPrototype
impl Unpin for FunctionPrototype
impl UnsafeUnpin for FunctionPrototype
impl UnwindSafe for FunctionPrototype
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more