Trait cairo_lang_lowering::db::LoweringGroup
source · pub trait LoweringGroup: Database + HasQueryGroup<LoweringDatabase> + SemanticGroup + Upcast<dyn SemanticGroup> {
Show 14 methods
fn free_function_lowered(&self, key0: FreeFunctionId) -> Maybe<Arc<Lowered>>;
fn module_lowering_diagnostics(
&self,
key0: ModuleId
) -> Maybe<Diagnostics<LoweringDiagnostic>>;
fn file_lowering_diagnostics(
&self,
key0: FileId
) -> Maybe<Diagnostics<LoweringDiagnostic>>;
fn function_scc_representative(
&self,
key0: FreeFunctionId
) -> SCCRepresentative;
fn function_scc_explicit_implicits(
&self,
key0: SCCRepresentative
) -> Maybe<HashSet<TypeId>>;
fn function_all_implicits(&self, key0: FunctionId) -> Maybe<Vec<TypeId>>;
fn free_function_all_implicits(
&self,
key0: FreeFunctionId
) -> Maybe<HashSet<TypeId>>;
fn free_function_all_implicits_vec(
&self,
key0: FreeFunctionId
) -> Maybe<Vec<TypeId>>;
fn function_may_panic(&self, key0: FunctionId) -> Maybe<bool>;
fn free_function_may_panic(&self, key0: FreeFunctionId) -> Maybe<bool>;
fn function_scc(&self, key0: FreeFunctionId) -> Vec<FreeFunctionId> ⓘ;
fn implicit_precedence(&self) -> Arc<Vec<TypeId>>;
fn set_implicit_precedence(&mut self, value__: Arc<Vec<TypeId>>);
fn set_implicit_precedence_with_durability(
&mut self,
value__: Arc<Vec<TypeId>>,
durability__: Durability
);
}
Required Methods§
sourcefn free_function_lowered(&self, key0: FreeFunctionId) -> Maybe<Arc<Lowered>>
fn free_function_lowered(&self, key0: FreeFunctionId) -> Maybe<Arc<Lowered>>
Computed the lowered representation of a free function.
sourcefn module_lowering_diagnostics(
&self,
key0: ModuleId
) -> Maybe<Diagnostics<LoweringDiagnostic>>
fn module_lowering_diagnostics(
&self,
key0: ModuleId
) -> Maybe<Diagnostics<LoweringDiagnostic>>
Aggregates module level semantic diagnostics.
sourcefn file_lowering_diagnostics(
&self,
key0: FileId
) -> Maybe<Diagnostics<LoweringDiagnostic>>
fn file_lowering_diagnostics(
&self,
key0: FileId
) -> Maybe<Diagnostics<LoweringDiagnostic>>
Aggregates file level lowering diagnostics.
sourcefn function_scc_representative(&self, key0: FreeFunctionId) -> SCCRepresentative
fn function_scc_representative(&self, key0: FreeFunctionId) -> SCCRepresentative
Returns the representative of the function’s strongly connected component. The representative is consistently chosen for all the functions in the same SCC.
sourcefn function_scc_explicit_implicits(
&self,
key0: SCCRepresentative
) -> Maybe<HashSet<TypeId>>
fn function_scc_explicit_implicits(
&self,
key0: SCCRepresentative
) -> Maybe<HashSet<TypeId>>
Returns the explicit implicits required by all the functions in the SCC of this function. These are all the implicit parameters that are explicitly declared in the functions of the given function’s SCC.
For better caching, this function should be called only with the representative of the SCC.
sourcefn function_all_implicits(&self, key0: FunctionId) -> Maybe<Vec<TypeId>>
fn function_all_implicits(&self, key0: FunctionId) -> Maybe<Vec<TypeId>>
Returns all the implicit parameters that the function requires (according to both its signature and the functions it calls). The items in the returned vector are unique and the order is consistent, but not necessarily related to the order of the explicit implicits in the signature of the function.
sourcefn free_function_all_implicits(
&self,
key0: FreeFunctionId
) -> Maybe<HashSet<TypeId>>
fn free_function_all_implicits(
&self,
key0: FreeFunctionId
) -> Maybe<HashSet<TypeId>>
Returns all the implicit parameters that the free function requires (according to both its signature and the functions it calls).
sourcefn free_function_all_implicits_vec(
&self,
key0: FreeFunctionId
) -> Maybe<Vec<TypeId>>
fn free_function_all_implicits_vec(
&self,
key0: FreeFunctionId
) -> Maybe<Vec<TypeId>>
Returns all the implicit parameters that the free function requires (according to both its signature and the functions it calls). The items in the returned vector are unique and the order is consistent, but not necessarily related to the order of the explicit implicits in the signature of the function.
sourcefn function_may_panic(&self, key0: FunctionId) -> Maybe<bool>
fn function_may_panic(&self, key0: FunctionId) -> Maybe<bool>
Returns whether the function may panic.
sourcefn free_function_may_panic(&self, key0: FreeFunctionId) -> Maybe<bool>
fn free_function_may_panic(&self, key0: FreeFunctionId) -> Maybe<bool>
Returns whether the function may panic.
sourcefn function_scc(&self, key0: FreeFunctionId) -> Vec<FreeFunctionId> ⓘ
fn function_scc(&self, key0: FreeFunctionId) -> Vec<FreeFunctionId> ⓘ
Returns all the functions in the same strongly connected component as the given function.
sourcefn implicit_precedence(&self) -> Arc<Vec<TypeId>>
fn implicit_precedence(&self) -> Arc<Vec<TypeId>>
An array that sets the precedence of implicit types.
sourcefn set_implicit_precedence(&mut self, value__: Arc<Vec<TypeId>>)
fn set_implicit_precedence(&mut self, value__: Arc<Vec<TypeId>>)
Set the value of the implicit_precedence
input.
See implicit_precedence
for details.
Note: Setting values will trigger cancellation of any ongoing queries; this method blocks until those queries have been cancelled.
sourcefn set_implicit_precedence_with_durability(
&mut self,
value__: Arc<Vec<TypeId>>,
durability__: Durability
)
fn set_implicit_precedence_with_durability(
&mut self,
value__: Arc<Vec<TypeId>>,
durability__: Durability
)
Set the value of the implicit_precedence
input and promise
that its value will never change again.
See implicit_precedence
for details.
Note: Setting values will trigger cancellation of any ongoing queries; this method blocks until those queries have been cancelled.