Virtual Machine
[Tinyaml]


Detailed Description

The VM blabla TODO


Modules

 Management
 Engine
 The engine implements the actual VM execution by providing the necessary methods listed in _vm_engine_t.
 Compiler
 Programs : reading, compiling, executing
 Threads
 Implements an execution context for programs to execute. There is no real API for accessing and modifying a given thread, since all standard interaction is done in the current thread At opcode level.
 Function objects (dynamic functions)
 At opcode level

Data Structures

struct  _vm_engine_t
struct  _opcode_dict_t
struct  _vm_t

Typedefs

typedef struct _vm_tvm_t
 An instance of the Virtual Machine.
typedef struct
_opcode_t
opcode_t
 An entry of the the VM's opcode dictionary.
typedef struct
_vm_engine_t
vm_engine_t
typedef struct
_opcode_dict_t
opcode_dict_t
typedef struct
_data_stack_entry_t
vm_data_t
 One piece of data.
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  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
}

Functions

vm_t _VM_CALL vm_collect (vm_t vm, vm_obj_t o)
 insert o into the VM's collection list
vm_t _VM_CALL vm_uncollect (vm_t vm, vm_obj_t o)
 remove o from the VM's collection list
int vm_printf (const char *fmt,...)
 output formatted data to VM's stdout.
int vm_printerrf (const char *fmt,...)
 output formatted data to VM's stderr.

Variables

volatile vm_t _glob_vm


Typedef Documentation

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 _vm_engine_t* vm_engine_t

typedef struct _opcode_dict_t* opcode_dict_t

typedef struct _data_stack_entry_t* vm_data_t

One piece of data.

typedef void _VM_CALL(* opcode_stub_t)(vm_t, word_t t)

Signature for all C opcode routines.


Enumeration Type Documentation

enum opcode_arg_t

Valid Opcode Arguments.

Enumerator:
OpcodeNoArg  No argument
OpcodeArgInt  32-bit signed integer
OpcodeArgFloat  32-bit floating point
OpcodeArgPtr 
Deprecated:
unused.
OpcodeArgLabel  Label
OpcodeArgString  Static string
OpcodeArgEnvSym  Global symbol
OpcodeTypeMax  Boundary
Note:
This is not a valid type.

enum scheduler_algorithm_t

Enumerator:
SchedulerIdle 
SchedulerMonoThread 
SchedulerRoundRobin 
SchedulerAlgoMax 

enum vm_data_type_t

Enumerator:
DataInt  32-bit integer
DataFloat  32-bit floating point
DataString  static string
DataManagedObjectFlag  Managed object types have this bit set
DataObjStr  Managed string
DataObjSymTab  Managed symbol table
DataObjMutex  Managed mutex
DataObjThread  Managed thread
DataObjArray  Managed dynamic array
DataObjEnv  Managed env
DataObjStack  Managed stack
DataObjFun  Managed function object
DataObjVObj  Reserved for object model management. VObj should be a dynarray with a header.
DataObjUser  Managed user object. (meant for extensions)
DataTypeMax  Boundary
Note:
This is not a valid type.


Function Documentation

vm_t _VM_CALL vm_collect ( vm_t  vm,
vm_obj_t  o 
)

insert o into the VM's collection list

For internal use only.

vm_t _VM_CALL vm_uncollect ( vm_t  vm,
vm_obj_t  o 
)

remove o from the VM's collection list

For internal use only.

int vm_printf ( const char *  fmt,
  ... 
)

output formatted data to VM's stdout.

int vm_printerrf ( const char *  fmt,
  ... 
)

output formatted data to VM's stderr.


Variable Documentation

volatile vm_t _glob_vm


Generated on Wed Feb 6 14:46:05 2008 for TinyaML by  doxygen 1.5.3