From: fennecdjay Date: Tue, 23 Jul 2019 05:45:49 +0000 (+0200) Subject: :shirt: Add missing pragma X-Git-Tag: nightly~2310 X-Git-Url: http://10.10.0.4:5575/?a=commitdiff_plain;h=1ac6432d8832d54ca2d47f6c9bffa4740eb2bd8a;p=gwion.git :shirt: Add missing pragma --- diff --git a/src/lib/shred.c b/src/lib/shred.c index 920cdfdd..9aa6783e 100644 --- a/src/lib/shred.c +++ b/src/lib/shred.c @@ -61,7 +61,10 @@ static MFUN(vm_shred_is_done) { 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) { diff --git a/src/vm/vm.c b/src/vm/vm.c index 2e4bd7c1..db8e46c4 100644 --- a/src/vm/vm.c +++ b/src/vm/vm.c @@ -641,10 +641,12 @@ sporkini: 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);