Skip to main content

IrBuilder

Struct IrBuilder 

Source
pub struct IrBuilder {
    pub host_hooks: *const HostIrHooks,
    pub in_terminated_block: bool,
    pub interrupt_requested: bool,
    pub active_fastcall_fallback: bool,
    pub fastcall_fallback_return: IrOp,
    pub cmd_skip_target: i32,
    pub function: IrFunction,
    pub active_block_idx: u32,
    pub inst_index_to_block: Vec<u32>,
    pub numeric_loop_stack: Vec<LoopInfo>,
    pub constant_map: DenseHashMap<ConstantKey, u32>,
}

Fields§

§host_hooks: *const HostIrHooks§in_terminated_block: bool§interrupt_requested: bool§active_fastcall_fallback: bool§fastcall_fallback_return: IrOp§cmd_skip_target: i32§function: IrFunction§active_block_idx: u32§inst_index_to_block: Vec<u32>

Block index at the bytecode instruction

§numeric_loop_stack: Vec<LoopInfo>§constant_map: DenseHashMap<ConstantKey, u32>

Implementations§

Source§

impl IrBuilder

Source

pub fn begin_block(&mut self, block: IrOp)

Source§

impl IrBuilder

Source

pub fn block(&mut self, kind: IrBlockKind) -> IrOp

Source§

impl IrBuilder

Source

pub fn block_at_inst(&mut self, index: u32) -> IrOp

Source§

impl IrBuilder

Source

pub fn build_function_ir(&mut self, proto: *mut Proto)

Source§

impl IrBuilder

Source

pub fn check_safe_env(&mut self, pcpos: i32)

Source§

impl IrBuilder

Source

pub fn clone(&mut self, source_idxs: Vec<u32>, remove_current_terminator: bool)

Source§

impl IrBuilder

Source

pub fn cond(&mut self, cond: IrCondition) -> IrOp

Source§

impl IrBuilder

Source

pub fn const_any(&mut self, constant: IrConst, as_common_key: u64) -> IrOp

Source§

impl IrBuilder

Source

pub fn const_double(&mut self, value: f64) -> IrOp

Source§

impl IrBuilder

Source

pub fn const_import(&mut self, value: u32) -> IrOp

Source§

impl IrBuilder

Source

pub fn const_int(&mut self, value: i32) -> IrOp

Source§

impl IrBuilder

Source

pub fn const_int_64(&mut self, value: i64) -> IrOp

Source§

impl IrBuilder

Source

pub fn const_tag(&mut self, value: u8) -> IrOp

Source§

impl IrBuilder

Source

pub fn const_uint(&mut self, value: u32) -> IrOp

Source§

impl IrBuilder

Source

pub fn fallback_block(&mut self, pcpos: u32) -> IrOp

Source§

impl IrBuilder

Source

pub fn handle_fastcall_fallback( &mut self, fallback_or_undef: IrOp, pc: *const Instruction, i: i32, )

Source§

impl IrBuilder

Source

pub fn inst_ir_cmd(&mut self, cmd: IrCmd) -> IrOp

Source§

impl IrBuilder

Source

pub fn inst_ir_cmd_ir_op(&mut self, cmd: IrCmd, a: IrOp) -> IrOp

Source§

impl IrBuilder

Source

pub fn inst_ir_cmd_ir_op_ir_op(&mut self, cmd: IrCmd, a: IrOp, b: IrOp) -> IrOp

Source§

impl IrBuilder

Source

pub fn inst_ir_cmd_ir_op_ir_op_ir_op( &mut self, cmd: IrCmd, a: IrOp, b: IrOp, c: IrOp, ) -> IrOp

Source§

impl IrBuilder

Source

pub fn inst_ir_cmd_ir_op_ir_op_ir_op_ir_op( &mut self, cmd: IrCmd, a: IrOp, b: IrOp, c: IrOp, d: IrOp, ) -> IrOp

Source§

impl IrBuilder

Source

pub fn inst_ir_cmd_ir_op_ir_op_ir_op_ir_op_ir_op( &mut self, cmd: IrCmd, a: IrOp, b: IrOp, c: IrOp, d: IrOp, e: IrOp, ) -> IrOp

Source§

impl IrBuilder

Source

pub fn inst_ir_cmd_ir_op_ir_op_ir_op_ir_op_ir_op_ir_op( &mut self, cmd: IrCmd, a: IrOp, b: IrOp, c: IrOp, d: IrOp, e: IrOp, f: IrOp, ) -> IrOp

Source§

impl IrBuilder

Source

pub fn inst_ir_cmd_ir_op_ir_op_ir_op_ir_op_ir_op_ir_op_ir_op( &mut self, cmd: IrCmd, a: IrOp, b: IrOp, c: IrOp, d: IrOp, e: IrOp, f: IrOp, g: IrOp, ) -> IrOp

Source§

impl IrBuilder

Source

pub fn inst_ir_cmd_initializer_list_ir_op( &mut self, cmd: IrCmd, ops: &[IrOp], ) -> IrOp

Source§

impl IrBuilder

Source

pub fn inst_ir_cmd_ir_ops(&mut self, cmd: IrCmd, ops: &IrOps) -> IrOp

Source§

impl IrBuilder

Source

pub fn ir_builder_ir_builder(host_hooks: &HostIrHooks) -> Self

Source§

impl IrBuilder

Source

pub fn is_internal_block(&self, block: IrOp) -> bool

Source§

impl IrBuilder

Source

pub fn load_and_check_tag(&mut self, loc: IrOp, tag: u8, fallback: IrOp)

Source§

impl IrBuilder

Source§

impl IrBuilder

Source

pub fn translate_inst(&mut self, op: LuauOpcode, pc: *const Instruction, i: i32)

Source§

impl IrBuilder

Source

pub fn undef(&mut self) -> IrOp

Source§

impl IrBuilder

Source

pub fn vm_const(&mut self, index: u32) -> IrOp

Source§

impl IrBuilder

Source

pub fn vm_exit(&mut self, pcpos: u32) -> IrOp

Source§

impl IrBuilder

Source

pub fn vm_reg(&mut self, index: u8) -> IrOp

Source§

impl IrBuilder

Source

pub fn vm_upvalue(&mut self, index: u8) -> IrOp

Trait Implementations§

Source§

impl Debug for IrBuilder

Source§

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

Formats the value using the given formatter. 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> 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, 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.