Skip to main content

Module base

Module base 

Source
Expand description

base, what every layer after resolution shares: the ids and arenas (id.rs), a dbg argument (dbg.rs), a type as written with its names resolved (types.rs), the references a body’s names resolve to (refs.rs), and the declarations resolution fixes and typing never changes (env.rs). rast and tast each define the declarations that change between them; neither owns these.

Re-exports§

pub use dbg::DbgArg;
pub use env::Buffer;
pub use env::ChannelEnd;
pub use env::Composition;
pub use env::Endpoint;
pub use env::Entry;
pub use env::EventDecl;
pub use env::Mapping;
pub use env::ProcessDecl;
pub use id::BodyVarId;
pub use id::ChanId;
pub use id::ConstId;
pub use id::EventId;
pub use id::FfnId;
pub use id::IdVec;
pub use id::Idx;
pub use id::LocalVarId;
pub use id::MappingId;
pub use id::ModuleId;
pub use id::MrId;
pub use id::PdId;
pub use id::ProcId;
pub use id::StructId;
pub use refs::BodyVarKind;
pub use refs::VarRef;
pub use types::ArrayLen;
pub use types::TypeRef;

Modules§

dbg
A dbg argument, the same in every layer after resolution but for the expression it holds.
env
The declarations resolution fixes and typing never changes, in every layer’s environment: a channel’s ends, its buffer and the buffer’s mappings, a program’s mappings, the System = composition, event and process signatures, and the platform entry points. Memory regions and protection domains are the AST’s own nodes.
id
Ids: a node another node refers to lives in an arena, an IdVec, and is referred to by its index there, a u32 newtype per kind. A kind’s id indexes only its own arena, so a ChanId can never look up a process.
refs
What a name in a body resolves to, by id: a variable, and what declared it.
types
A type as written, its names resolved: what a declaration’s annotation denotes before typing. tast lowers it to its Ty.