From 5d889660f92ae85611ecd5680124c5e7bb20a1d2 Mon Sep 17 00:00:00 2001 From: fennecdjay Date: Mon, 23 Sep 2019 18:40:56 +0200 Subject: [PATCH] :shirt: Remove useless lines --- src/emit/emit.c | 4 +--- src/parse/check.c | 9 +-------- 2 files changed, 2 insertions(+), 11 deletions(-) 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) { -- 2.43.0