static MFUN(shred_yield) {
const VM_Shred s = ME(o);
const Shreduler sh = s->tick->shreduler;
- shredule(sh, s, GWION_EPSILON);
+ if(vector_size(shred->code->instr) - shred->pc > 1)
+ shredule(sh, s, GWION_EPSILON);
+ else
+ vm_shred_exit(shred);
}
static SFUN(vm_shred_from_id) {
DISPATCH()
sporkfunc:
// LOOP_OPTIM
+PRAGMA_PUSH()
for(m_uint i = 0; i < VAL; i+= SZ_INT)
*(m_uint*)(a.child->reg + i) = *(m_uint*)(reg + i + (m_int)VAL2);
a.child->reg += VAL;
DISPATCH()
+PRAGMA_POP()
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);