From f9cd8a0e8b076e1c8e4ef9012e4e380e52db28b0 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Astor?= Date: Tue, 12 May 2020 21:32:52 +0200 Subject: [PATCH] :art: Cleaning --- src/lib/object.c | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/src/lib/object.c b/src/lib/object.c index 1b3df38d..48a2c4ac 100644 --- a/src/lib/object.c +++ b/src/lib/object.c @@ -75,18 +75,15 @@ ANN void __release(const M_Object o, const VM_Shred shred) { if(!GET_FLAG(v, static) && !GET_FLAG(v, pure) && isa(v->type, shred->info->vm->gwion->type[et_object]) > 0) release(*(M_Object*)(o->data + v->from->offset), shred); -else if(GET_FLAG(v->type, struct) && - !GET_FLAG(v, static) && !GET_FLAG(v, pure)) { -const TupleForm tf = v->type->e->tuple; -for(m_uint i = 0; i < vector_size(&tf->types); ++i) { - const Type t = (Type)vector_at(&tf->types, i); - if(isa(t, shred->info->vm->gwion->type[et_object]) > 0) - release(*(M_Object*)(o->data + v->from->offset + vector_at(&tf->offset, i)), shred); -} - -//exit(77); - -} + else if(GET_FLAG(v->type, struct) && + !GET_FLAG(v, static) && !GET_FLAG(v, pure)) { + const TupleForm tf = v->type->e->tuple; + for(m_uint i = 0; i < vector_size(&tf->types); ++i) { + const Type t = (Type)vector_at(&tf->types, i); + if(isa(t, shred->info->vm->gwion->type[et_object]) > 0) + release(*(M_Object*)(o->data + v->from->offset + vector_at(&tf->offset, i)), shred); + } + } } if(GET_FLAG(t, dtor) && t->nspc->dtor) { if(GET_FLAG(t->nspc->dtor, builtin)) -- 2.43.0