pub struct EncapsulatingLoweringContext<'db> {
pub db: &'db dyn LoweringGroup,
pub semantic_function_id: FunctionWithBodyId,
pub function_body: Arc<FunctionBody>,
pub semantic_defs: UnorderedHashMap<VarId, Variable>,
pub expr_formatter: ExprFormatter<'db>,
pub block_usages: BlockUsages,
pub lowerings: OrderedHashMap<ExprId, FlatLowered>,
}
Expand description
Lowering context for the encapsulating semantic function. Each semantic function may generate multiple lowered functions. This context is common to all the generated lowered functions of an encapsulating semantic function.
Fields§
§db: &'db dyn LoweringGroup
§semantic_function_id: FunctionWithBodyId
Id for the current function being lowered.
function_body: Arc<FunctionBody>
Semantic model for current function body.
semantic_defs: UnorderedHashMap<VarId, Variable>
Definitions encountered for semantic variables.
expr_formatter: ExprFormatter<'db>
Expression formatter of the free function.
block_usages: BlockUsages
Block usages for the entire encapsulating function.
lowerings: OrderedHashMap<ExprId, FlatLowered>
Lowerings of generated functions.
Implementations§
source§impl<'db> EncapsulatingLoweringContext<'db>
impl<'db> EncapsulatingLoweringContext<'db>
pub fn new( db: &'db dyn LoweringGroup, semantic_function_id: FunctionWithBodyId ) -> Maybe<Self>
Auto Trait Implementations§
impl<'db> !RefUnwindSafe for EncapsulatingLoweringContext<'db>
impl<'db> !Send for EncapsulatingLoweringContext<'db>
impl<'db> !Sync for EncapsulatingLoweringContext<'db>
impl<'db> Unpin for EncapsulatingLoweringContext<'db>
impl<'db> !UnwindSafe for EncapsulatingLoweringContext<'db>
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