From: fennecdjay Date: Mon, 23 Sep 2019 16:40:56 +0000 (+0200) Subject: :shirt: Remove useless lines X-Git-Tag: nightly~2212^2~3 X-Git-Url: http://10.10.0.4:5575/?a=commitdiff_plain;h=5d889660f92ae85611ecd5680124c5e7bb20a1d2;p=gwion.git :shirt: Remove useless lines --- diff --git a/src/emit/emit.c b/src/emit/emit.c index abaca1d6..0b072b24 100644 --- a/src/emit/emit.c +++ b/src/emit/emit.c @@ -516,9 +516,7 @@ ANN static m_bool prim_id(const Emitter emit, const Exp_Primary* prim) { struct SpecialId_ * spid = specialid_get(emit->gwion, prim->d.var); if(spid) return specialid_instr(emit, spid, prim) ? GW_OK : GW_ERROR; - else - emit_symbol(emit, prim); - return GW_OK; + return emit_symbol(emit, prim); } ANN static m_bool prim_tuple(const Emitter emit, const Exp_Primary * primary) { diff --git a/src/parse/check.c b/src/parse/check.c index 8f8389bf..30a4638e 100644 --- a/src/parse/check.c +++ b/src/parse/check.c @@ -262,14 +262,7 @@ ANN static Type prim_id(const Env env, Exp_Primary* primary) { struct SpecialId_ * spid = specialid_get(env->gwion, primary->d.var); if(spid) return specialid_type(env, spid, primary); - const m_str str = s_name(primary->d.var); - if(!strcmp(str, "__func__")) { - primary->primary_type = ae_primary_str; - primary->d.str = env->func ? env->func->name : env->class_def ? - env->class_def->name : env->name; - return prim_str(env, primary); - } else - return prim_id_non_res(env, primary); + return prim_id_non_res(env, primary); } ANN static m_bool vec_value(const Env env, Exp e, const m_str s) {