1#ifndef REDUCT_CLOSURE_IMPL_H
2#define REDUCT_CLOSURE_IMPL_H 1
#define REDUCT_MALLOC(_size)
reduct_uint64_t reduct_handle_t
Handle type.
#define REDUCT_ASSERT(_cond)
#define REDUCT_FREE(_ptr)
REDUCT_API reduct_closure_t * reduct_closure_new(struct reduct *reduct, reduct_function_t *function)
Allocate a new closure.
#define REDUCT_CLOSURE_SMALL_MAX
The maximum number of small constants.
REDUCT_API void reduct_closure_deinit(reduct_closure_t *closure)
Deinitialize a closure structure.
#define REDUCT_CONST_SLOT_ITEM(_item)
Create a constant slot containing an item.
#define REDUCT_HANDLE_FROM_FLOAT(_val)
Create a handle from a float.
#define REDUCT_HANDLE_FROM_INT(_val)
Create a handle from an integer.
#define REDUCT_HANDLE_FROM_ITEM(_ptr)
Create a handle from an item pointer.
#define REDUCT_HANDLE_NONE
Invalid handle constant.
#define REDUCT_ITEM_FLAG_INT_SHAPED
Item is an integer shaped atom.
#define REDUCT_ITEM_FLAG_FLOAT_SHAPED
Item is a float shaped atom.
REDUCT_API reduct_item_t * reduct_item_new(struct reduct *reduct)
Allocate a new Reduct item.
#define REDUCT_ITEM_TYPE_CLOSURE
A closure.
reduct_int64_t integerValue
Pre-computed integer value, item must have REDUCT_ITEM_FLAG_INT_SHAPED.
reduct_float_t floatValue
Pre-computed float value, item must have REDUCT_ITEM_FLAG_FLOAT_SHAPED.
reduct_handle_t * constants
The array of constant slots forming the constant template.
reduct_function_t * function
Pointer to the prototype function item.
reduct_handle_t smallConstants[REDUCT_CLOSURE_SMALL_MAX]
reduct_const_slot_type_t type
The type of the constant slot.
struct reduct_item * item
The item contained in the constant slot.
Compiled function structure.
reduct_const_slot_t * constants
The array of constant slots forming the constant template.
reduct_uint16_t constantCount
Number of constants.
reduct_closure_t closure
A closure.
reduct_item_flags_t flags
Flags for the item.
reduct_atom_t atom
An atom.
reduct_item_type_t type
The type of the item.