19struct reduct_eval_frame;
33#define REDUCT_SCHEMA_INITIAL 4
34#define REDUCT_SCHEMA_GROWTH 2
36#define REDUCT_CONSTANTS_MAX 8
38#define REDUCT_SCRATCH_INITIAL 128
39#define REDUCT_SCRATCH_MAX 16
45typedef struct reduct_global
129 for (
size_t i = 0; i < len; i++)
131 hash ^= (
unsigned char)str[i];
Atom representation and operations.
#define REDUCT_ALWAYS_INLINE
Error handling and reporting.
Virtual machine evaluation.
#define REDUCT_FNV_PRIME
FNV-1a 32-bit prime.
#define REDUCT_FNV_OFFSET
FNV-1a 32-bit offset basis.
REDUCT_API void * reduct_userdata_get(reduct_t *reduct)
Get the user data pointer from the Reduct structure.
REDUCT_API void reduct_userdata_set(reduct_t *reduct, void *userdata)
Set the user data pointer for the Reduct structure.
static REDUCT_ALWAYS_INLINE uint32_t reduct_hash(const char *str, size_t len)
Hash a string.
REDUCT_API reduct_t * reduct_new(void)
Create a new Reduct environment.
REDUCT_API void reduct_free(reduct_t *reduct)
Free the Reduct structure.
REDUCT_API void reduct_args_set(reduct_t *reduct, int argc, char **argv)
Set the command line arguments for the Reduct structure.
Native function and intrinsic registration.
Scratch buffer allocation.
Per-thread arena-related state structure.
Global atom-related environment structure.
Per-thread eval-related state structure.
Global garbage collection-related state structure.
reduct_module_global_t struct reduct * threads
reduct_task_global_t task
reduct_optimize_global_t optimize
reduct_atom_global_t atom
reduct_item_global_t item
reduct_native_global_t native
reduct_schema_global_t schema
Global item-related state structure.
Per-thread item-related state structure.
Global module state structure.
Global native-related state structure.
Global optimization-related state structure.
Global schema-related state structure.
Per-thread scratch-related state structure.
Per-thread state structure.
reduct_arena_local_t arena
reduct_scratch_local_t scratch
Global thread-related state structure.