eGack,
eDotTmplVal,
eOP_MAX,
+ eEOC,
};
#define RegSetImm (f_instr)eRegSetImm
#define Gack (f_instr)eGack
#define DotTmplVal (f_instr)eDotTmplVal
#define OP_MAX (f_instr)eOP_MAX
+#define EOC (f_instr)eEOC
#endif
#include "array.h"
#include "nspc.h"
#include "shreduler_private.h"
-
+/*
INSTR(EOC) {
vm_shred_exit(shred);
}
-
+*/
INSTR(DTOR_EOC) {
const M_Object o = *(M_Object*)MEM(0);
o->type_ref = o->type_ref->parent;
&&staticint, &&staticfloat, &&staticother,
&&dotfunc, &&dotstaticfunc, &&staticcode, &&pushstr,
&&gcini, &&gcadd, &&gcend,
- &&gack, &®pushimm, &&other
+ &&gack, &®pushimm, &&other, &&eoc
};
const Shreduler s = vm->shreduler;
register VM_Shred shred;
shred->pc = pc;
instr->execute(shred, instr);
if(!s->curr)break;
-code = shred->code;
-ip = shred->code->instr->ptr + OFFSET;
-reg = shred->reg;
-mem = shred->mem;
-pc = shred->pc;
-DISPATCH()
+ code = shred->code;
+ ip = shred->code->instr->ptr + OFFSET;
+ reg = shred->reg;
+ mem = shred->mem;
+ pc = shred->pc;
+ DISPATCH()
+eoc:
+ shred->code = code;
+ shred->mem = mem;
+ vm_shred_exit(shred);
} while(s->curr);
MUTEX_UNLOCK(s->mutex);
}