From: Jérémie Astor Date: Thu, 5 Dec 2019 20:39:19 +0000 (+0100) Subject: :art: Remove useless func X-Git-Tag: nightly~2070^2~2 X-Git-Url: http://10.10.0.4:5575/?a=commitdiff_plain;h=cbf0c66baf9c2361a88482972c9e3d04a164575e;p=gwion.git :art: Remove useless func --- diff --git a/include/env/type.h b/include/env/type.h index 12bc9b64..3f3086ee 100644 --- a/include/env/type.h +++ b/include/env/type.h @@ -40,8 +40,6 @@ ANN void type_path(const m_str, const ID_List); ANN Type typedef_base(Type) __attribute__((pure)); ANN Type array_base(Type) __attribute__((pure)); ANN m_bool type_ref(Type) __attribute__((pure)); -__attribute__((returns_nonnull)) -ANN Type template_parent(const Env, const Type type); ANN Type actual_type(const struct Gwion_* gwion, const Type t); ANN static inline m_uint env_push_type(const Env env, const Type type) { return env_push(env, type, type->nspc); } ANN m_bool is_fptr(const struct Gwion_*, const Type t); diff --git a/src/emit/emit.c b/src/emit/emit.c index 9fbf6d67..f3570e26 100644 --- a/src/emit/emit.c +++ b/src/emit/emit.c @@ -148,11 +148,6 @@ ANN static inline void maybe_ctor(const Emitter emit, const Type type) { emit_ext_ctor(emit, type->nspc->pre_ctor); } -ANN static inline void tmpl_ctor(const Emitter emit, const Type type) { - const Type t = template_parent(emit->env, type); - maybe_ctor(emit, t); -} - ANN static void emit_pre_ctor(const Emitter emit, const Type type) { if(type->e->parent) emit_pre_ctor(emit, type->e->parent); diff --git a/src/oo/type.c b/src/oo/type.c index 8992127a..900bd2b2 100644 --- a/src/oo/type.c +++ b/src/oo/type.c @@ -125,12 +125,6 @@ ANN Type array_type(const Env env, const Type src, const m_uint depth) { return t; } -__attribute__((returns_nonnull)) -ANN Type template_parent(const Env env, const Type type) { - const m_str name = get_type_name(env, type->name, 0); - return nspc_lookup_type1(type->nspc->parent, insert_symbol(name)); -} - ANN m_bool type_ref(Type t) { do { if(GET_FLAG(t, empty))