Mercurial > hg > CbC > CbC_gcc
changeset 142:c83ff0b5a2ed
merge
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Thu, 22 Nov 2018 19:45:33 +0900 |
parents | ce508c72660f (current diff) ae07388db637 (diff) |
children | 76e1cf5455ef |
files | CbC-examples/c-next.c |
diffstat | 1 files changed, 4 insertions(+), 15 deletions(-) [+] |
line wrap: on
line diff
--- a/CbC-examples/c-next.c Thu Nov 22 19:44:39 2018 +0900 +++ b/CbC-examples/c-next.c Thu Nov 22 19:45:33 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; @@ -36,9 +35,6 @@ MVMThreadContext *tc; - //__code (*ret)(); - //__code (*main_ret)(); - __code (*ret)(int, void*); __code (*main_ret)(int, void*); void *env; @@ -46,6 +42,7 @@ __code cbc_no_op(INTERP); __code cbc_exit(INTERP); +__code cbc_next(INTERP); __code (* CODES[])(INTERP) = { cbc_no_op, @@ -67,22 +64,14 @@ goto i->main_ret(0,i->env); } -//__code main_return(int i,stack sp) { -// if (loop-->0) -// goto f(233,sp); -// printf("#0103:%d\n",i); -// goto (( (struct main_continuation *)sp)->main_ret)(0, -// ((struct main_continuation *)sp)->env); -//} int interp_run(MVMThreadContext *tc){ - INTER inter = {0,0,0,0,0,0,0,0,0}; + INTER inter = {0,0,0,0,0,0,0,0}; INTERP i = &inter; - MVMuint8 cur_op[] = {0,1,1,0,1,2}; -// i->ret = main_return; + MVMuint16 cur_op[] = {0,1,1,0,1,2}; i->main_ret = _CbC_return; i->env = _CbC_environment; - i->cur_op = cur_op; + i->cur_op = (MVMuint8 *)cur_op; tc->interp_cur_op = &i->cur_op; tc->interp_bytecode_start = &i->bytecode_start;