From 1db8621d47567c4c37af50e0962eac61bfa402ef Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Astor?= Date: Tue, 15 Dec 2020 01:24:28 +0100 Subject: [PATCH] :art: Cleaning --- src/lib/array.c | 1 - src/lib/opfunc.c | 4 +--- src/parse/check.c | 1 - 3 files changed, 1 insertion(+), 5 deletions(-) diff --git a/src/lib/array.c b/src/lib/array.c index 461e9c38..fb87738b 100644 --- a/src/lib/array.c +++ b/src/lib/array.c @@ -159,7 +159,6 @@ static OP_CHECK(opck_array_at) { ERR_N(exp_self(bin)->pos, _("array depths do not match.")) } if(bin->rhs->exp_type == ae_exp_decl) { - SET_FLAG(bin->rhs->d.exp_decl.td, late);// ??? if(bin->rhs->d.exp_decl.list->self->array && bin->rhs->d.exp_decl.list->self->array->exp) ERR_N(exp_self(bin)->pos, _("do not provide array for 'xxx @=> declaration'.")) diff --git a/src/lib/opfunc.c b/src/lib/opfunc.c index 3050f9cb..baa1cde5 100644 --- a/src/lib/opfunc.c +++ b/src/lib/opfunc.c @@ -83,7 +83,6 @@ ANN static inline Type check_new_td(const Env env, Type_Decl *td) { OP_CHECK(opck_new) { const Exp_Unary* unary = (Exp_Unary*)data; - SET_FLAG(unary->td, late); DECL_ON(const Type, t, = check_new_td(env, unary->td)) if(isa(t, env->gwion->type[et_object]) < 0) ERR_N(exp_self(unary)->pos, _("can't use 'new' on non-object types...\n")) @@ -91,7 +90,6 @@ OP_CHECK(opck_new) { ERR_N(td_pos(unary->td), _("can't use 'new' on ref type '%s'\n"), t->name) if(GET_FLAG(t, abstract)) ERR_N(td_pos(unary->td), _("can't use 'new' on abstract type '%s'\n"), t->name) - UNSET_FLAG(unary->td, late); if(unary->td->array) CHECK_BN(check_subscripts(env, unary->td->array, 1)) return t; @@ -100,6 +98,6 @@ OP_CHECK(opck_new) { OP_EMIT(opem_new) { const Exp_Unary* unary = (Exp_Unary*)data; CHECK_BO(emit_instantiate_object(emit, exp_self(unary)->info->type, - unary->td->array, GET_FLAG(unary->td, late))) + unary->td->array, 0)) return emit_gc(emit, -SZ_INT); } diff --git a/src/parse/check.c b/src/parse/check.c index f8edca49..9ffa89f5 100644 --- a/src/parse/check.c +++ b/src/parse/check.c @@ -173,7 +173,6 @@ ANN Type check_exp_decl(const Env env, const Exp_Decl* decl) { if(!decl->td->xid) return no_xid(env, decl); if(decl->td->xid == insert_symbol("auto")) { // should be better - SET_FLAG(decl->td, late); CHECK_BO(scan1_exp(env, exp_self(decl))) CHECK_BO(scan2_exp(env, exp_self(decl))) } -- 2.43.0