pub struct Mapper<'db, 'mt, 'l> { /* private fields */ }Expand description
Context for mapping ids from lowered to a new Lowered object.
Implementations§
Source§impl<'db, 'mt, 'l> Mapper<'db, 'mt, 'l>
impl<'db, 'mt, 'l> Mapper<'db, 'mt, 'l>
pub fn new( db: &'db dyn Database, variables: &'mt mut VariableArena<'db>, lowered: &'l Lowered<'db>, call_stmt: StatementCall<'db>, block_id_offset: usize, ) -> Self
Trait Implementations§
Source§impl<'db, 'mt> Rebuilder<'db> for Mapper<'db, 'mt, '_>
impl<'db, 'mt> Rebuilder<'db> for Mapper<'db, 'mt, '_>
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.
Source§fn map_location(&mut self, location: LocationId<'db>) -> LocationId<'db>
fn map_location(&mut self, location: LocationId<'db>) -> LocationId<'db>
Adds the inlining location to a location.
fn transform_end(&mut self, end: &mut BlockEnd<'db>)
fn map_var_usage(&mut self, var_usage: VarUsage<'db>) -> VarUsage<'db>
fn transform_statement(&mut self, _statement: &mut Statement<'db>)
fn transform_remapping(&mut self, _remapping: &mut VarRemapping<'db>)
fn transform_block(&mut self, _block: &mut Block<'db>)
Auto Trait Implementations§
impl<'db, 'mt, 'l> Freeze for Mapper<'db, 'mt, 'l>
impl<'db, 'mt, 'l> !RefUnwindSafe for Mapper<'db, 'mt, 'l>
impl<'db, 'mt, 'l> !Send for Mapper<'db, 'mt, 'l>
impl<'db, 'mt, 'l> !Sync for Mapper<'db, 'mt, 'l>
impl<'db, 'mt, 'l> Unpin for Mapper<'db, 'mt, 'l>
impl<'db, 'mt, 'l> !UnwindSafe for Mapper<'db, 'mt, 'l>
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<'db, T> DebugDbUpcast<'db, T> for Twhere
T: ?Sized,
impl<'db, T> DebugDbUpcast<'db, T> for Twhere
T: ?Sized,
fn debug_db_upcast(&'db self) -> &'db T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<'db, T> RebuilderEx<'db> for Twhere
T: Rebuilder<'db>,
impl<'db, T> RebuilderEx<'db> for Twhere
T: Rebuilder<'db>,
Source§fn rebuild_statement(&mut self, statement: &Statement<'db>) -> Statement<'db>
fn rebuild_statement(&mut self, statement: &Statement<'db>) -> Statement<'db>
Rebuilds the statement with renamed var and block ids.
Source§fn rebuild_remapping(
&mut self,
remapping: &VarRemapping<'db>,
) -> VarRemapping<'db>
fn rebuild_remapping( &mut self, remapping: &VarRemapping<'db>, ) -> VarRemapping<'db>
Apply map_var_id to all the variables in the
remapping.Source§fn rebuild_end(&mut self, end: &BlockEnd<'db>) -> BlockEnd<'db>
fn rebuild_end(&mut self, end: &BlockEnd<'db>) -> BlockEnd<'db>
Rebuilds the block end with renamed var and block ids.
Source§fn rebuild_block(&mut self, block: &Block<'db>) -> Block<'db>
fn rebuild_block(&mut self, block: &Block<'db>) -> Block<'db>
Rebuilds the block with renamed var and block ids.