Struct debris_llir::llir_builder::LlirBuilder
source · pub struct LlirBuilder<'ctx> {
extern_items: FxHashMap<MirObjectId, ObjectRef>,
pub(crate) compile_context: &'ctx CompileContext,
pub(crate) type_context: TypeContext,
pub(crate) native_function_map: NativeFunctionMap<'ctx>,
pub(crate) shared_states: SharedStates,
pub(crate) runtime: Runtime,
pub(crate) block_id_generator: BlockIdGenerator,
pub(crate) global_namespace: &'ctx MirNamespace,
pub(crate) return_values_arena: &'ctx ReturnValuesArena,
pub(crate) item_id_allocator: ItemIdAllocator,
}
Fields§
§extern_items: FxHashMap<MirObjectId, ObjectRef>
§compile_context: &'ctx CompileContext
§type_context: TypeContext
§native_function_map: NativeFunctionMap<'ctx>
Stores the already compiled functions This is not part of the llir function builder shared state, because a computed function should always be the same, no matter where it is computed from
A map of shared state id to shared state
runtime: Runtime
§block_id_generator: BlockIdGenerator
§global_namespace: &'ctx MirNamespace
§return_values_arena: &'ctx ReturnValuesArena
§item_id_allocator: ItemIdAllocator
Implementations§
source§impl<'ctx> LlirBuilder<'ctx>
impl<'ctx> LlirBuilder<'ctx>
pub fn new( ctx: &'ctx CompileContext, extern_items_factory: impl Fn(&TypeContext) -> HashMap<Ident, ObjectRef>, mir_extern_items: &FxHashMap<Ident, MirExternItem>, namespace: &'ctx MirNamespace, return_values_arena: &'ctx ReturnValuesArena ) -> Result<Self>
pub fn build( self, entry_context_id: MirContextId, contexts: &'ctx FxHashMap<MirContextId, MirContext> ) -> Result<Llir>
Auto Trait Implementations§
impl<'ctx> !RefUnwindSafe for LlirBuilder<'ctx>
impl<'ctx> !Send for LlirBuilder<'ctx>
impl<'ctx> !Sync for LlirBuilder<'ctx>
impl<'ctx> Unpin for LlirBuilder<'ctx>
impl<'ctx> !UnwindSafe for LlirBuilder<'ctx>
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