From: Tim Vaughan Date: Sun, 23 Oct 2016 03:16:36 +0000 (+1300) Subject: Debugging GC. X-Git-Url: https://thelambdalab.xyz/gitweb/index.cgi?p=scheme.forth.jl.git;a=commitdiff_plain;h=13e038552e84df8c480b101b09e4c5a650bad2d0 Debugging GC. --- diff --git a/scheme.4th b/scheme.4th index 3c4744e..3c5c6a9 100644 --- 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