Skip to main content

Module system

Module system 

Source
Expand description

Typing the .fis declarations: each channel’s payload type, each struct’s layout, each const’s folded value. Memory regions and protection domains carry no type, so TyEnv holds rast’s own nodes.

Consts are typed and folded in declaration order, each in its types (fold.rs), a forward reference being an error, with sizeof laying a struct out on demand against the consts folded so far. The structs left are laid out after, with the complete const table, each once. The layout is C’s on the target: each field at its natural alignment, the size rounded up to the struct’s. A struct is acyclic by rast’s check.