From: Jérémie Astor Date: Sun, 8 Mar 2020 16:47:26 +0000 (+0100) Subject: :art: Remove useless variadic value X-Git-Tag: nightly~1726^2~42 X-Git-Url: http://10.10.0.4:5575/?a=commitdiff_plain;h=99a48bce35bad0c2e82495a32187ec2f242b48c2;p=gwion.git :art: Remove useless variadic value --- diff --git a/src/parse/check.c b/src/parse/check.c index c1ca2097..73819a0a 100644 --- a/src/parse/check.c +++ b/src/parse/check.c @@ -1295,26 +1295,14 @@ ANN static m_bool check_func_def_override(const Env env, const Func_Def fdef) { return GW_OK; } -ANN static Value set_variadic(const Env env) { - const Value variadic = new_value(env->gwion->mp, env->gwion->type[et_vararg], "vararg"); - SET_FLAG(variadic, checked); - nspc_add_value(env->curr, insert_symbol("vararg"), variadic); - return variadic; -} - ANN m_bool check_fdef(const Env env, const Func_Def fdef) { if(fdef->base->args) CHECK_BB(check_func_args(env, fdef->base->args)) -// else -// UNSET_FLAG(fdef->base->func, pure); - const Value variadic = GET_FLAG(fdef, variadic) ? set_variadic(env) : NULL; if(!GET_FLAG(fdef, builtin)) { if(fdef->d.code) CHECK_BB(check_stmt_code(env, &fdef->d.code->d.stmt_code)) } else fdef->base->func->code->stack_depth = fdef->stack_depth; - if(variadic) - REM_REF(variadic, env->gwion) return GW_OK; }