eCastF2I,
eTime_Advance,
eSetCode,
- eFuncPtr,
- eFuncMember,
- eFuncUsr,
eRegPop,
eRegPush,
eReg2Mem,
eReg2Mem4,
eOverflow,
- eNext,
eFuncUsrEnd,
eFuncMemberEnd,
eSporkIni,
#define CastF2I (f_instr)eCastF2I
#define Time_Advance (f_instr)eTime_Advance
#define SetCode (f_instr)eSetCode
-#define FuncPtr (f_instr)eFuncPtr
-#define FuncMember (f_instr)eFuncMember
-#define FuncUsr (f_instr)eFuncUsr
#define RegPop (f_instr)eRegPop
#define RegPush (f_instr)eRegPush
#define Reg2Mem (f_instr)eReg2Mem
#define Reg2Mem4 (f_instr)eReg2Mem4
#define Overflow (f_instr)eOverflow
-#define Next (f_instr)eNext
#define FuncUsrEnd (f_instr)eFuncUsrEnd
#define FuncMemberEnd (f_instr)eFuncMemberEnd
#define SporkIni (f_instr)eSporkIni
&&firassign, &&firadd, &&firsub, &&firmul, &&firdiv,
&&itof, &&ftoi,
&&timeadv,
- &&setcode, &&funcptr, &&funcmember,
- &&funcusr, &®pop, &®push, &®tomem, &®tomemother, &&overflow, &&next, &&funcusrend, &&funcmemberend,
+ &&setcode,
+ &®pop, &®push, &®tomem, &®tomemother, &&overflow, &&funcusrend, &&funcmemberend,
&&sporkini, &&sporkfunc, &&sporkmemberfptr, &&sporkexp, &&forkend, &&sporkend,
&&brancheqint, &&branchneint, &&brancheqfloat, &&branchnefloat,
&&arrayappend, &&autoloop, &&autoloopptr, &&autoloopcount, &&arraytop, &&arrayaccess, &&arrayget, &&arrayaddr, &&arrayvalid,
VM_OUT
break;
setcode:
- a.code = *(VM_Code*)(reg-SZ_INT);
-funcptr:
PRAGMA_PUSH()
reg -= SZ_INT;
a.code = *(VM_Code*)reg;
- if(!GET_FLAG((VM_Code)a.code, builtin))
- goto funcusr;
+ if(!GET_FLAG((VM_Code)a.code, builtin)) {
+ register const m_uint push = *(m_uint*)(reg + SZ_INT) + *(m_uint*)(mem-SZ_INT);
+ mem += push;
+ *(m_uint*) mem = push;mem += SZ_INT;
+ *(VM_Code*) mem = code; mem += SZ_INT;
+ *(m_uint*) mem = PC + VAL2; mem += SZ_INT;
+ *(m_uint*) mem = a.code->stack_depth; mem += SZ_INT;
+ next = eFuncUsrEnd;
+ } else {
+ mem += *(m_uint*)(reg + SZ_INT);
+ next = eFuncMemberEnd;
+ }
PRAGMA_POP()
-funcmember:
- mem += *(m_uint*)(reg + SZ_INT);
- next = eFuncMemberEnd;
- goto regpop;
-funcusr:
-{
- register const m_uint push = *(m_uint*)(reg + SZ_INT) + *(m_uint*)(mem-SZ_INT);
- mem += push;
- *(m_uint*) mem = push;mem += SZ_INT;
- *(VM_Code*) mem = code; mem += SZ_INT;
- *(m_uint*) mem = PC + VAL2; mem += SZ_INT;
- *(m_uint*) mem = a.code->stack_depth; mem += SZ_INT;
- next = eFuncUsrEnd;
-}
regpop:
reg -= VAL;
DISPATCH();
exception(shred, "StackOverflow");
continue;
}
-next:
PRAGMA_PUSH()
goto *dispatch[next];
PRAGMA_POP()