|
| REDUCT_API reduct_function_t * | reduct_compile (reduct_t *reduct, reduct_handle_t *ast) |
| | Compiles a Reduct AST into a callable bytecode function.
|
| |
| REDUCT_API void | reduct_compiler_init (reduct_compiler_t *compiler, reduct_t *reduct, reduct_function_t *function, reduct_compiler_t *enclosing) |
| | Initialize a compiler context.
|
| |
| REDUCT_API void | reduct_compiler_deinit (reduct_compiler_t *compiler) |
| | Deinitialize a compiler context.
|
| |
| REDUCT_API reduct_reg_t | reduct_reg_alloc (reduct_compiler_t *compiler) |
| | Allocate a new register.
|
| |
| REDUCT_API reduct_reg_t | reduct_reg_alloc_range (reduct_compiler_t *compiler, reduct_uint32_t count) |
| | Allocate a range of registers.
|
| |
| REDUCT_API void | reduct_reg_free (reduct_compiler_t *compiler, reduct_reg_t reg) |
| | Free a register.
|
| |
| REDUCT_API void | reduct_reg_free_range (reduct_compiler_t *compiler, reduct_reg_t start, reduct_uint32_t count) |
| | Free a range of registers.
|
| |
| static void | reduct_expr_build_atom (reduct_compiler_t *compiler, reduct_item_t *atom, reduct_expr_t *out) |
| |
| static void | reduct_expr_build_list (reduct_compiler_t *compiler, reduct_item_t *list, reduct_expr_t *out) |
| |
| REDUCT_API void | reduct_expr_build (reduct_compiler_t *compiler, reduct_item_t *item, reduct_expr_t *out) |
| | Compiles a single Reduct item into an expression descriptor.
|
| |
| REDUCT_API reduct_local_t * | reduct_local_def (reduct_compiler_t *compiler, reduct_atom_t *name) |
| | Define a new local variable.
|
| |
| REDUCT_API void | reduct_local_def_done (reduct_compiler_t *compiler, reduct_local_t *local, reduct_expr_t *expr) |
| | Finalize a local variable definition with its value expression.
|
| |
| REDUCT_API reduct_local_t * | reduct_local_add_arg (reduct_compiler_t *compiler, reduct_atom_t *name) |
| | Add a function argument local to the compiler context.
|
| |
| REDUCT_API void | reduct_local_pop (reduct_compiler_t *compiler, reduct_uint16_t toCount, reduct_expr_t *result) |
| | Pop local variables from the stack, releasing their registers if they are no longer used.
|
| |
| REDUCT_API reduct_local_t * | reduct_local_lookup (reduct_compiler_t *compiler, reduct_atom_t *name) |
| | Look up a local by name and return its expression.
|
| |