Reduct  v4.0.5-1-g4851deb
A functional and immutable language.
Loading...
Searching...
No Matches
eval.h File Reference

Virtual machine evaluation. More...

#include <reduct/function.h>
#include <reduct/handle.h>
#include <reduct/optimize.h>
Include dependency graph for eval.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  reduct_eval_frame_t
 Evaluation frame structure. More...
 
struct  reduct_eval_local_t
 Per-thread eval-related state structure. More...
 

Macros

#define REDUCT_EVAL_REGS_INITIAL   64
 The initial amount of registers.
 
#define REDUCT_EVAL_REGS_GROWTH_FACTOR   2
 The growth factor of the registers array.
 
#define REDUCT_EVAL_FRAMES_INITIAL   32
 The initial size of the frames array.
 
#define REDUCT_EVAL_FRAMES_GROWTH_FACTOR   2
 The growth factor of the frames array.
 

Functions

REDUCT_API void reduct_eval_local_init (reduct_eval_local_t *local)
 Initialize a local eval state.
 
REDUCT_API void reduct_eval_local_deinit (reduct_eval_local_t *local)
 Deinitialize a local eval state.
 
REDUCT_API reduct_handle_t reduct_eval (struct reduct *reduct, reduct_handle_t handle)
 Evaluates a handle.
 
REDUCT_API reduct_handle_t reduct_eval_file (struct reduct *reduct, const char *path, reduct_optimize_flags_t optimize)
 Parses, builds, optimizes, emits and evaluates a file.
 
REDUCT_API reduct_handle_t reduct_eval_string (struct reduct *reduct, const char *str, size_t len, reduct_optimize_flags_t optimize)
 Parses, builds, optimizes, emits and evaluates a string.
 
REDUCT_API reduct_handle_t reduct_eval_call (struct reduct *reduct, reduct_handle_t callable, size_t argc, reduct_handle_t *argv)
 Calls a Reduct callable (closure or native) with arguments.
 
REDUCT_API reduct_handle_t reduct_eval_call_v (struct reduct *reduct, reduct_handle_t callable, size_t argc,...)
 Calls a Reduct callable (closure or native) with variadic arguments.
 

Detailed Description

Virtual machine evaluation.

Definition in file eval.h.