From: Jérémie Astor Date: Tue, 26 May 2020 19:07:03 +0000 (+0200) Subject: :bug: Fix soprk stack X-Git-Tag: nightly~1506 X-Git-Url: http://10.10.0.4:5575/?a=commitdiff_plain;h=e9439dd4e3f958d48f6965895a026aa7184f78db;p=gwion.git :bug: Fix soprk stack --- diff --git a/src/emit/emit.c b/src/emit/emit.c index db22c519..c42789ef 100644 --- a/src/emit/emit.c +++ b/src/emit/emit.c @@ -1152,12 +1152,13 @@ ANN static m_bool spork_prepare_code(const Emitter emit, const struct Sporker *s } ANN static m_bool spork_prepare_func(const Emitter emit, const struct Sporker *sp) { - CHECK_BB(prepare_call(emit, &sp->exp->d.exp_call)) push_spork_code(emit, sp->is_spork ? SPORK_FUNC_PREFIX : FORK_CODE_PREFIX, sp->exp->pos); return call_spork_func(emit, &sp->exp->d.exp_call); } ANN static VM_Code spork_prepare(const Emitter emit, const struct Sporker *sp) { + if(!sp->code) + CHECK_BO(prepare_call(emit, &sp->exp->d.exp_call)) if((sp->code ? spork_prepare_code : spork_prepare_func)(emit, sp) > 0) return finalyze(emit, EOC); emit_pop_code(emit);