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 usages: Usages,
pub lowerings: OrderedHashMap<GeneratedFunctionKey, 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.
usages: Usages
Block usages for the entire encapsulating function.
lowerings: OrderedHashMap<GeneratedFunctionKey, 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> Freeze for EncapsulatingLoweringContext<'db>
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
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 more