Mercurial > repos > rhope
comparison 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 |
comparison
equal
deleted
inserted
replaced
175:03e4fa277291 | 176:327bcf35e094 |
---|---|
10 { | 10 { |
11 #ifdef ENABLE_PROFILING | 11 #ifdef ENABLE_PROFILING |
12 struct timeval proftime; | 12 struct timeval proftime; |
13 #endif | 13 #endif |
14 uint16_t resume,idx, vcparam_offset, last_vcparam; | 14 uint16_t resume,idx, vcparam_offset, last_vcparam; |
15 uint32_t *bytecode, *cur_instruction, op1, op2, accum; | |
16 object ** interp_consts; | |
17 void * interp_dispatch[] = { | |
18 &&interp_call, | |
19 &&interp_param, | |
20 &&interp_load, | |
21 &&interp_and, | |
22 &&interp_or, | |
23 &&interp_not, | |
24 &&interp_branch, | |
25 &&interp_saveresult, | |
26 &&interp_addref, | |
27 &&interp_release, | |
28 &&interp_return, | |
29 &&interp_nop, | |
30 &&interp_nop, | |
31 &&interp_nop, | |
32 &&interp_nop, | |
33 &&interp_nop | |
34 }; | |
35 | |
15 context *ct,*temp_ct; | 36 context *ct,*temp_ct; |
16 void *tmp; | 37 void *tmp; |
17 calldata * cdata, *temp_cdata, *my_cdata; | 38 calldata * cdata, *temp_cdata, *my_cdata; |
18 DispatchVar | 39 DispatchVar |
19 FuncDef(Build) | 40 FuncDef(Build) |
20 FuncDef(BlueprintSP_Of) | 41 FuncDef(BlueprintSP_Of) |
21 FuncDef(ID) | 42 FuncDef(ID) |
22 FuncDef(BlueprintSP_FromSP_ID) | 43 FuncDef(BlueprintSP_FromSP_ID) |
44 void ** lv_RunSP_Bytecode; | |
23 | 45 |