From: fennecdjay Date: Thu, 12 Nov 2020 12:09:00 +0000 (+0100) Subject: :art: Remove useless addr X-Git-Tag: nightly~1162 X-Git-Url: http://10.10.0.4:5575/?a=commitdiff_plain;h=b4e1ef16d3c31428e2071a72323c2920e2df855d;p=gwion.git :art: Remove useless addr --- diff --git a/ast b/ast index 126cdeb1..058ef7b4 160000 --- a/ast +++ b/ast @@ -1 +1 @@ -Subproject commit 126cdeb142c8764f331c530ad0cf15494d129c73 +Subproject commit 058ef7b425c5122290f3b5d49939f5ba1f40dd21 diff --git a/include/import/item.h b/include/import/item.h index cc5d3e22..48ba820f 100644 --- a/include/import/item.h +++ b/include/import/item.h @@ -2,7 +2,7 @@ #define __IMPORT_ITEM ANN m_int gwi_item_ini(const Gwi gwi, const m_str type, const m_str name); -ANN2(1) m_int gwi_item_end(const Gwi gwi, const ae_flag flag, const m_uint* addr); -#define gwi_item_end(a, b, c) gwi_item_end(a, (const ae_flag)(b), (const m_uint*)c) +ANN2(1) m_int gwi_item_end(const Gwi gwi, const ae_flag flag, m_uint *const addr); +#define gwi_item_end(a, b, c) gwi_item_end(a, (const ae_flag)(b), (m_uint*const)c) ANN void ck_clean_item(MemPool, ImportCK*); #endif diff --git a/src/import/import_item.c b/src/import/import_item.c index 3639445f..25bcb7cf 100644 --- a/src/import/import_item.c +++ b/src/import/import_item.c @@ -30,15 +30,15 @@ ANN static m_int gwi_item_tmpl(const Gwi gwi) { } #undef gwi_item_end -ANN2(1) m_int gwi_item_end(const Gwi gwi, const ae_flag flag, const m_uint* addr) { +ANN2(1) m_int gwi_item_end(const Gwi gwi, const ae_flag flag, m_uint *const addr) { CHECK_BB(ck_ok(gwi, ck_item)) const Env env = gwi->gwion->env; - gwi->ck->exp->d.exp_decl.list->self->addr = (m_uint*)addr; gwi->ck->exp->d.exp_decl.td->flag = flag; if(env->class_def && tflag(env->class_def, tflag_tmpl)) return gwi_item_tmpl(gwi); CHECK_BB(traverse_exp(env, gwi->ck->exp)) const Value value = gwi->ck->exp->d.exp_decl.list->self->value; + value->d.ptr = addr; set_vflag(value, vflag_builtin); if(!env->class_def) SET_FLAG(value, global); diff --git a/src/parse/scan1.c b/src/parse/scan1.c index 03cc838d..4c6c6c9d 100644 --- a/src/parse/scan1.c +++ b/src/parse/scan1.c @@ -109,7 +109,6 @@ ANN static m_bool scan1_decl(const Env env, const Exp_Decl* decl) { tuple_contains(env, v); } else if(!env->scope->depth) set_vflag(v, vflag_fglobal);// file global - v->d.ptr = var->addr; if(GET_FLAG(decl->td, global)) SET_FLAG(v, global); if(!env->scope->depth)