Struct debris_common::CompileContext
source · pub struct CompileContext {
pub compilation_id: CompilationId,
pub config: Config,
pub input_files: InputFiles,
current_uid: Cell<usize>,
}
Expand description
The Compilation context stores various information about the current compilation
Fields§
§compilation_id: CompilationId
§config: Config
The current config which specifies how to compile
input_files: InputFiles
The code files
current_uid: Cell<usize>
The current unique id system. Note that this is different from ids that are used in mir and llir.
Implementations§
source§impl CompileContext
impl CompileContext
pub fn new(compilation_id: CompilationId) -> Self
pub fn add_input_file(&mut self, code: Code) -> CodeId
pub fn get_input_file(&self, id: CodeId) -> &Code
sourcepub fn get_unique_id(&self) -> usize
pub fn get_unique_id(&self) -> usize
Returns a unique id
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for CompileContext
impl Send for CompileContext
impl !Sync for CompileContext
impl Unpin for CompileContext
impl UnwindSafe for CompileContext
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