Mercurial > repos > rhope
diff runtime/rhopefuncs_prolog.c @ 176:327bcf35e094
Add bytecode interpreter
author | Mike Pavone <pavone@retrodev.com> |
---|---|
date | Wed, 08 Jun 2011 23:24:29 -0700 |
parents | bac2c74801f0 |
children | e57c151f351e |
line wrap: on
line diff
--- a/runtime/rhopefuncs_prolog.c Wed Jun 08 23:24:15 2011 -0700 +++ b/runtime/rhopefuncs_prolog.c Wed Jun 08 23:24:29 2011 -0700 @@ -12,6 +12,27 @@ struct timeval proftime; #endif uint16_t resume,idx, vcparam_offset, last_vcparam; + uint32_t *bytecode, *cur_instruction, op1, op2, accum; + object ** interp_consts; + void * interp_dispatch[] = { + &&interp_call, + &&interp_param, + &&interp_load, + &&interp_and, + &&interp_or, + &&interp_not, + &&interp_branch, + &&interp_saveresult, + &&interp_addref, + &&interp_release, + &&interp_return, + &&interp_nop, + &&interp_nop, + &&interp_nop, + &&interp_nop, + &&interp_nop + }; + context *ct,*temp_ct; void *tmp; calldata * cdata, *temp_cdata, *my_cdata; @@ -20,4 +41,5 @@ FuncDef(BlueprintSP_Of) FuncDef(ID) FuncDef(BlueprintSP_FromSP_ID) + void ** lv_RunSP_Bytecode;