pub trait SierraGenGroup:
Database
+ HasQueryGroup<SierraGenDatabase>
+ LoweringGroup
+ Upcast<dyn LoweringGroup> {
Show 21 methods
// Required methods
fn intern_label_id(&self, id: LabelLongId) -> LabelId;
fn lookup_intern_label_id(&self, key: LabelId) -> LabelLongId;
fn intern_concrete_lib_func(
&self,
id: ConcreteLibfuncLongId,
) -> ConcreteLibfuncId;
fn lookup_intern_concrete_lib_func(
&self,
key: ConcreteLibfuncId,
) -> ConcreteLibfuncLongId;
fn intern_concrete_type(
&self,
id: SierraGeneratorTypeLongId,
) -> ConcreteTypeId;
fn lookup_intern_concrete_type(
&self,
key: ConcreteTypeId,
) -> SierraGeneratorTypeLongId;
fn intern_sierra_function(&self, id: FunctionId) -> FunctionId;
fn lookup_intern_sierra_function(&self, key: FunctionId) -> FunctionId;
fn get_concrete_type_id(&self, type_id: TypeId) -> Maybe<ConcreteTypeId>;
fn get_index_enum_type_id(
&self,
index_count: usize,
) -> Maybe<ConcreteTypeId>;
fn get_concrete_long_type_id(
&self,
type_id: TypeId,
) -> Maybe<Arc<ConcreteTypeLongId>>;
fn is_self_referential(&self, type_id: TypeId) -> Maybe<bool>;
fn type_dependencies(&self, type_id: TypeId) -> Maybe<Arc<[TypeId]>>;
fn has_in_deps(&self, type_id: TypeId, needle: TypeId) -> Maybe<bool>;
fn get_function_signature(
&self,
function_id: FunctionId,
) -> Maybe<Arc<FunctionSignature>>;
fn get_type_info(
&self,
concrete_type_id: ConcreteTypeId,
) -> Maybe<Arc<TypeInfo>>;
fn priv_function_with_body_sierra_data(
&self,
function_id: ConcreteFunctionWithBodyId,
) -> SierraFunctionWithBodyData;
fn function_with_body_sierra(
&self,
function_id: ConcreteFunctionWithBodyId,
) -> Maybe<Arc<Function>>;
fn get_ap_change(
&self,
function_id: ConcreteFunctionWithBodyId,
) -> Maybe<SierraApChange>;
fn get_sierra_program_for_functions(
&self,
requested_function_ids: Vec<ConcreteFunctionWithBodyId>,
) -> Maybe<Arc<SierraProgramWithDebug>>;
fn get_sierra_program(
&self,
requested_crate_ids: Vec<CrateId>,
) -> Maybe<Arc<SierraProgramWithDebug>>;
}
Required Methods§
fn intern_label_id(&self, id: LabelLongId) -> LabelId
fn lookup_intern_label_id(&self, key: LabelId) -> LabelLongId
fn intern_concrete_lib_func( &self, id: ConcreteLibfuncLongId, ) -> ConcreteLibfuncId
fn lookup_intern_concrete_lib_func( &self, key: ConcreteLibfuncId, ) -> ConcreteLibfuncLongId
fn intern_concrete_type(&self, id: SierraGeneratorTypeLongId) -> ConcreteTypeId
fn lookup_intern_concrete_type( &self, key: ConcreteTypeId, ) -> SierraGeneratorTypeLongId
sourcefn intern_sierra_function(&self, id: FunctionId) -> FunctionId
fn intern_sierra_function(&self, id: FunctionId) -> FunctionId
Creates a Sierra function id for a function id of the semantic model.
fn lookup_intern_sierra_function(&self, key: FunctionId) -> FunctionId
sourcefn get_concrete_type_id(&self, type_id: TypeId) -> Maybe<ConcreteTypeId>
fn get_concrete_type_id(&self, type_id: TypeId) -> Maybe<ConcreteTypeId>
Returns the matching sierra concrete type id for a given semantic type id.
sourcefn get_index_enum_type_id(&self, index_count: usize) -> Maybe<ConcreteTypeId>
fn get_index_enum_type_id(&self, index_count: usize) -> Maybe<ConcreteTypeId>
Returns the ConcreteTypeId of the index enum type with the given index count.
sourcefn get_concrete_long_type_id(
&self,
type_id: TypeId,
) -> Maybe<Arc<ConcreteTypeLongId>>
fn get_concrete_long_type_id( &self, type_id: TypeId, ) -> Maybe<Arc<ConcreteTypeLongId>>
Returns the matching sierra concrete type long id for a given semantic type id.
sourcefn is_self_referential(&self, type_id: TypeId) -> Maybe<bool>
fn is_self_referential(&self, type_id: TypeId) -> Maybe<bool>
Returns if the semantic id has a circular definition.
sourcefn type_dependencies(&self, type_id: TypeId) -> Maybe<Arc<[TypeId]>>
fn type_dependencies(&self, type_id: TypeId) -> Maybe<Arc<[TypeId]>>
Returns the semantic type ids the type is directly dependent on.
A type depends on another type if it contains or may contain it, as a field or by holding a reference to it.
fn has_in_deps(&self, type_id: TypeId, needle: TypeId) -> Maybe<bool>
sourcefn get_function_signature(
&self,
function_id: FunctionId,
) -> Maybe<Arc<FunctionSignature>>
fn get_function_signature( &self, function_id: FunctionId, ) -> Maybe<Arc<FunctionSignature>>
Returns the cairo_lang_sierra::program::FunctionSignature object for the given function id.
sourcefn get_type_info(
&self,
concrete_type_id: ConcreteTypeId,
) -> Maybe<Arc<TypeInfo>>
fn get_type_info( &self, concrete_type_id: ConcreteTypeId, ) -> Maybe<Arc<TypeInfo>>
Returns the cairo_lang_sierra::extensions::types::TypeInfo object for the given type id.
sourcefn priv_function_with_body_sierra_data(
&self,
function_id: ConcreteFunctionWithBodyId,
) -> SierraFunctionWithBodyData
fn priv_function_with_body_sierra_data( &self, function_id: ConcreteFunctionWithBodyId, ) -> SierraFunctionWithBodyData
Private query to compute Sierra data about a function with body.
sourcefn function_with_body_sierra(
&self,
function_id: ConcreteFunctionWithBodyId,
) -> Maybe<Arc<Function>>
fn function_with_body_sierra( &self, function_id: ConcreteFunctionWithBodyId, ) -> Maybe<Arc<Function>>
Returns the Sierra code (as pre_sierra::Function) for a given function with body.
sourcefn get_ap_change(
&self,
function_id: ConcreteFunctionWithBodyId,
) -> Maybe<SierraApChange>
fn get_ap_change( &self, function_id: ConcreteFunctionWithBodyId, ) -> Maybe<SierraApChange>
Returns the ap change of a given function if it is known at compile time or SierraApChange::Unknown otherwise.
sourcefn get_sierra_program_for_functions(
&self,
requested_function_ids: Vec<ConcreteFunctionWithBodyId>,
) -> Maybe<Arc<SierraProgramWithDebug>>
fn get_sierra_program_for_functions( &self, requested_function_ids: Vec<ConcreteFunctionWithBodyId>, ) -> Maybe<Arc<SierraProgramWithDebug>>
Returns the SierraProgramWithDebug object of the requested functions.
sourcefn get_sierra_program(
&self,
requested_crate_ids: Vec<CrateId>,
) -> Maybe<Arc<SierraProgramWithDebug>>
fn get_sierra_program( &self, requested_crate_ids: Vec<CrateId>, ) -> Maybe<Arc<SierraProgramWithDebug>>
Returns the SierraProgramWithDebug object of the requested crates.
Trait Implementations§
source§impl DebugWithDb<dyn SierraGenGroup> for SierraProgramWithDebug
impl DebugWithDb<dyn SierraGenGroup> for SierraProgramWithDebug
Implementation for a debug print of a Sierra program with all locations. The print is a valid textual Sierra program.