Skip to main content

Module env

Module env 

Source
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.
ForeignFn
A foreign function a program calls, its signature in fic’s types. The store says where it is (ForeignModules::function).
LocalVar
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 rast resolved it.

Functions§

build
Type the resolved AST rast on its data layer typed by build_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 by build_system, taking both over: build’s last stage, every program’s variables, then the bodies.
build_system
Type the system of env on its data layer, typed by build_data: build’s second stage, each channel’s payload.

Type Aliases§

LocalVars
A program’s local variables, in source order.