Skip to main content

Module compile

Module compile 

Source
Expand description

Compiles a checked program: its functions, its states’ starting values, and every dynamic part of its windows and views, then emits the nifty_rt::ProgramDesc that describes them to the runtime.

Modules§

body 🔒
Compiling one function body: statements, expressions and places, with the reference counting that keeps values’ sharing invisible.
menu 🔒
The menu bar: its menus as data the runtime reads, and their items’ compiled actions, which share one frame of locals.
runtime 🔒
The runtime calls compiled code makes, each imported once with its C signature.
types 🔒
The type descriptors compiled code hands the runtime. The built-in types are the runtime’s own; each list and struct type is emitted once, after the code that uses it, since struct types can lead back to themselves.
ui 🔒
Windows and views: their templates, and the functions behind each template’s dynamic parts, which the runtime calls with the template’s frame.

Structs§

List 🔒
An array emitted as data, ready to be pointed at by a nifty_rt::Slice.
Shared 🔒
What every function being compiled consults besides the module.
Spans 🔒
The spans failures point at, numbered in the order code first uses them.

Functions§

compile
Compiles program into emitter, and returns its nifty_rt::ProgramDesc. locate says where each span is, for the errors the app may report.
compile_function 🔒
Arguments come in owned, into the first locals; a function releases its locals when it returns.
compile_state 🔒
A state’s starting value, written to out.
function_names 🔒
function_signature 🔒
Nifty functions take the context, then each argument as a slot, then where to write their result, and return whether they succeeded.
put_str 🔒
A Str field at offset holding text.
span_list 🔒
state_list 🔒

Type Aliases§

Result 🔒