From 4bc26e0d9811e10320f0b5aa3d366018a02541c8 Mon Sep 17 00:00:00 2001 From: fennecdjay Date: Mon, 26 Oct 2020 12:24:31 +0100 Subject: [PATCH] :art: Clean headers --- include/specialid.h | 7 +------ src/emit/emit.c | 5 +++++ src/parse/check.c | 1 - 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/include/specialid.h b/include/specialid.h index 4a1daee9..ebb7e140 100644 --- a/include/specialid.h +++ b/include/specialid.h @@ -3,7 +3,7 @@ struct SpecialId_; typedef Type (*idck)(const Env, const Exp_Primary*); -typedef Instr (*idem)(const Emitter, const Exp_Primary*); +typedef struct Instr_* (*idem)(const Emitter, const Exp_Primary*); struct SpecialId_ { Type type; @@ -24,10 +24,5 @@ ANN static inline Type specialid_type(const Env env, return spid->ck ? spid->ck(env, prim) : spid->type; } -ANN static inline Instr specialid_instr(const Emitter emit, - struct SpecialId_ *spid, const Exp_Primary* prim) { - return spid->exec ? emit_add_instr(emit, spid->exec) : spid->em(emit, prim); -} - ANN struct SpecialId_* specialid_get(const Gwion, const Symbol); #endif diff --git a/src/emit/emit.c b/src/emit/emit.c index 17d18020..27921731 100644 --- a/src/emit/emit.c +++ b/src/emit/emit.c @@ -465,6 +465,11 @@ ANN static m_bool emit_exp_slice(const Emitter emit, const Exp_Slice* range) { return GW_OK; } +ANN static inline Instr specialid_instr(const Emitter emit, + struct SpecialId_ *spid, const Exp_Primary* prim) { + return spid->exec ? emit_add_instr(emit, spid->exec) : spid->em(emit, prim); +} + ANN static m_bool emit_prim_id(const Emitter emit, const Symbol *data) { struct SpecialId_ * spid = specialid_get(emit->gwion, *data); if(spid) diff --git a/src/parse/check.c b/src/parse/check.c index bf1c580c..36200341 100644 --- a/src/parse/check.c +++ b/src/parse/check.c @@ -11,7 +11,6 @@ #include "import.h" #include "parse.h" #include "match.h" -#include "emit.h" #include "specialid.h" #include "tmp_resolve.h" -- 2.43.0