summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2014-02-01 03:33:31 -0800
committerKaz Kylheku <kaz@kylheku.com>2014-02-01 03:33:31 -0800
commit6abf99b9ae4a8868e55215a74dd4c0e8a97ec99b (patch)
treec3dcb1d4fdc1482a5f3cd0797c3a1f5cd6edc3cf
parentf746b568d797d6b35571968b838d540147dde3f9 (diff)
downloadtxr-6abf99b9ae4a8868e55215a74dd4c0e8a97ec99b.tar.gz
txr-6abf99b9ae4a8868e55215a74dd4c0e8a97ec99b.tar.bz2
txr-6abf99b9ae4a8868e55215a74dd4c0e8a97ec99b.zip
Export break_obj.
* gc.c (break_obj): Change to external linkage. (mark): Use t variable instead of re-evaluating obj->t.type. * gc.h (break_obj): Declared.
-rw-r--r--ChangeLog9
-rw-r--r--gc.c4
-rw-r--r--gc.h4
3 files changed, 15 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 46a88252..d4943119 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,14 @@
2014-02-01 Kaz Kylheku <kaz@kylheku.com>
+ Export break_obj.
+
+ * gc.c (break_obj): Change to external linkage.
+ (mark): Use t variable instead of re-evaluating obj->t.type.
+
+ * gc.h (break_obj): Declared.
+
+2014-02-01 Kaz Kylheku <kaz@kylheku.com>
+
* lib.c (d): Disable garbage collection around the dump.
It's importa for this function not to have the side effect
of triggering garbage collection, when it is used for
diff --git a/gc.c b/gc.c
index fd1658bc..0df85323 100644
--- a/gc.c
+++ b/gc.c
@@ -86,7 +86,7 @@ static int full_gc;
#endif
#if EXTRA_DEBUGGING
-static val break_obj;
+val break_obj;
#endif
val prot1(val *loc)
@@ -260,7 +260,7 @@ tail_call:
if ((t & FREE) != 0)
abort();
- obj->t.type = (type_t) (obj->t.type | REACHABLE);
+ obj->t.type = (type_t) (t | REACHABLE);
#if EXTRA_DEBUGGING
if (obj == break_obj)
diff --git a/gc.h b/gc.h
index 54afac9f..ba7c5777 100644
--- a/gc.h
+++ b/gc.h
@@ -43,6 +43,10 @@ val gc_mutated(val);
void unmark(void);
void gc_hint_func(val *);
+#if EXTRA_DEBUGGING
+val break_obj;
+#endif
+
#define gc_hint(var) gc_hint_func(&var)
#define REACHABLE 0x100
#define FREE 0x200