The Lambda Lab
/
projects
/
scheme.forth.jl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
41a8ffd
)
Debugging GC.
author
Tim Vaughan
<tgvaughan@gmail.com>
Sun, 23 Oct 2016 03:16:36 +0000
(16:16 +1300)
committer
Tim Vaughan
<tgvaughan@gmail.com>
Sun, 23 Oct 2016 03:16:36 +0000
(16:16 +1300)
scheme.4th
patch
|
blob
|
history
diff --git
a/scheme.4th
b/scheme.4th
index
3c4744e
..
3c5c6a9
100644
(file)
--- a/
scheme.4th
+++ b/
scheme.4th
@@
-166,18
+166,15
@@
false gc-enabled !
: gc-mark-obj ( obj -- )
- pairlike? if
- pairlike-marked? if 2drop exit then
-
- mark-pairlike
+ pairlike? invert if 2drop exit then
+ pairlike-marked? if 2drop exit then
- 2dup
+ mark-pairlike
- car recurse
- cdr recurse
- else
- 2drop
- then
+ drop pair-type 2dup
+
+ car recurse
+ cdr recurse
;
: gc-sweep