]> Nishi Git Mirror - gwion.git/commitdiff
:art: Cleaning
authorJérémie Astor <astor.jeremie@wanadoo.fr>
Tue, 12 May 2020 19:32:52 +0000 (21:32 +0200)
committerJérémie Astor <astor.jeremie@wanadoo.fr>
Tue, 12 May 2020 19:32:52 +0000 (21:32 +0200)
src/lib/object.c

index 1b3df38ddb73fb509229230419042f1f656253f2..48a2c4ac3455110743fe7a37a634773bf2fca3ed 100644 (file)
@@ -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))