Struct cairo_lang_lowering::inline::Mapper
source · pub struct Mapper<'a, 'b> { /* private fields */ }
Expand description
Context for mapping ids from lowered
to a new FlatLowered
object.
Trait Implementations§
source§impl<'a, 'b> Rebuilder for Mapper<'a, 'b>
impl<'a, 'b> Rebuilder for Mapper<'a, 'b>
source§fn map_var_id(&mut self, orig_var_id: VariableId) -> VariableId
fn map_var_id(&mut self, orig_var_id: VariableId) -> VariableId
Maps a var id from the original lowering representation to the equivalent id in the new lowering representation. If the variable wasn’t assigned an id yet, a new id is assigned.
source§fn map_block_id(&mut self, orig_block_id: BlockId) -> BlockId
fn map_block_id(&mut self, orig_block_id: BlockId) -> BlockId
Maps a block id from the original lowering representation to the equivalent id in the new lowering representation.
fn transform_end(&mut self, end: &mut FlatBlockEnd)
fn transform_statement(&mut self, _statement: &mut Statement)
fn transform_remapping(&mut self, _remapping: &mut VarRemapping)
fn transform_block(&mut self, _block: &mut FlatBlock)
Auto Trait Implementations§
impl<'a, 'b> !RefUnwindSafe for Mapper<'a, 'b>
impl<'a, 'b> !Send for Mapper<'a, 'b>
impl<'a, 'b> !Sync for Mapper<'a, 'b>
impl<'a, 'b> Unpin for Mapper<'a, 'b>where 'b: 'a,
impl<'a, 'b> !UnwindSafe for Mapper<'a, 'b>
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
source§impl<T> RebuilderEx for Twhere
T: Rebuilder,
impl<T> RebuilderEx for Twhere T: Rebuilder,
source§fn rebuild_statement(&mut self, statement: &Statement) -> Statement
fn rebuild_statement(&mut self, statement: &Statement) -> Statement
Rebuilds the statement with renamed var and block ids.
source§fn rebuild_remapping(&mut self, remapping: &VarRemapping) -> VarRemapping
fn rebuild_remapping(&mut self, remapping: &VarRemapping) -> VarRemapping
Apply map_var_id to all the variable in the
remapping
.source§fn rebuild_end(&mut self, end: &FlatBlockEnd) -> FlatBlockEnd
fn rebuild_end(&mut self, end: &FlatBlockEnd) -> FlatBlockEnd
Rebuilds the block end with renamed var and block ids.
source§fn rebuild_block(&mut self, block: &FlatBlock) -> FlatBlock
fn rebuild_block(&mut self, block: &FlatBlock) -> FlatBlock
Rebuilds the block with renamed var and block ids.