From f3960e435cce0b0e95786748eaf37f17fa20cc6f Mon Sep 17 00:00:00 2001 From: fennecdjay Date: Fri, 22 Feb 2019 16:27:54 +0100 Subject: [PATCH] :art: Remove useless functions --- include/env.h | 1 - include/import.h | 2 -- src/lib/import.c | 5 ----- src/oo/env.c | 10 ---------- 4 files changed, 18 deletions(-) diff --git a/include/env.h b/include/env.h index 629829285..53ae30f96 100644 --- a/include/env.h +++ b/include/env.h @@ -48,7 +48,6 @@ ANN m_bool compat_func(const __restrict__ Func_Def, const __restrict__ Func_Def) ANN Type known_type(const Env env, const Type_Decl*); ANN m_bool env_access(const Env env, const ae_flag flag); ANN void env_storage(const Env env, ae_flag* flag); -ANN2(1,2) void env_add_value(const Env, const m_str, const Type, const m_bool, void*); ANN void env_add_type(const Env, const Type); ANN Type find_type(const Env, ID_List); ANN m_bool already_defined(const Env env, const Symbol s, const uint pos); diff --git a/include/import.h b/include/import.h index c27a6a1c3..a32d4591e 100644 --- a/include/import.h +++ b/include/import.h @@ -34,8 +34,6 @@ typedef struct Gwi_* Gwi; ANN VM* gwi_vm(const Gwi); ANN2(1,2) ANEW Type gwi_mk_type(const Gwi, const m_str, const m_uint, const Type); ANN m_int gwi_add_type(const Gwi gwi, Type type); -ANN2(1,2,3)m_int gwi_add_value(const Gwi gwi, const m_str name, Type type, const m_bool is_const, void* data); - ANN2(1,2)m_int gwi_class_ini(const Gwi gwi, const Type type, const f_xtor pre_ctor, const f_xtor dtor); ANN m_int gwi_class_ext(const Gwi gwi, Type_Decl* td); ANN m_int gwi_class_end(const Gwi gwi); diff --git a/src/lib/import.c b/src/lib/import.c index 233e53ece..397e6d3d6 100644 --- a/src/lib/import.c +++ b/src/lib/import.c @@ -636,8 +636,3 @@ ANN m_int gwi_enum_end(const Gwi gwi) { free_stmt(stmt); return GW_OK; } - -m_int gwi_add_value(Gwi gwi, const m_str name, Type type, const m_bool is_const, void* value) { - env_add_value(gwi->env, name, type, is_const, value); - return GW_OK; -} diff --git a/src/oo/env.c b/src/oo/env.c index 88a0da91d..de50af360 100644 --- a/src/oo/env.c +++ b/src/oo/env.c @@ -75,16 +75,6 @@ ANN void env_pop(const Env env, const m_uint scope) { env->scope = scope; } -ANN2(1,2) void env_add_value(const Env env, const m_str name, const Type type, - const m_bool is_const, void* data) { - const Value v = new_value(env->gwion, type, name); - ae_flag flag = ae_flag_checked | ae_flag_global | ae_flag_builtin | (is_const ? ae_flag_const : 0); - v->flag = flag; - v->d.ptr = data; - v->owner = env->global_nspc; - nspc_add_value(env->global_nspc, insert_symbol(name), v); -} - ANN void env_add_type(const Env env, const Type type) { const Type v_type = type_copy(t_class); v_type->d.base_type = type;