pub struct AirProgram {
pub id: ProgramId,
pub modules: Vec<AirModule>,
pub link_table: LinkTable,
}Expand description
A whole program composed of multiple linked modules.
Fields§
§id: ProgramIdDeterministic ID derived from the sorted set of module fingerprints.
modules: Vec<AirModule>Individual compilation units (one per input file).
link_table: LinkTableCross-module symbol resolution.
Implementations§
Source§impl AirProgram
impl AirProgram
Sourcepub fn link(bundles: Vec<AirBundle>) -> Self
pub fn link(bundles: Vec<AirBundle>) -> Self
Link multiple bundles into a unified program.
Resolves extern function declarations to their definitions across modules.
Produces a LinkTable mapping declaration IDs to definition IDs.
Sourcepub fn merged_view(&self) -> AirModule
pub fn merged_view(&self) -> AirModule
Produce a flattened AirModule for backward compatibility with
the existing single-module analysis pipeline.
Merges all functions and globals into one module, rewriting extern declarations that have definitions in other modules.
Sourcefn resolve_symbols(modules: &[AirModule]) -> LinkTable
fn resolve_symbols(modules: &[AirModule]) -> LinkTable
Resolve extern declarations across modules.
Sourcepub fn diff(previous: &[ModuleId], current: &[ModuleId]) -> ProgramDiff
pub fn diff(previous: &[ModuleId], current: &[ModuleId]) -> ProgramDiff
Compute what changed between two programs.
Compares modules by ModuleId. Modules with the same ID but different
content should have different ModuleIds (since IDs are content-derived).
Trait Implementations§
Source§impl Clone for AirProgram
impl Clone for AirProgram
Source§fn clone(&self) -> AirProgram
fn clone(&self) -> AirProgram
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more