Skip to main content

BcFunction

Struct BcFunction 

Source
pub struct BcFunction {
Show 23 fields pub maxstacksize: u8, pub numparams: u8, pub nups: u8, pub is_vararg: bool, pub flags: u8, pub blocks: Vec<BcBlock>, pub instructions: Vec<BcInst>, pub constants: Vec<VmConst>, pub immediates: Vec<BcImm>, pub phis: Vec<BcPhi>, pub projections: Vec<BcProj>, pub table_shapes: Vec<TableShape>, pub entry_block: BcOp, pub exit_block: BcOp, pub type_info: String, pub upvalue_types: Vec<LuauBytecodeType>, pub local_types: Vec<TypedLocal>, pub protos: Vec<u32>, pub debugname: String, pub linedefined: u32, pub upvalue_names: Vec<String>, pub locals: Vec<DebugLocal<'static>>, pub regs: RegMap,
}

Fields§

§maxstacksize: u8§numparams: u8§nups: u8§is_vararg: bool§flags: u8§blocks: Vec<BcBlock>§instructions: Vec<BcInst>§constants: Vec<VmConst>§immediates: Vec<BcImm>§phis: Vec<BcPhi>§projections: Vec<BcProj>§table_shapes: Vec<TableShape>§entry_block: BcOp§exit_block: BcOp§type_info: String§upvalue_types: Vec<LuauBytecodeType>§local_types: Vec<TypedLocal>§protos: Vec<u32>§debugname: String§linedefined: u32§upvalue_names: Vec<String>§locals: Vec<DebugLocal<'static>>§regs: RegMap

Implementations§

Source§

impl BcFunction

Source

pub fn add_block(&mut self) -> BcOp

Source§

impl BcFunction

Source

pub fn add_imm(&mut self, kind: BcImmKind) -> BcOp

Source§

impl BcFunction

Source

pub fn add_inst(&mut self) -> BcOp

Source§

impl BcFunction

Source

pub fn add_phi(&mut self) -> BcOp

Source§

impl BcFunction

Source

pub fn add_proj(&mut self, op: BcOp, index: u32) -> BcOp

Source§

impl BcFunction

Source

pub fn as_<T>(&self, op: BcOp) -> T
where T: BcInstType + for<'a> From<(&'a BcFunction, BcRef<'a, BcInst>)>,

Source§

impl BcFunction

Source

pub fn as_inst_op(&self, op: BcOp) -> *mut BcInst

Source§

impl BcFunction

Source

pub fn block<'a>(&'a self, op: BcOp) -> BcRef<'a, BcBlock>

Source§

impl BcFunction

Source

pub fn block_op(&mut self, op: BcOp) -> &mut BcBlock

Source§

impl BcFunction

Source

pub fn const_op(&mut self, op: BcOp) -> &mut BcVmConst

Source§

impl BcFunction

Source

pub fn get_block_index(&self, block: &BcBlock) -> u32

Source§

impl BcFunction

Source

pub fn get_inst_index(&self, inst: &BcInst) -> u32

Source§

impl BcFunction

Source

pub fn imm<'a>(&'a self, op: BcOp) -> BcRef<'a, BcImm>

Source§

impl BcFunction

Source

pub fn imm_op(&mut self, op: BcOp) -> &mut BcImm

Source§

impl BcFunction

Source

pub fn inst<'a>(&'a self, op: BcOp) -> BcRef<'a, BcInst>

Source§

impl BcFunction

Source

pub fn inst_op(&mut self, op: BcOp) -> &mut BcInst

Source§

impl BcFunction

Source

pub fn phi<'a>(&'a self, op: BcOp) -> BcRef<'a, BcPhi>

Source§

impl BcFunction

Source

pub fn phi_op(&mut self, op: BcOp) -> &mut BcPhi

Source§

impl BcFunction

Source

pub fn proj<'a>(&'a self, op: BcOp) -> BcRef<'a, BcProj>

Source§

impl BcFunction

Source

pub fn proj_op(&mut self, op: BcOp) -> &mut BcProj

Source§

impl BcFunction

Source

pub fn vm_const<'a>(&'a self, op: BcOp) -> BcRef<'a, VmConst>

Trait Implementations§

Source§

impl Clone for BcFunction

Source§

fn clone(&self) -> BcFunction

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for BcFunction

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for BcFunction

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.