Skip to main content

Module compile

Module compile 

Source
Expand description

AST-to-instruction compiler.

Transforms an EvalTree into an ExpressionEvaluator by generating a sequence of Instrs.

The compiler walks the tree in post-order, assigning stack slots and emitting instructions for each node.

Functionsยง

compile_atom
Compile an Atom into an ExpressionEvaluator.
compile_atom_with
Compile an Atom into an ExpressionEvaluator with a function map.
compile_atoms_multi
Compile multiple Atoms into a single multi-output ExpressionEvaluator, sharing constants, CSE, and stack slots across all outputs.
compile_atoms_multi_with
Compile multiple Atoms with a function map into a single multi-output ExpressionEvaluator.
compile_tree
Compile an EvalTree into an ExpressionEvaluator.
compile_tree_with
Compile an EvalTree with an optional function map.
compile_trees_multi
Compile multiple EvalTrees into a single multi-output ExpressionEvaluator.