Mercurial > hg > CbC > CbC_gcc
changeset 136:4627f235cf2a
fix c-next example
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Thu, 08 Nov 2018 14:11:56 +0900 |
parents | 71d4882a9ac3 |
children | d22083d7f10b |
files | CbC-examples/Makefile CbC-examples/c-next.c |
diffstat | 2 files changed, 9 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/CbC-examples/Makefile Thu Nov 08 06:52:59 2018 +0900 +++ b/CbC-examples/Makefile Thu Nov 08 14:11:56 2018 +0900 @@ -1,4 +1,4 @@ -TEST = arg.exe conv1.exe fact-a.exe goto.exe loto6.exe stack1.exe test02.exe test05.exe test1.exe test2.exe test_cs.exe test_csp1.exe test_func2code.exe test_para2.exe test_para3.exe test_para4.exe test_para.exe test_tree.exe tmp1.exe tmp2.exe tmp4.exe tmpa.exe too-long-argument.exe +TEST = arg.exe conv1.exe fact-a.exe goto.exe loto6.exe stack1.exe test02.exe test05.exe test1.exe test2.exe test_cs.exe test_csp1.exe test_func2code.exe test_para2.exe test_para3.exe test_para4.exe test_para.exe test_tree.exe tmp1.exe tmp2.exe tmp4.exe tmpa.exe too-long-argument.exe c-next.exe .SUFFIXES: .exe
--- a/CbC-examples/c-next.c Thu Nov 08 06:52:59 2018 +0900 +++ b/CbC-examples/c-next.c Thu Nov 08 14:11:56 2018 +0900 @@ -5,7 +5,6 @@ typedef long* MVMRegister; typedef void* MVMCompUnit; typedef void* MVMCallsite; -typedef void* MVMThreadContext; typedef struct MVMThreadContext { MVMuint8 **interp_cur_op; @@ -41,6 +40,8 @@ } INTER,*INTERP; +__code cbc_next(INTERP i); + __code cbc_no_op(INTERP i){ goto cbc_next(i); } @@ -62,16 +63,20 @@ } int interp_run(MVMThreadContext *tc){ + return 0; } int main(int argc, char **argv){ INTER inter = {0,0,0,0,0,0,0,0,0}; INTERP i = &inter; - MVMuint8 cur_ops = {0,1,2,0,3,2}; + MVMuint8 cur_ops[] = {0,1,2,0,3,2}; i->main_ret = _CbC_return; i->env = _CbC_environment; - i->cur_op = &cur_ops; + i->cur_op = cur_ops; + + MVMThreadContext tc0, *tc; + tc = &tc0; tc->interp_cur_op = &i->cur_op; tc->interp_bytecode_start = &i->bytecode_start;