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

§shared_states: SharedStates

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>

source

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>

source

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> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.