]> Nishi Git Mirror - gwion.git/commitdiff
:art: Update vm
authorfennecdjay <astor.jeremie@wanadoo.fr>
Wed, 17 Jul 2019 18:07:50 +0000 (20:07 +0200)
committerfennecdjay <astor.jeremie@wanadoo.fr>
Wed, 17 Jul 2019 18:07:50 +0000 (20:07 +0200)
src/vm/vm.c

index a3a8df93450f960b591508b00fe59d0119eb2b05..69e4c16356b58bd294e3f09ad6746e99b63b66a7 100644 (file)
@@ -300,7 +300,7 @@ ANN void vm_run(const VM* vm) { // lgtm [cpp/use-of-goto]
     &&timeadv,
     &&setcode, &&funcptr, &&funcmember,
     &&funcusr, &&regpop, &&regpush, &&regtomem, &&regtomemother, &&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)