From e85809a98ade3c2a3e40d4038cb2af8ce73d8483 Mon Sep 17 00:00:00 2001 From: Calvin Rose Date: Sun, 24 Sep 2023 10:11:24 -0700 Subject: [PATCH] Remove remains of gc instrumentation code. --- src/core/gc.c | 1 - src/core/gc.h | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/core/gc.c b/src/core/gc.c index f9de7d42..6a1af02b 100644 --- a/src/core/gc.c +++ b/src/core/gc.c @@ -549,7 +549,6 @@ void janet_clear_memory(void) { #endif JanetGCObject *current = janet_vm.blocks; while (NULL != current) { - current->flags |= JANET_MEM_USEAFTERFREE; janet_deinit_block(current); JanetGCObject *next = current->data.next; gc_free_gcobj(current); diff --git a/src/core/gc.h b/src/core/gc.h index 151a2cc0..175caeba 100644 --- a/src/core/gc.h +++ b/src/core/gc.h @@ -38,7 +38,7 @@ #define janet_gc_settype(m, t) ((janet_gc_header(m)->flags |= (0xFF & (t)))) #define janet_gc_type(m) (janet_gc_header(m)->flags & 0xFF) -#define janet_gc_mark(m) do (janet_gc_header(m)->flags |= JANET_MEM_REACHABLE) +#define janet_gc_mark(m) (janet_gc_header(m)->flags |= JANET_MEM_REACHABLE) #define janet_gc_reachable(m) (janet_gc_header(m)->flags & JANET_MEM_REACHABLE) /* Memory types for the GC. Different from JanetType to include funcenv and funcdef. */