pub struct BytecodeFunction<'table> {Show 27 fields
pub max_stack_size: u8,
pub num_params: u8,
pub upvalue_count: u8,
pub is_vararg: bool,
pub flags: u8,
pub type_info: Vec<u8>,
pub upvalue_types: Vec<u8>,
pub local_types: Vec<BytecodeTypedLocal>,
pub blocks: Vec<BytecodeBlock>,
pub instructions: Vec<BytecodeInstruction>,
pub constants: Vec<BytecodeFunctionConstant<'table>>,
pub immediates: Vec<BytecodeImmediate>,
pub phis: Vec<BytecodePhi>,
pub projections: Vec<BytecodeProjection>,
pub registers: HashMap<BytecodeOperand, Register>,
pub table_shapes: Vec<TableShape>,
pub class_shapes: Vec<BytecodeClass>,
pub entry_block: BytecodeBlockId,
pub exit_block: BytecodeBlockId,
pub pc_to_block: Vec<BytecodeBlockId>,
pub pc_to_instruction: Vec<BytecodeInstructionId>,
pub protos: Vec<u32>,
pub line_defined: u32,
pub debug_name: &'table [u8],
pub lines: Vec<u32>,
pub locals: Vec<BytecodeDebugLocal<'table>>,
pub upvalue_names: Vec<&'table [u8]>,
}Fields§
§max_stack_size: u8§num_params: u8§upvalue_count: u8§is_vararg: bool§flags: u8§type_info: Vec<u8>§upvalue_types: Vec<u8>§local_types: Vec<BytecodeTypedLocal>§blocks: Vec<BytecodeBlock>§instructions: Vec<BytecodeInstruction>§constants: Vec<BytecodeFunctionConstant<'table>>§immediates: Vec<BytecodeImmediate>§phis: Vec<BytecodePhi>§projections: Vec<BytecodeProjection>§registers: HashMap<BytecodeOperand, Register>§table_shapes: Vec<TableShape>§class_shapes: Vec<BytecodeClass>§entry_block: BytecodeBlockId§exit_block: BytecodeBlockId§pc_to_block: Vec<BytecodeBlockId>§pc_to_instruction: Vec<BytecodeInstructionId>§protos: Vec<u32>§line_defined: u32§debug_name: &'table [u8]§lines: Vec<u32>§locals: Vec<BytecodeDebugLocal<'table>>§upvalue_names: Vec<&'table [u8]>Implementations§
Source§impl<'table> BytecodeFunction<'table>
impl<'table> BytecodeFunction<'table>
pub fn from_function_bytecode<'strings>( data: &[u8], strings: &'table BytecodeStringTable<'strings>, ) -> Result<Self, BytecodeReadError>
Sourcepub fn to_function_bytecode(&mut self) -> Result<Vec<u8>, BytecodeWriteError>
pub fn to_function_bytecode(&mut self) -> Result<Vec<u8>, BytecodeWriteError>
Convenience wrapper for Luau’s single-argument toFunctionBytecode(fn) overload.
Use BytecodeBuilder::to_function_bytecode(&mut function) when a caller already owns
a builder, matching Luau’s toFunctionBytecode(bcb, fn) overload.
pub fn entry(&self) -> BytecodeBlockId
pub fn exit(&self) -> BytecodeBlockId
pub fn blocks(&self) -> &[BytecodeBlock]
pub fn block(&self, id: BytecodeBlockId) -> &BytecodeBlock
pub fn graph_instruction( &self, id: BytecodeInstructionId, ) -> &BytecodeInstruction
pub fn block_for_pc(&self, pc: InstructionPc) -> Option<BytecodeBlockId>
pub fn instruction_for_pc( &self, pc: InstructionPc, ) -> Option<BytecodeInstructionId>
pub fn immediate(&self, id: BytecodeImmediateId) -> &BytecodeImmediate
pub fn phi(&self, id: BytecodePhiId) -> &BytecodePhi
pub fn projection(&self, id: BytecodeProjectionId) -> &BytecodeProjection
Trait Implementations§
Source§impl<'table> Clone for BytecodeFunction<'table>
impl<'table> Clone for BytecodeFunction<'table>
Source§fn clone(&self) -> BytecodeFunction<'table>
fn clone(&self) -> BytecodeFunction<'table>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<'table> Debug for BytecodeFunction<'table>
impl<'table> Debug for BytecodeFunction<'table>
Source§impl<'table> PartialEq for BytecodeFunction<'table>
impl<'table> PartialEq for BytecodeFunction<'table>
impl<'table> StructuralPartialEq for BytecodeFunction<'table>
Auto Trait Implementations§
impl<'table> Freeze for BytecodeFunction<'table>
impl<'table> RefUnwindSafe for BytecodeFunction<'table>
impl<'table> Send for BytecodeFunction<'table>
impl<'table> Sync for BytecodeFunction<'table>
impl<'table> Unpin for BytecodeFunction<'table>
impl<'table> UnsafeUnpin for BytecodeFunction<'table>
impl<'table> UnwindSafe for BytecodeFunction<'table>
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