Skip to content

Commit

Permalink
🎨 Remove useless functions
Browse files Browse the repository at this point in the history
  • Loading branch information
fennecdjay committed Feb 22, 2019
1 parent ce186cd commit f3960e4
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 18 deletions.
1 change: 0 additions & 1 deletion include/env.h
Expand Up @@ -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);
Expand Down
2 changes: 0 additions & 2 deletions include/import.h
Expand Up @@ -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);
Expand Down
5 changes: 0 additions & 5 deletions src/lib/import.c
Expand Up @@ -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;
}
10 changes: 0 additions & 10 deletions src/oo/env.c
Expand Up @@ -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;
Expand Down

0 comments on commit f3960e4

Please sign in to comment.