Skip to main content

ConstPropState

Struct ConstPropState 

Source
pub struct ConstPropState {
Show 27 fields pub build: *mut IrBuilder, pub function: *mut IrFunction, pub regs: [RegisterInfo; 256], pub max_reg: i32, pub inst_pos: u32, pub in_safe_env: bool, pub checked_gc: bool, pub inst_link: DenseHashMap<u32, RegisterLink>, pub inst_tag: DenseHashMap<u32, u8>, pub inst_value: DenseHashMap<u32, IrOp>, pub value_map: DenseHashMap<IrInst, u32, IrInstHash, IrInstEq>, pub upvalue_map: DenseHashMap<u8, u32>, pub hash_value_cache: DenseHashMap<u32, u32>, pub array_value_cache: Vec<ArrayValueEntry>, pub try_num_to_index_cache: Vec<u32>, pub get_slot_node_cache: Vec<NumberedInstruction>, pub check_slot_match_cache: Vec<NodeSlotState>, pub get_arr_addr_cache: Vec<u32>, pub check_array_size_cache: Vec<u32>, pub check_buffer_len_cache: Vec<u32>, pub useradata_tag_cache: Vec<u32>, pub buffer_load_store_info: Vec<BufferLoadStoreInfo>, pub load_env_idx: u32, pub inst_not_readonly: DenseHashSet<u32>, pub inst_no_metatable: DenseHashSet<u32>, pub inst_array_size: DenseHashMap<u32, i32>, pub range_end_temp: Vec<u32>,
}

Fields§

§build: *mut IrBuilder§function: *mut IrFunction§regs: [RegisterInfo; 256]§max_reg: i32§inst_pos: u32§in_safe_env: bool§checked_gc: bool§inst_link: DenseHashMap<u32, RegisterLink>§inst_tag: DenseHashMap<u32, u8>§inst_value: DenseHashMap<u32, IrOp>§value_map: DenseHashMap<IrInst, u32, IrInstHash, IrInstEq>§upvalue_map: DenseHashMap<u8, u32>§hash_value_cache: DenseHashMap<u32, u32>§array_value_cache: Vec<ArrayValueEntry>§try_num_to_index_cache: Vec<u32>§get_slot_node_cache: Vec<NumberedInstruction>§check_slot_match_cache: Vec<NodeSlotState>§get_arr_addr_cache: Vec<u32>§check_array_size_cache: Vec<u32>§check_buffer_len_cache: Vec<u32>§useradata_tag_cache: Vec<u32>§buffer_load_store_info: Vec<BufferLoadStoreInfo>§load_env_idx: u32§inst_not_readonly: DenseHashSet<u32>§inst_no_metatable: DenseHashSet<u32>§inst_array_size: DenseHashMap<u32, i32>§range_end_temp: Vec<u32>

Implementations§

Source§

impl ConstPropState

Source§

impl ConstPropState

Source

pub fn const_prop_state_const_prop_state( build: &mut IrBuilder, function: &mut IrFunction, ) -> Self

Source§

impl ConstPropState

Source§

impl ConstPropState

Source

pub fn find_substitute_component_load_from_store_vector( &mut self, _build: &mut IrBuilder, vm_reg: IrOp, offset: i32, ) -> Option<IrOp>

Source§

impl ConstPropState

Source

pub fn forward_buffer_store_to_load( &mut self, store_inst: &mut IrInst, load_cmd: IrCmd, access_size: u8, )

Source§

impl ConstPropState

Source

pub fn forward_table_store_to_load( &mut self, target_addr: &mut IrInst, write_offset_op: IrOp, inst_idx: u32, )

Source§

impl ConstPropState

Source

pub fn forward_vm_reg_store_to_load( &mut self, store_inst: &mut IrInst, load_cmd: IrCmd, )

Source§

impl ConstPropState

Source

pub fn forward_vm_upvalue_store_to_load(&mut self, store_inst: &mut IrInst)

Source§

impl ConstPropState

Source

pub fn get_combined_array_load_offset_op( &mut self, array_addr_inst: &mut IrInst, load_offset_op: IrOp, ) -> IrOp

Source§

impl ConstPropState

Source

pub fn get_max_internal_overlap( &mut self, set: &mut Vec<NumberedInstruction>, slot: usize, ) -> i32

Source§

impl ConstPropState

Source

pub fn get_offset_base(&mut self, value: IrOp) -> BufferAccessBase

Source§

impl ConstPropState

Source

pub fn get_previous_inst_index(&mut self, inst: &IrInst) -> Option<*mut u32>

Source§

impl ConstPropState

Source

