Runtime

group runtime

Defines

ML_ARG_CACHE_SIZE
ml_alloc_args(COUNT)
ml_context_get(CONTEXT, INDEX)
ml_simple_inline(VALUE, COUNT, ARGS...)
SIZE_BITS
MLC_DECL_CONSTANT
MLC_DECL_FORWARD
MLC_DECL_BACKFILL
MLC_DECL_BYREF
MLC_DECL_ASVAR
ML_STATE_FN2(NAME, FUNCTION)
ML_STATE_FN(NAME)

Typedefs

typedef int (*ml_config_fn)(ml_context_t *Context)
typedef void (*ml_state_fn)(ml_state_t *State, ml_value_t *Result)
typedef ml_value_t *(*ml_getter_t)(void *Globals, const char *Name, const char *Source, int Line, int Mode)
typedef ml_value_t *(*ml_setter_t)(void *Globals, const char *Name, ml_value_t *Value)
typedef struct ml_reference_t ml_reference_t
typedef struct ml_source_t ml_source_t
typedef struct ml_decl_t ml_decl_t
typedef struct ml_debugger_t ml_debugger_t
typedef struct ml_scheduler_t ml_scheduler_t
typedef int (*ml_scheduler_add_fn)(ml_scheduler_t *Scheduler, ml_state_t *State, ml_value_t *Value)
typedef void (*ml_scheduler_run_fn)(ml_scheduler_t *Scheduler)
typedef struct ml_scheduler_queue_t ml_scheduler_queue_t

Enums

Values:

enumerator ML_METHODS_INDEX
enumerator ML_VARIABLES_INDEX
enumerator ML_DEBUGGER_INDEX
enumerator ML_SCHEDULER_INDEX
enumerator ML_COUNTER_INDEX
enumerator ML_THREAD_INDEX
enumerator ML_CONTEXT_SIZE

Functions

ml_context_t *ml_context(ml_context_t *Parent) __attribute__((malloc))
int ml_context_index()
void ml_context_set(ml_context_t *Context, int Index, void *Value)
void ml_config_register(const char *Name, ml_config_fn Fn)
ml_config_fn ml_config_lookup(const char *Name)
ml_state_t *ml_state(ml_state_t *Caller) __attribute__((malloc))
void ml_default_state_run(ml_state_t *State, ml_value_t *Value)
void ml_result_state_run(ml_result_state_t *State, ml_value_t *Value)
ml_result_state_t *ml_result_state(ml_context_t *Context) __attribute__((malloc))
ml_call_state_t *ml_call_state(ml_state_t *Caller, int Count) __attribute__((malloc))
ml_value_t *ml_simple_call(ml_value_t *Value, int Count, ml_value_t **Args)
ml_value_t *ml_simple_assign(ml_value_t *Value, ml_value_t *Value2)
void ml_runtime_init(const char *ExecName)
ml_value_t *ml_reference(ml_value_t **Address) __attribute__((malloc))
ml_value_t *ml_uninitialized(const char *Name, ml_source_t Source) __attribute__((malloc))
void ml_uninitialized_use(ml_value_t *Uninitialized, ml_value_t **Slot)
void ml_uninitialized_set(ml_value_t *Uninitialized, ml_value_t *Value)
const char *ml_uninitialized_name(ml_value_t *Uninitialized)
ml_source_t ml_uninitialized_source(ml_value_t *Uninitialized)
static inline int ml_is_error(ml_value_t *Value)
ml_value_t * ml_error (const char *Error, const char *Format,...) __attribute__((malloc
ml_value_t format (printf, 2, 3)))
ml_value_t *ml_errorv(const char *Error, const char *Format, va_list Args) __attribute__((malloc))
ml_value_t *ml_error_unwrap(const ml_value_t *Value)
const char *ml_error_type(const ml_value_t *Value) __attribute__((pure))
const char *ml_error_message(const ml_value_t *Value) __attribute__((pure))
ml_value_t *ml_error_value(const ml_value_t *Value) __attribute__((pure))
int ml_error_source(const ml_value_t *Value, int Level, ml_source_t *Source)
ml_value_t *ml_error_trace_add(ml_value_t *Error, ml_source_t Source)
void ml_error_value_set(ml_value_t *Error, ml_value_t *Value)
void ml_error_print(const ml_value_t *Error)
void ml_error_fprint(FILE *File, const ml_value_t *Error)
const char *ml_error_value_type(const ml_value_t *Value) __attribute__((pure))
const char *ml_error_value_message(const ml_value_t *Value) __attribute__((pure))
int ml_error_value_source(const ml_value_t *Value, int Level, ml_source_t *Source)
ml_value_t *ml_error_value_error(ml_value_t *Value)
int ml_debugger_check(ml_state_t *State)
void ml_debugger_step_mode(ml_state_t *State, int StepOver, int StepOut)
ml_source_t ml_debugger_source(ml_state_t *State)
ml_decl_t *ml_debugger_decls(ml_state_t *State)
ml_value_t *ml_debugger_local(ml_state_t *State, int Index)
static inline void ml_state_schedule(ml_state_t *State, ml_value_t *Value)
ml_scheduler_queue_t *ml_scheduler_queue(int Slice)
uint64_t *ml_scheduler_queue_counter(ml_scheduler_queue_t *Queue)
ml_scheduler_queue_t *ml_default_queue_init(ml_context_t *Context, int Slice)
int ml_scheduler_queue_fill(ml_scheduler_queue_t *Queue)
ml_queued_state_t ml_scheduler_queue_next(ml_scheduler_queue_t *Queue)
int ml_scheduler_queue_add(ml_scheduler_queue_t *Queue, ml_state_t *State, ml_value_t *Value)
ml_queued_state_t ml_scheduler_queue_next_wait(ml_scheduler_queue_t *Queue)
int ml_scheduler_queue_add_signal(ml_scheduler_queue_t *Queue, ml_state_t *State, ml_value_t *Value)

Variables

ml_value_t *MLArgCache[ML_ARG_CACHE_SIZE]
ml_context_t MLRootContext
ml_type_t MLStateT[]
ml_state_t MLEndState[]
ml_type_t MLComparisonStateT[]
ml_type_t MLReferenceT[]
ml_type_t MLUninitializedT[]
ml_type_t MLErrorT[]
ml_type_t MLErrorValueT[]
ml_cfunction_t MLRaise[]
ml_cfunctionx_t MLBreak[]
ml_cfunctionx_t MLDebugger[]
ml_cfunctionx_t MLTrace[]
ml_cfunctionx_t MLFinalizer[]
ml_type_t MLSemaphoreT[]
ml_type_t MLConditionT[]
ml_type_t MLRWLockT[]
ml_type_t MLChannelT[]
struct ml_context_t
struct ml_state_t
struct ml_result_state_t
struct ml_call_state_t
struct ml_iter_state_t
struct ml_comparison_state_t
struct ml_reference_t
struct ml_source_t
struct ml_decl_t
struct ml_debugger_t
struct ml_scheduler_t
struct ml_queued_state_t