summaryrefslogtreecommitdiffstats
path: root/gc.h
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2021-04-17 07:39:51 -0700
committerKaz Kylheku <kaz@kylheku.com>2021-04-17 07:39:51 -0700
commit6b9c1f1f30b92211f7d4e6f3edc56a6cd7f0bd9c (patch)
tree8bd1d5a3fee7f9940323a40d93ec7f437390a1d1 /gc.h
parentcde48c8282110817bafba59869c434444a3c0b6d (diff)
downloadtxr-6b9c1f1f30b92211f7d4e6f3edc56a6cd7f0bd9c.tar.gz
txr-6b9c1f1f30b92211f7d4e6f3edc56a6cd7f0bd9c.tar.bz2
txr-6b9c1f1f30b92211f7d4e6f3edc56a6cd7f0bd9c.zip
gc: disable z() macro.
* gc.h (z): turn off. This is not achieving its purpose of stopping spurious retention of objects, and adds a fraction of a percent of execution overhead.
Diffstat (limited to 'gc.h')
-rw-r--r--gc.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/gc.h b/gc.h
index 8f7b44ae..9b41492c 100644
--- a/gc.h
+++ b/gc.h
@@ -68,4 +68,9 @@ extern val break_obj;
#define FREE 0x200
INLINE val zap(volatile val *loc) { val ret = *loc; *loc = nil; return ret; }
+
+#if CONFIG_ZAP_DEAD_LOCATIONS
#define z(lvalue) zap(&lvalue)
+#else
+#define z(lvalue) (lvalue)
+#endif