From: fennecdjay Date: Fri, 2 Sep 2022 11:48:51 +0000 (+0200) Subject: :art: Remove unused functions in closure.c X-Git-Tag: nightly~264^2~18 X-Git-Url: http://10.10.0.4:5575/?a=commitdiff_plain;h=d8e6a5c86f1a0ad7b805dae82d1c4c72918253d1;p=gwion.git :art: Remove unused functions in closure.c --- diff --git a/src/lib/closure.c b/src/lib/closure.c index 7b62ef64..12a817ca 100644 --- a/src/lib/closure.c +++ b/src/lib/closure.c @@ -73,19 +73,6 @@ static OP_CHECK(opck_fptr_call) { return mk_call(env, exp_self(bin), bin->rhs, bin->lhs); } -ANN static inline Exp cpy_nonext(const Env env, const Exp e) { - const MemPool mp = env->gwion->mp; - const Exp next = e->next; - e->next = NULL; - const Exp ret = cpy_exp(mp, e); - e->next = next; - if (!check_exp(env, ret)) { - free_exp(mp, ret); - return NULL; - } - return ret; -} - ANN Type upvalue_type(const Env env, Capture *cap) { const Value v = nspc_lookup_value1(env->curr, cap->xid); if(!v) ERR_O(cap->pos, _("non existing value")); // did_you_mean @@ -197,11 +184,6 @@ static m_bool td_match(const Env env, Type_Decl *id[2]) { return t1 == env->gwion->type[et_auto] ? GW_OK : GW_ERROR; } -ANN static inline bool handle_global(Func_Base *a, Func_Base *b) { - return (!b->func->value_ref->from->owner_class && - (!GET_FLAG(a, global) && a->func->value_ref->from->owner_class)); -} - ANN static m_bool fptr_args(const Env env, Func_Base *base[2]) { Arg_List args0 = base[0]->args, args1 = base[1]->args; const bool member = vflag(base[0]->func->value_ref, vflag_member); @@ -438,10 +420,6 @@ static OP_CHECK(opck_fptr_assign) { return bin->rhs->type; } -static inline int is_member(const Type from) { - return vflag(from->info->func->value_ref, vflag_member); -} - static OP_CHECK(opck_fptr_impl) { struct Implicit *impl = (struct Implicit *)data; const Func f = closure_def(impl->t)->base->func;