pub struct CodegenContext {Show 13 fields
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>,
pub policy: Option<ProjectConfig>,
pub emit_replay_runtime: bool,
pub guest_entry: Option<String>,
pub emit_self_host_runtime: bool,
}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. “Models.User”).
policy: Option<ProjectConfig>Runtime policy from aver.toml (baked into generated code).
emit_replay_runtime: boolEmit optional generated replay runtime support.
guest_entry: Option<String>Explicit guest entry boundary for scoped replay/policy.
emit_self_host_runtime: boolEmit extra generated helpers needed by the cached self-host runtime.
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