Go to the source code of this file.
Defines | |
#define | _VM_CALL |
#define | _WC_ARGTYPE_BSZ 4 |
Bitsize of argument_type field in wordcode. | |
#define | _WC_OP_BSZ (32-_WC_ARGTYPE_BSZ) |
Bitsize of opcode_index field in wordcode. | |
#define | _WC_OP_MASK ((1<<_WC_OP_BSZ)-1) |
Mask of opcode_index field in wordcode. | |
#define | _WC_ARGTYPE_SHIFT _WC_OP_BSZ |
Shift of opcode_index field in wordcode. | |
#define | WC_GET_OP(_wc) (((word_t)(_wc))&_WC_OP_MASK) |
Get opcode_index from wordcode. | |
#define | WC_GET_ARGTYPE(_wc) (((word_t)(_wc))>>_WC_ARGTYPE_SHIFT) |
Get argument_type from wordcode. | |
#define | MAKE_WC(_a, _op) (((_a)<<_WC_ARGTYPE_SHIFT)|(_op)) |
Build wordcode from argument_type and opcode_index. | |
Typedefs | |
typedef struct _vm_t * | vm_t |
An instance of the Virtual Machine. | |
typedef struct _opcode_t * | opcode_t |
An entry of the the VM's opcode dictionary. | |
typedef struct _program_t * | program_t |
An instance of a program. | |
typedef unsigned long int | word_t |
The basic processing unit. | |
typedef word_t | value_t |
Just an alias. | |
typedef struct _vm_obj_t * | vm_obj_t |
A managed object. | |
typedef struct _vm_dyn_env_t * | vm_dyn_env_t |
A map. | |
typedef struct _vm_dyn_func_t * | vm_dyn_func_t |
A function object. | |
typedef struct _dynarray_t * | dynarray_t |
An instance of a dynamic array of words. | |
typedef word_t | dynarray_index_t |
Type for dynarray indices. | |
typedef word_t | dynarray_value_t |
Type for dynarray values. | |
typedef struct _generic_stack_t * | generic_stack_t |
An instance of a generic stack. | |
typedef dynarray_t | code_seg_t |
A code segment. | |
typedef struct _text_seg_t * | text_seg_t |
A text segment (holds static strings). | |
typedef struct _mutex_t * | mutex_t |
typedef struct _thread_t * | thread_t |
typedef struct _vm_engine_t * | vm_engine_t |
typedef struct _opcode_dict_t * | opcode_dict_t |
typedef struct _slist_t * | opcode_chain_t |
A chain of symbolic program elements. | |
typedef struct _opcode_chain_node_t * | opcode_chain_node_t |
An atomic symbolic program element. | |
typedef generic_stack_t | vm_blocker_t |
An instance of a thread blocker. | |
typedef struct _data_stack_entry_t * | vm_data_t |
One piece of data. | |
typedef struct _call_stack_entry_t * | call_stack_entry_t |
A caller. | |
typedef struct _call_stack_entry_t * | catch_stack_entry_t |
A catcher. | |
typedef void _VM_CALL(* | opcode_stub_t )(vm_t, word_t t) |
Signature for all C opcode routines. | |
Enumerations | |
enum | opcode_arg_t { OpcodeNoArg = 0, OpcodeArgInt, OpcodeArgFloat, OpcodeArgPtr, OpcodeArgLabel, OpcodeArgString, OpcodeArgEnvSym, OpcodeTypeMax } |
Valid Opcode Arguments. More... | |
enum | thread_state_t { ThreadBlocked, ThreadReady, ThreadRunning, ThreadDying, ThreadZombie, ThreadStateMax } |
Thread states. More... | |
enum | scheduler_algorithm_t { SchedulerIdle = 0, SchedulerMonoThread, SchedulerRoundRobin, SchedulerAlgoMax } |
enum | vm_data_type_t { DataInt = 0, DataFloat = 1, DataString = OpcodeArgString, DataManagedObjectFlag = 0x100, DataObjStr, DataObjSymTab, DataObjMutex, DataObjThread, DataObjArray, DataObjEnv, DataObjStack, DataObjFun, DataObjVObj, DataObjUser, DataTypeMax } |
enum | opcode_chain_node_type_t { NodeOpcode, NodeLangDef, NodeLangPlug, NodeData, NodeLabel } |
Types of symbolic elements in a program. More... |
#define _VM_CALL |
#define _WC_ARGTYPE_BSZ 4 |
Bitsize of argument_type field in wordcode.
#define _WC_OP_BSZ (32-_WC_ARGTYPE_BSZ) |
Bitsize of opcode_index field in wordcode.
#define _WC_OP_MASK ((1<<_WC_OP_BSZ)-1) |
Mask of opcode_index field in wordcode.
#define _WC_ARGTYPE_SHIFT _WC_OP_BSZ |
Shift of opcode_index field in wordcode.
#define WC_GET_OP | ( | _wc | ) | (((word_t)(_wc))&_WC_OP_MASK) |
Get opcode_index from wordcode.
#define WC_GET_ARGTYPE | ( | _wc | ) | (((word_t)(_wc))>>_WC_ARGTYPE_SHIFT) |
Get argument_type from wordcode.
#define MAKE_WC | ( | _a, | |||
_op | ) | (((_a)<<_WC_ARGTYPE_SHIFT)|(_op)) |
Build wordcode from argument_type and opcode_index.