pub struct CompiledPrototype<S> {
pub reference: FunctionRef<S>,
pub fixed_params: u8,
pub has_varargs: bool,
pub stack_size: u16,
pub constants: Vec<Constant<S>>,
pub opcodes: Vec<OpCode>,
pub opcode_line_numbers: Vec<(usize, LineNumber)>,
pub upvalues: Vec<UpValueDescriptor>,
pub prototypes: Vec<Box<CompiledPrototype<S>>>,
}Fields§
§reference: FunctionRef<S>§fixed_params: u8§has_varargs: bool§stack_size: u16§constants: Vec<Constant<S>>§opcodes: Vec<OpCode>§opcode_line_numbers: Vec<(usize, LineNumber)>Maps OpCodes to source code line numbers.
Stored in sorted opcode index order with redundant entries removed.
upvalues: Vec<UpValueDescriptor>§prototypes: Vec<Box<CompiledPrototype<S>>>Implementations§
Source§impl<S> CompiledPrototype<S>
impl<S> CompiledPrototype<S>
pub fn map_strings<S2>(self, f: impl Fn(S) -> S2) -> CompiledPrototype<S2>
Trait Implementations§
Source§impl<S: Clone> Clone for CompiledPrototype<S>
impl<S: Clone> Clone for CompiledPrototype<S>
Source§fn clone(&self) -> CompiledPrototype<S>
fn clone(&self) -> CompiledPrototype<S>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<S> Collect for CompiledPrototype<S>where
S: Collect,
impl<S> Collect for CompiledPrototype<S>where
S: Collect,
Source§fn needs_trace() -> bool
fn needs_trace() -> bool
As an optimization, if this type can never hold a
Gc pointer and trace is unnecessary
to call, you may implement this method and return false. The default implementation returns
true, signaling that Collect::trace must be called.Source§fn trace(&self, cc: &Collection)
fn trace(&self, cc: &Collection)
Must call
Collect::trace on all held Gc pointers. If this type holds inner types that
implement Collect, a valid implementation would simply call Collect::trace on all the
held values to ensure this.Auto Trait Implementations§
impl<S> Freeze for CompiledPrototype<S>where
S: Freeze,
impl<S> RefUnwindSafe for CompiledPrototype<S>where
S: RefUnwindSafe,
impl<S> Send for CompiledPrototype<S>where
S: Send,
impl<S> Sync for CompiledPrototype<S>where
S: Sync,
impl<S> Unpin for CompiledPrototype<S>where
S: Unpin,
impl<S> UnwindSafe for CompiledPrototype<S>where
S: UnwindSafe,
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