pub struct FunctionDef {
pub name: String,
pub entry: u32,
pub arity: u8,
pub num_registers: u8,
}Expand description
A callable entry point inside a Chunk: either bytecode-defined or a
slot reserved for a native (Rust) function registered with the runtime
via the FFI table.
Fields§
§name: String§entry: u32Index into Chunk::code where execution starts.
arity: u8Number of parameters. The VM copies them into r0..arity
(exclusive end): arity 2 fills r0 and r1.
num_registers: u8Upper bound on registers this function uses; the VM allocates exactly this many per call frame instead of a fixed worst-case size.
Trait Implementations§
Source§impl Clone for FunctionDef
impl Clone for FunctionDef
Source§impl Debug for FunctionDef
impl Debug for FunctionDef
impl Eq for FunctionDef
Source§impl PartialEq for FunctionDef
impl PartialEq for FunctionDef
impl StructuralPartialEq for FunctionDef
Auto Trait Implementations§
impl Forget for FunctionDef
impl Freeze for FunctionDef
impl Move for FunctionDef
impl RefUnwindSafe for FunctionDef
impl Send for FunctionDef
impl Sync for FunctionDef
impl Unpin for FunctionDef
impl UnsafeUnpin for FunctionDef
impl UnwindSafe for FunctionDef
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.