From: Jérémie Astor Date: Tue, 12 May 2020 19:32:52 +0000 (+0200) Subject: :art: Cleaning X-Git-Tag: nightly~1572 X-Git-Url: http://10.10.0.4:5575/?a=commitdiff_plain;h=f9cd8a0e8b076e1c8e4ef9012e4e380e52db28b0;p=gwion.git :art: Cleaning --- 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))