00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef _BML_CODE_H_
00021 #define _BML_CODE_H_
00022
00023
00024 typedef void _VM_CALL (*opcode_noarg_t) (vm_t, word_t);
00025 typedef void _VM_CALL (*opcode_int_t) (vm_t, int);
00026 typedef void _VM_CALL (*opcode_float_t) (vm_t, float);
00027 typedef void _VM_CALL (*opcode_ptr_t) (vm_t, void*);
00028 typedef void _VM_CALL (*opcode_label_t) (vm_t, int);
00029 typedef void _VM_CALL (*opcode_string_t) (vm_t, const char*);
00030 typedef void _VM_CALL (*opcode_opcode_t) (vm_t, word_t);
00031
00032 void vm_compile_noarg(vm_t, opcode_t);
00033 void vm_compile_int(vm_t, opcode_t);
00034 void vm_compile_float(vm_t, opcode_t);
00035 void vm_compile_ptr(vm_t, opcode_t);
00036 void vm_compile_label(vm_t, opcode_t);
00037 void vm_compile_string(vm_t, opcode_t);
00038 void vm_compile_opcode(vm_t, opcode_t);
00039
00040
00041
00042
00043 struct _opcode_t {
00044 const char* name;
00045 opcode_arg_t arg_type;
00046 opcode_stub_t exec;
00047 };
00048
00049
00050 #endif
00051