The builder is responsible for converting parsed S-expressions (ASTs) into the intermediate representation (IR) used by the optimizer and compiler.
◆ reduct_build()
Build an IR graph from an AST (parsed S-expression).
- Parameters
-
| reduct | Pointer to the Reduct structure. |
| ast | Handle to the root of the AST. |
- Returns
- Handle to the root IR node.
◆ reduct_build_register_intrinsics()
| REDUCT_API void reduct_build_register_intrinsics |
( |
struct reduct * |
reduct | ) |
|
Register the intrinsics used by the builder.
- Note
- Will be called by
reduct_new().
- Parameters
-
| reduct | Pointer to the Reduct structure. |
◆ reduct_builder_get_native_fn()
Get the native function associated with an opcode.
- Parameters
-
- Returns
- The native function, or NULL if not found.