From: fennecdjay Date: Thu, 10 Oct 2019 14:19:07 +0000 (+0200) Subject: :art: remove tmpl_rettype as useless X-Git-Tag: nightly~2198^2~15 X-Git-Url: http://10.10.0.4:5575/?a=commitdiff_plain;h=82ccb209209b0229ff20bb52cd42d3d3f09ca204;p=gwion.git :art: remove tmpl_rettype as useless --- diff --git a/src/emit/emit.c b/src/emit/emit.c index ad16f13f..cd9b920d 100644 --- a/src/emit/emit.c +++ b/src/emit/emit.c @@ -1811,15 +1811,6 @@ ANN static m_bool emit_func_def_body(const Emitter emit, const Func_Def fdef) { return GW_OK; } -ANN static m_bool tmpl_rettype(const Emitter emit, const Func_Def fdef) { - if(fdef->base->tmpl) - CHECK_BB(template_push_types(emit->env, fdef->base->tmpl)) - const m_bool ret = emit_cdef(emit, fdef->base->ret_type->e->def); - if(fdef->base->tmpl) - emit_pop_type(emit); - return ret; -} - ANN static m_bool emit_fdef(const Emitter emit, const Func_Def fdef) { CHECK_BB(emit_func_def_body(emit, fdef)) emit_func_def_return(emit); @@ -1841,8 +1832,6 @@ ANN static m_bool emit_func_def(const Emitter emit, const Func_Def fdef) { const Func former = emit->env->func; if(tmpl_base(fdef->base->tmpl)) return GW_OK; - if(GET_FLAG(fdef->base->ret_type, template) && !GET_FLAG(fdef->base->ret_type, emit)) - CHECK_BB(tmpl_rettype(emit, fdef)) if(SAFE_FLAG(emit->env->class_def, builtin) && GET_FLAG(emit->env->class_def, template)) return GW_OK; if(!emit->env->class_def && !GET_FLAG(fdef, global) && !fdef->base->tmpl && !emit->env->scope->depth)