Struct debris_llir::Runtime
source · pub struct Runtime {
pub scheduled_blocks: FxIndexSet<BlockId>,
pub load_blocks: FxIndexSet<BlockId>,
pub extern_blocks: FxIndexMap<BlockId, ExternItemPath>,
}
Fields§
§scheduled_blocks: FxIndexSet<BlockId>
§load_blocks: FxIndexSet<BlockId>
§extern_blocks: FxIndexMap<BlockId, ExternItemPath>
Implementations§
source§impl Runtime
impl Runtime
The Runtime
is used at the llir generation to
store metadata to be used by the backend
sourcepub fn contains(&self, id: &BlockId) -> bool
pub fn contains(&self, id: &BlockId) -> bool
Returns whether this function contains the given id
.
sourcepub fn root_blocks(&self) -> impl Iterator<Item = BlockId> + '_
pub fn root_blocks(&self) -> impl Iterator<Item = BlockId> + '_
Gives an iterator over the blocks which are the root blocks. Root blocks are blocks which are called by the system, In this case the scheduled blocks and the on load blocks.
pub fn extend(&mut self, other_runtime: Runtime)
sourcepub fn add_on_load(&mut self, block: BlockId)
pub fn add_on_load(&mut self, block: BlockId)
Adds a specific block to the list of blocks which should be run when the program is loaded.
sourcepub fn add_extern_block(&mut self, block: BlockId, name: ExternItemPath)
pub fn add_extern_block(&mut self, block: BlockId, name: ExternItemPath)
Adds a specific block as an extern item with the given name These functions can be manually invoked
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for Runtime
impl Send for Runtime
impl Sync for Runtime
impl Unpin for Runtime
impl UnwindSafe for Runtime
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