From 9cde0a9ec3b6671ac720b0159580f1559f796c50 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Astor?= Date: Fri, 29 Apr 2022 00:03:10 +0200 Subject: [PATCH] :art: remove SetRecurs --- include/instr.h | 1 - src/emit/emit.c | 6 ------ src/lib/instr.c | 7 ------- 3 files changed, 14 deletions(-) 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; -- 2.43.0