From 2cd99f65db592b18e4ed80982e5217317cc6c034 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Astor?= Date: Mon, 14 Sep 2020 12:15:37 +0200 Subject: [PATCH] :art: Remove useless functions --- src/lib/array.c | 5 ----- src/lib/object_op.c | 13 ------------- src/parse/check.c | 7 ------- 3 files changed, 25 deletions(-) diff --git a/src/lib/array.c b/src/lib/array.c index b61fb477..06390088 100644 --- a/src/lib/array.c +++ b/src/lib/array.c @@ -47,11 +47,6 @@ void free_m_vector(MemPool p, M_Vector a) { mp_free(p, M_Vector, a); } -ANN static inline int is_array(const Type *types, const Type type) { - const Type base = array_base(type); - return isa(base, types[et_object]) > 0; -} - static DTOR(array_dtor) { const Type t = unflag_type(o->type_ref); if(*(void**)(o->data + SZ_INT)) diff --git a/src/lib/object_op.c b/src/lib/object_op.c index 623d90ee..10a48e22 100644 --- a/src/lib/object_op.c +++ b/src/lib/object_op.c @@ -184,19 +184,6 @@ ANN static inline void emit_member(const Emitter emit, const Value v, const uint instr->m_val2 = size; } -ANN static inline void emit_struct_addr(const Emitter emit, const Value v) { - const Instr set = emit_add_instr(emit, StructMemberAddr); - set->m_val = v->from->offset; -} - -ANN static inline void emit_struct_var(const Emitter emit, const Value v) { - for(m_uint i = 0; i < v->type->size; i += SZ_INT) { - const Instr set = emit_add_instr(emit, Reg2Reg); - set->m_val2 = -v->type->size + i; - set->m_val = -v->type->size + v->from->offset + i; - } -} - ANN static inline void emit_struct_data(const Emitter emit, const Value v, const uint emit_addr) { const Instr instr = emit_kind(emit, v->type->size, emit_addr, structmember); instr->m_val = v->from->offset; diff --git a/src/parse/check.c b/src/parse/check.c index b63c8dfc..bfe46b8c 100644 --- a/src/parse/check.c +++ b/src/parse/check.c @@ -98,15 +98,8 @@ ANN Type check_td(const Env env, Type_Decl *td) { return t; } -ANN static inline void clear_decl(const Env env, const Exp_Decl *decl) { - Var_Decl_List list = decl->list; - do scope_add(env->curr->info->value, (vtype)list->self->xid, (vtype)NULL); - while((list = list->next)); -} - ANN static Type no_xid(const Env env, const Exp_Decl *decl) { CHECK_OO((((Exp_Decl*)decl)->type = check_td(env, decl->td))) -// clear_decl(env, decl); CHECK_BO(traverse_exp(env, exp_self(decl))) return decl->type; } -- 2.43.0