pub fn get_previous_versioned_load_for_tag( &mut self, tag: u8, vm_reg: IrOp, ) -> (IrCmd, u32)

Source§

impl ConstPropState

Source

pub fn get_previous_versioned_load_index( &mut self, cmd: IrCmd, vm_reg: IrOp, ) -> Option<*mut u32>

Source§

impl ConstPropState

Source§

impl ConstPropState

Source§

impl ConstPropState

Source

pub fn invalidate_heap(&mut self)

Source§

impl ConstPropState

Source§

impl ConstPropState

Source§

impl ConstPropState

Source

pub fn invalidate_register_info_bool_bool( &mut self, reg: &mut RegisterInfo, invalidate_tag: bool, invalidate_value: bool, )

Source§

impl ConstPropState

Source

pub fn invalidate_ir_op(&mut self, _reg_op: IrOp)

Source§

impl ConstPropState

Source

pub fn invalidate_register_range(&mut self, first_reg: i32, count: i32)

Source§

impl ConstPropState

Source

pub fn invalidate_registers_from(&mut self, first_reg: i32)

Source§

impl ConstPropState

Source§

impl ConstPropState

Source§

impl ConstPropState

Source

pub fn invalidate_table_store_location( &mut self, target_addr: IrInst, write_offset_op: IrOp, tag: u8, )

Source§

impl ConstPropState

Source

pub fn invalidate_tag(&mut self, reg_op: IrOp)

Source§

impl ConstPropState

Source

pub fn invalidate_user_call(&mut self)

Source§

impl ConstPropState

Source§

impl ConstPropState

Source

pub fn invalidate_value(&mut self, reg_op: IrOp)

Source§

impl ConstPropState

Source§

impl ConstPropState

Source§

impl ConstPropState

Source§

impl ConstPropState

Source

pub fn save_tag(&mut self, op: IrOp, tag: u8)

Source§

impl ConstPropState

Source

pub fn save_value(&mut self, op: IrOp, value: IrOp)

Source§

impl ConstPropState

Source

pub fn substitute_or_record(&mut self, inst: &mut IrInst, inst_idx: u32)

Source§

impl ConstPropState

Source

pub fn substitute_or_record_buffer_load( &mut self, block: &mut IrBlock, inst_idx: u32, load_inst: &mut IrInst, access_size: u8, )

Source§

impl ConstPropState

Source

pub fn substitute_or_record_value_load_with_t_value_data( &mut self, _build: &mut IrBuilder, load_inst: &mut IrInst, ) -> bool

Source§

impl ConstPropState

Source

pub fn substitute_or_record_vm_reg_load( &mut self, load_inst: &mut IrInst, ) -> bool

Source§

impl ConstPropState

Source

pub fn substitute_or_record_vm_upvalue_load( &mut self, load_inst: &mut IrInst, ) -> bool

Source§

impl ConstPropState

Source

pub fn substitute_tag_load_with_t_value_data( &mut self, build: &mut IrBuilder, load_inst: &mut IrInst, ) -> bool

Source§

impl ConstPropState

Source§

impl ConstPropState

Source§

impl ConstPropState

Source

pub fn try_get_tag(&mut self, op: IrOp) -> u8

Source§

impl ConstPropState

Source

pub fn try_get_value(&mut self, op: IrOp) -> IrOp

Source§

impl ConstPropState

Source

pub fn try_merge_and_kill_buffer_length_check( &mut self, build: &mut IrBuilder, _block: &mut IrBlock, curr_check: &mut IrInst, prev_check: &mut IrInst, extra_offset: i32, ) -> bool

Source§

impl ConstPropState

Source

pub fn try_merge_buffer_range_check( &mut self, build: &mut IrBuilder, block: &mut IrBlock, inst: &mut IrInst, prev: &mut IrInst, ) -> bool

Source§

impl ConstPropState

Source

pub fn try_redirect_vm_reg_load_to_t_value_origin( &mut self, load_inst: &mut IrInst, ) -> bool

Source§

impl ConstPropState

Source

pub fn update_tag(&mut self, op: IrOp, tag: u8)

Source§

impl ConstPropState

Source

pub fn versioned_vm_reg_load_ir_cmd_ir_op( &mut self, load_cmd: IrCmd, op: IrOp, ) -> IrInst

Source§

impl ConstPropState

Source

pub fn versioned_vm_reg_load_ir_cmd_ir_op_ir_op( &mut self, load_cmd: IrCmd, op_a: IrOp, op_b: IrOp, ) -> IrInst

Source§

impl ConstPropState

Source

pub fn clear(&mut self)

Trait Implementations§

Source§

impl Debug for ConstPropState

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.