pub struct CheckedProgram {
pub signatures: BTreeMap<String, FunctionSig>,
pub extern_function_names: BTreeSet<String>,
pub(crate) expr_types: Vec<Ty>,
pub(crate) call_signatures: Vec<Option<FunctionSig>>,
pub(crate) local_symbols: Vec<LocalSymbol>,
pub(crate) local_symbol_occurrences: Vec<LocalSymbolOccurrence>,
pub(crate) expr_local_symbols: Vec<Option<usize>>,
}Expand description
Fully checked program annotations used by later compiler stages.
Fields§
§signatures: BTreeMap<String, FunctionSig>Checked signatures keyed by function name.
extern_function_names: BTreeSet<String>Names of extern functions declared in the program.
expr_types: Vec<Ty>§call_signatures: Vec<Option<FunctionSig>>§local_symbols: Vec<LocalSymbol>§local_symbol_occurrences: Vec<LocalSymbolOccurrence>§expr_local_symbols: Vec<Option<usize>>Implementations§
Source§impl CheckedProgram
impl CheckedProgram
Sourcepub fn expr_ty(&self, expr_id: ExprId) -> &Ty
pub fn expr_ty(&self, expr_id: ExprId) -> &Ty
Return the semantic type assigned to an expression.
Sourcepub fn call_signature(&self, expr_id: ExprId) -> Option<&FunctionSig>
pub fn call_signature(&self, expr_id: ExprId) -> Option<&FunctionSig>
Return the resolved call signature for a call expression, if any.
Sourcepub fn local_symbols(&self) -> &[LocalSymbol]
pub fn local_symbols(&self) -> &[LocalSymbol]
Return all local symbols discovered during checking.
Sourcepub fn local_symbol_occurrences(&self) -> &[LocalSymbolOccurrence]
pub fn local_symbol_occurrences(&self) -> &[LocalSymbolOccurrence]
Return semantic local-symbol occurrences in deterministic source order.
Sourcepub fn expr_local_symbol(&self, expr_id: ExprId) -> Option<usize>
pub fn expr_local_symbol(&self, expr_id: ExprId) -> Option<usize>
Return the local symbol id resolved for one identifier expression, if any.
Trait Implementations§
Source§impl Clone for CheckedProgram
impl Clone for CheckedProgram
Source§fn clone(&self) -> CheckedProgram
fn clone(&self) -> CheckedProgram
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for CheckedProgram
impl RefUnwindSafe for CheckedProgram
impl Send for CheckedProgram
impl Sync for CheckedProgram
impl Unpin for CheckedProgram
impl UnwindSafe for CheckedProgram
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