From e6b8baec6e683e17b1268ecdb0471da180e1a9db Mon Sep 17 00:00:00 2001 From: fennecdjay Date: Wed, 17 Jul 2019 20:07:50 +0200 Subject: [PATCH] :art: Update vm --- src/vm/vm.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/vm/vm.c b/src/vm/vm.c index a3a8df93..69e4c163 100644 --- a/src/vm/vm.c +++ b/src/vm/vm.c @@ -300,7 +300,7 @@ ANN void vm_run(const VM* vm) { // lgtm [cpp/use-of-goto] &&timeadv, &&setcode, &&funcptr, &&funcmember, &&funcusr, &®pop, &®push, &®tomem, &®tomemother, &&overflow, &&next, &&funcusrend, &&funcmemberend, - &&sporkini, &&sporkini, &&sporkfunc, &&sporkexp, &&forkend, &&sporkend, + &&sporkini, &&sporkini, &&sporkfunc, &&sporkmemberfptr, &&sporkexp, &&forkend, &&sporkend, &&brancheqint, &&branchneint, &&brancheqfloat, &&branchnefloat, &&arrayappend, &&autoloop, &&autoloopptr, &&autoloopcount, &&arraytop, &&arrayaccess, &&arrayget, &&arrayaddr, &&arrayvalid, &&newobj, &&addref, &&objassign, &&assign, &&remref, @@ -645,6 +645,15 @@ sporkfunc: *(m_uint*)(a.child->reg + i) = *(m_uint*)(reg + i + (m_int)VAL2); a.child->reg += VAL; DISPATCH() +sporkmemberfptr: + for(m_uint i = 0; i < VAL-SZ_INT; i+= SZ_INT) + *(m_uint*)(a.child->reg + i) = *(m_uint*)(reg + i + (m_int)VAL2+SZ_INT); + *(m_uint*)(a.child->reg+VAL-SZ_INT) = *(m_uint*)(reg+SZ_INT); + *(m_uint*)(a.child->reg+VAL-SZ_INT*2) = *(m_uint*)(reg-SZ_INT*2); + a.child->reg += VAL; + DISPATCH() + +//exit(2); sporkexp: // LOOP_OPTIM for(m_uint i = 0; i < VAL; i+= SZ_INT) -- 2.43.0