Expand description
Cranelift codegen backend for Nova (the fast debug backend).
Translates monomorphized MIR into native code, through two paths:
compile_jit: in-memory JIT fornova run— runtime symbols are registered directly with the JIT.compile_object: native object bytes fornova build— the MIR entry is emitted asnova_mainplus an exported Cmain(argc, argv)wrapper, and runtime symbols resolve at link time against thenova-runtimestatic library.
MIR temps become Cranelift frontend Variables, so the SSA builder
inserts block parameters (phis) at join points automatically. Unit-class
temps carry no runtime value and are never materialized.
Structs§
- Compiled
Program - A JIT-compiled Nova program, ready to run in-process.
- Unresolved
Extern Symbol - An
externsymbol the JIT could not resolve at run time. This is a user error (a bad FFI declaration), not a compiler bug, so the driver reports it as a clean diagnostic rather than an internal error.
Constants§
- NOVA_
ENTRY_ SYMBOL - The symbol name the MIR
maingets in object files, so the exported C-ABImain(argc, argv)wrapper can keep the conventional name.
Functions§
- compile_
jit - JIT-compile a MIR module and return the runnable program.
- compile_
object - Compile a MIR module to native object-file bytes for
nova build. - lower_
module - Lower a typed HIR module to monomorphized MIR.
- mangle
- Mangle a function instance into a unique symbol name.