From 99af40dad03af85cf34e4f60d326af0d265d29f9 Mon Sep 17 00:00:00 2001 From: fennecdjay Date: Sat, 18 May 2019 21:18:31 +0200 Subject: [PATCH] :art: Tmpl_Class => Tmpl_List --- ast | 2 +- src/emit/emit.c | 2 +- src/lib/import.c | 2 +- src/parse/check.c | 2 +- src/parse/scan1.c | 2 +- src/parse/scan2.c | 2 +- src/parse/template.c | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/ast b/ast index fe0bdff5..94e10ded 160000 --- a/ast +++ b/ast @@ -1 +1 @@ -Subproject commit fe0bdff5928947b832ec50726f96979a534d08f9 +Subproject commit 94e10dede128475686da71e1f35b5a89b88073fd diff --git a/src/emit/emit.c b/src/emit/emit.c index b33b1f09..a45afe3c 100644 --- a/src/emit/emit.c +++ b/src/emit/emit.c @@ -1750,7 +1750,7 @@ ANN static inline void emit_class_pop(const Emitter emit) { ANN static m_bool emit_class_def(const Emitter emit, const Class_Def cdef) { const Type type = cdef->base.type; const Nspc nspc = type->nspc; - if(tmpl_class_base(cdef->tmpl)) + if(tmpl_list_base(cdef->tmpl)) return GW_OK; if(cdef->base.ext && ((/*!GET_FLAG(type->e->parent, emit) &&*/ GET_FLAG(cdef->base.ext, typedef)) || cdef->base.ext->types)) { diff --git a/src/lib/import.c b/src/lib/import.c index 258012b8..7f5aee96 100644 --- a/src/lib/import.c +++ b/src/lib/import.c @@ -221,7 +221,7 @@ ANN2(1,2) m_int gwi_class_ini(const Gwi gwi, const Type type, const f_xtor pre_c if(gwi->templater.n) { const ID_List types = templater_def(gwi->gwion->st, gwi); type->e->def = new_class_def(gwi->gwion->mp, 0, insert_symbol(gwi->gwion->st, type->name), NULL, NULL, loc_cpy(gwi->gwion->mp, gwi->loc)); - type->e->def->tmpl = new_tmpl_class(gwi->gwion->mp, types, -1); + type->e->def->tmpl = new_tmpl_list(gwi->gwion->mp, types, -1); type->e->def->base.type = type; SET_FLAG(type, template); } else diff --git a/src/parse/check.c b/src/parse/check.c index 3e8f8c4a..83f56484 100644 --- a/src/parse/check.c +++ b/src/parse/check.c @@ -1180,7 +1180,7 @@ ANN static inline void inherit(const Type t) { } ANN m_bool check_class_def(const Env env, const Class_Def cdef) { - if(tmpl_class_base(cdef->tmpl)) + if(tmpl_list_base(cdef->tmpl)) return GW_OK; const Type type = cdef->base.type; if(type->e->parent == t_undefined) { diff --git a/src/parse/scan1.c b/src/parse/scan1.c index ee1069e3..e4d9c29f 100644 --- a/src/parse/scan1.c +++ b/src/parse/scan1.c @@ -338,7 +338,7 @@ ANN static m_bool scan1_class_parent(const Env env, const Class_Def cdef) { ANN m_bool scan1_class_def(const Env env, const Class_Def cdef) { if(!cdef->base.type) CHECK_BB(scan0_class_def(env, cdef)) - if(tmpl_class_base(cdef->tmpl)) + if(tmpl_list_base(cdef->tmpl)) return GW_OK; if(cdef->base.ext) CHECK_BB(scan1_class_parent(env, cdef)) diff --git a/src/parse/scan2.c b/src/parse/scan2.c index bc4981a0..538d20ad 100644 --- a/src/parse/scan2.c +++ b/src/parse/scan2.c @@ -549,7 +549,7 @@ ANN static m_bool scan2_class_parent(const Env env, const Class_Def cdef) { } ANN m_bool scan2_class_def(const Env env, const Class_Def cdef) { - if(tmpl_class_base(cdef->tmpl)) + if(tmpl_list_base(cdef->tmpl)) return GW_OK; if(cdef->base.ext) CHECK_BB(scan2_class_parent(env, cdef)) diff --git a/src/parse/template.c b/src/parse/template.c index aff4b293..26ba90fc 100644 --- a/src/parse/template.c +++ b/src/parse/template.c @@ -155,7 +155,7 @@ ANN Type scan_type(const Env env, const Type t, const Type_Decl* type) { SET_FLAG(a, ref); if(a->base.type) return a->base.type; - a->tmpl = new_tmpl_class(env->gwion->mp, get_total_type_list(env, t), 0); + a->tmpl = new_tmpl_list(env->gwion->mp, get_total_type_list(env, t), 0); a->tmpl->call = type->types; CHECK_BO(scan0_class_def(env, a)) -- 2.43.0