Expand description
The typed AST, Tast, and its environment, TyEnv: the
declarations typing changes (Channel, Struct and its
Fields, Const, LocalVar), and build, which types the
project. The typed bodies are Bodies
(program.rs).
build takes the environment over: it types the declarations against
it (system.rs the .fis‘s, program.rs each program’s), then each program’s variables, then the bodies, and assembles the
TyEnv from the environment and the declarations’ types, moving what
typing leaves as it is. A declaration’s id is its rast id; any error
fails the build, so on success every declaration and body was typed.
Structs§
- Channel
- A channel between two protection domains.
- Const
- A system const, folded.
- Field
- A struct field.
- Foreign
Fn - A foreign function a program calls, its signature in fic’s types. The
store says where it is
(
ForeignModules::function). - Local
Var - A local variable: the program’s, its PD’s state.
- Struct
- A struct, laid out.
- Tast
- The typed AST: the typed environment and the typed bodies.
- TyEnv
- The typed environment: every declaration of the project, typed where
typing has something to say, the rest as
rastresolved it.
Functions§
- build
- Type the resolved AST
raston its data layer typed bybuild_data, taking both over. - build_
data - Type the data layer of
env,build’s first stage: its consts folded, its structs laid out, in a typed environment with no system or program yet (what the headers are written from). Returns it and its warnings. - build_
programs - Type
rast’s programs on its system typed bybuild_system, taking both over:build’s last stage, every program’s variables, then the bodies. - build_
system - Type the system of
envon its data layer, typed bybuild_data:build’s second stage, each channel’s payload.
Type Aliases§
- Local
Vars - A program’s local variables, in source order.