From 99a48bce35bad0c2e82495a32187ec2f242b48c2 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Astor?= Date: Sun, 8 Mar 2020 17:47:26 +0100 Subject: [PATCH] :art: Remove useless variadic value --- src/parse/check.c | 12 ------------ 1 file changed, 12 deletions(-) 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; } -- 2.43.0