]> Nishi Git Mirror - gwion.git/commitdiff
remove closure.c
authorJérémie Astor <fennecdjay@gmail.com>
Thu, 5 May 2022 15:03:29 +0000 (17:03 +0200)
committerJérémie Astor <fennecdjay@gmail.com>
Thu, 5 May 2022 15:03:29 +0000 (17:03 +0200)
src/vm/closure.c [deleted file]

diff --git a/src/vm/closure.c b/src/vm/closure.c
deleted file mode 100644 (file)
index 910e633..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-#include "gwion_util.h"
-#include "gwion_ast.h"
-#include "gwion_env.h"
-#include "vm.h"
-#include "instr.h"
-#include "memoize.h"
-#include "gwion.h"
-#include "object.h"
-#include "array.h"
-#include "operator.h"
-#include "import.h"
-
-ANN Closure *new_closure(MemPool mp, const m_uint sz) {
-  Closure *a = mp_malloc2(mp, sizeof(Closure) + sz);
-  map_init(&a->m);
-  a->sz = sz;
-  return a;
-}
-
-ANN void free_closure(Closure *a, const Gwion gwion) {
-  const Map m = &a->m;
-  for (m_uint i = 0; i < map_size(m); ++i)
-    compound_release(gwion->vm->cleaner_shred, (Type)VKEY(m, i),
-                     a->data + VVAL(m, i));
-  map_release(m);
-  _mp_free(gwion->mp, sizeof(Closure) + a->sz, a);
-}