pub struct CodegenContext {
pub items: Vec<TopLevel>,
pub fn_sigs: HashMap<String, (Vec<Type>, Type, Vec<String>)>,
pub memo_fns: HashSet<String>,
pub memo_safe_types: HashSet<String>,
pub type_defs: Vec<TypeDef>,
pub fn_defs: Vec<FnDef>,
pub project_name: String,
pub modules: Vec<ModuleInfo>,
pub module_prefixes: HashSet<String>,
}Expand description
Collected context from the Aver program, shared across all backends.
Fields§
§items: Vec<TopLevel>All top-level items (post-TCO transform, post-typecheck).
fn_sigs: HashMap<String, (Vec<Type>, Type, Vec<String>)>Function signatures: name → (param_types, return_type, effects).
memo_fns: HashSet<String>Functions eligible for auto-memoization.
memo_safe_types: HashSet<String>Set of type names whose values are memo-safe.
type_defs: Vec<TypeDef>User-defined type definitions (for struct/enum generation).
fn_defs: Vec<FnDef>User-defined function definitions.
project_name: StringProject/binary name.
modules: Vec<ModuleInfo>Dependent modules loaded for inlining.
module_prefixes: HashSet<String>Set of module prefixes for qualified name resolution (e.g. “Examples.Fibonacci”).
Auto Trait Implementations§
impl Freeze for CodegenContext
impl RefUnwindSafe for CodegenContext
impl !Send for CodegenContext
impl !Sync for CodegenContext
impl Unpin for CodegenContext
impl UnsafeUnpin for CodegenContext
impl UnwindSafe for CodegenContext
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