From: Jérémie Astor Date: Thu, 28 Apr 2022 22:03:10 +0000 (+0200) Subject: :art: remove SetRecurs X-Git-Tag: nightly~275^2~19 X-Git-Url: http://10.10.0.4:5575/?a=commitdiff_plain;h=9cde0a9ec3b6671ac720b0159580f1559f796c50;p=gwion.git :art: remove SetRecurs --- diff --git a/include/instr.h b/include/instr.h index 9e0ce934..2b9b5392 100644 --- a/include/instr.h +++ b/include/instr.h @@ -80,7 +80,6 @@ ANN void free_dottmpl(struct dottmpl_ *); ANN m_bool traverse_dot_tmpl(const Emitter emit, const struct dottmpl_ *dt); INSTR(SetFunc); -INSTR(SetRecurs); INSTR(SetCtor); // optimizations #ifdef OPTIMIZE diff --git a/src/emit/emit.c b/src/emit/emit.c index 0f5e17c5..2fa8c504 100644 --- a/src/emit/emit.c +++ b/src/emit/emit.c @@ -1714,12 +1714,6 @@ ANN m_bool emit_exp_call1(const Emitter emit, const Func f, if (tmpl && !is_fptr(emit->gwion, f->value_ref->type)) { if (emit->env->func != f) CHECK_BB(emit_template_code(emit, f)); - else { // recursive function. (maybe should be used only for global funcs) - /* const Instr back = (Instr) vector_size(&emit->code->instr) ? - (Instr)vector_back(&emit->code->instr) : emit_add_instr(emit, - RegPushImm); back->opcode = eOP_MAX; back->execute = SetRecurs; - back->m_val = 0;*/ - } } else if (emit->env->func != f && !f->value_ref->from->owner_class && !f->code && !is_fptr(emit->gwion, f->value_ref->type)) { if (fbflag(f->def->base, fbflag_op)) { diff --git a/src/lib/instr.c b/src/lib/instr.c index 1e3843ec..f9f546e4 100644 --- a/src/lib/instr.c +++ b/src/lib/instr.c @@ -135,13 +135,6 @@ INSTR(SetFunc) { shred->reg += SZ_INT; } -INSTR(SetRecurs) { -exit(4); - BYTE(eRegPushImm) - VAL = *(m_uint *)(shred->reg) = (m_uint)shred->code; - shred->reg += SZ_INT; -} - INSTR(SetCtor) { BYTE(eRegSetImm) const Type t = (Type)instr->m_val;