pub struct Program {
pub namespace: Option<String>,
pub constants: Vec<Value>,
pub var_metadata: Vec<Rc<Metadata>>,
pub schema_types: HashMap<String, SchemaType>,
pub function_types: HashMap<String, SchemaType>,
pub inferred_function_types: HashMap<String, SchemaType>,
pub functions: Vec<FunctionPrototype>,
pub entry: FunctionId,
}Expand description
A compiled program: a constant pool plus function prototypes.
Fields§
§namespace: Option<String>Owning namespace for a module lowered from HALC; source snippets have none.
constants: Vec<Value>§var_metadata: Vec<Rc<Metadata>>Hara metadata tables for DefGlobal (docstrings, attr maps,
computed arglists), assembled at compile time from the source
forms. Empty for programs without global definitions.
schema_types: HashMap<String, SchemaType>Canonical named-schema graph supplied by HALC lowering.
function_types: HashMap<String, SchemaType>Function annotations normalized against schema_types.
inferred_function_types: HashMap<String, SchemaType>Conservative body-derived facts. These never replace declarations.
functions: Vec<FunctionPrototype>§entry: FunctionIdImplementations§
Source§impl Program
impl Program
Sourcepub fn entry_function(&self) -> &FunctionPrototype
pub fn entry_function(&self) -> &FunctionPrototype
The prototype execution starts from.
Sourcepub fn function_schema(&self, function: FunctionId) -> Option<&SchemaType>
pub fn function_schema(&self, function: FunctionId) -> Option<&SchemaType>
Returns the normalized annotation for a compiled prototype, following named-schema references without expanding recursive schema graphs.
Sourcepub fn function_has_i64_parameters(&self, function: FunctionId) -> bool
pub fn function_has_i64_parameters(&self, function: FunctionId) -> bool
Whether every argument slot for this prototype has a proven i64 representation. The tracing JIT still emits entry guards; this fact only allows it to begin recording before the generic hot threshold.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Program
impl !Send for Program
impl !Sync for Program
impl !UnwindSafe for Program
impl Freeze for Program
impl Unpin for Program
impl UnsafeUnpin for Program
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more