Skip to main content

CallInliner

Struct CallInliner 

Source
pub struct CallInliner<'a> { /* private fields */ }

Implementations§

Source§

impl<'a> CallInliner<'a>

Source

pub fn add_successor( &mut self, from: BcRef<'a, BcBlock>, to: BcRef<'a, BcBlock>, kind: BcBlockEdgeKind, )

Source§

impl<'a> CallInliner<'a>

Source

pub fn append_cmp_proto( &mut self, prev_block: &mut BcRef<'a, BcBlock>, target_op: BcOp, target_proto_id: u32, )

Source§

impl<'a> CallInliner<'a>

Source

pub fn call_inliner( caller: &'a mut BcFunction, target: &'a mut BcFunction, call_op: BcOp, ) -> Self

Source§

impl<'a> CallInliner<'a>

Source§

impl<'a> CallInliner<'a>

Source§

impl<'a> CallInliner<'a>

Source

pub fn get_var_arg_param(&self, get_var_args_op: BcOp, idx: u32) -> BcOp

Source§

impl<'a> CallInliner<'a>

Source

pub fn has_edge(&self, edges: &BcEdges, kind: BcBlockEdgeKind) -> bool

Source§

impl<'a> CallInliner<'a>

Source

pub fn inline_target(&mut self, target_proto_id: u32) -> bool

Source§

impl<'a> CallInliner<'a>

Source

pub fn is_get_var_arg(&mut self, target_op: BcOp) -> bool

Source§

impl<'a> CallInliner<'a>

Source

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

Source§

impl<'a> CallInliner<'a>

Source

pub fn make_fixed_consumer(&mut self, inst: &mut BcRef<'a, BcInst>)

Source§

impl<'a> CallInliner<'a>

Source

pub fn map_block_op(&mut self, target_block: BcOp) -> BcOp

Source§

impl<'a> CallInliner<'a>

Source

pub fn map_proto_op(&self, target_proto_op: BcOp) -> BcOp

Source§

impl<'a> CallInliner<'a>

Source

pub fn map_to_caller_op(&mut self, target_op: BcOp) -> BcOp

Source§

impl<'a> CallInliner<'a>

Source

pub fn map_to_caller_reg(&self, reg: Reg) -> Reg

Source§

impl<'a> CallInliner<'a>

Source

pub fn map_up_value_op(&mut self, target_upval: BcOp) -> BcOp

Source§

impl<'a> CallInliner<'a>

Source

pub fn migrate_blocks(&mut self, next_block: &mut BcRef<'a, BcBlock>) -> bool

Source§

impl<'a> CallInliner<'a>

Source

pub fn migrate_instructions(&mut self)

Source§

impl<'a> CallInliner<'a>

Source

pub fn replace_call_usages_in_ops(&mut self, ops: &mut BcOps)

Source§

impl<'a> CallInliner<'a>

Source§

impl<'a> CallInliner<'a>

Source

pub fn replace_get_var_arg( &mut self, caller_block_op: BcOp, target_get_var_args_op: BcOp, )

Source§

impl<'a> CallInliner<'a>

Source

pub fn replace_namecall( &mut self, namecall: BcOp, prev_block: &mut BcRef<'a, BcBlock>, ) -> BcOp

Source§

impl<'a> CallInliner<'a>

Source

pub fn replace_return( &mut self, next_block: &mut BcRef<'a, BcBlock>, caller_block_op: BcOp, target_return_op: BcOp, ) -> bool

Source§

impl<'a> CallInliner<'a>

Source

pub fn set_fallthrough(&mut self, edges: &mut BcEdges, entry: BcOp)

Source§

impl<'a> CallInliner<'a>

Source

pub fn set_return_op(&mut self, idx: u32, op: BcOp)

Source§

impl<'a> CallInliner<'a>

Source

pub fn split_block_on_op( &mut self, split_op: BcOp, ) -> (BcRef<'a, BcBlock>, BcRef<'a, BcBlock>)

Source§

impl<'a> CallInliner<'a>

Source

pub fn validate_cfg(&self) -> bool

Trait Implementations§

Source§

impl<'a> Debug for CallInliner<'a>

Source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'a> !UnwindSafe for CallInliner<'a>

§

impl<'a> Freeze for CallInliner<'a>

§

impl<'a> RefUnwindSafe for CallInliner<'a>

§

impl<'a> Send for CallInliner<'a>

§

impl<'a> Sync for CallInliner<'a>

§

impl<'a> Unpin for CallInliner<'a>

§

impl<'a> UnsafeUnpin for CallInliner<'a>

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.