Path: csiph.com!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Paul Rubin Newsgroups: comp.lang.forth Subject: Re: Implementing lisp in Forth. Chapter 4. Date: Mon, 12 Sep 2016 13:08:39 -0700 Organization: A noiseless patient Spider Lines: 13 Message-ID: <8737l4hoe0.fsf@jester.gateway.pace.com> References: <2016Sep12.114311@mips.complang.tuwien.ac.at> <2016Sep12.192638@mips.complang.tuwien.ac.at> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: mx02.eternal-september.org; posting-host="590ea01354cf4bcbcd857d7ebbd88128"; logging-data="6012"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/uOYzaeeGuekj3wb1CjEGS" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) Cancel-Lock: sha1:zwJtneXwT2dd4klPB+kb7qZQ+so= sha1:pWblTAaK9lq21S+RaYiMw/awZe8= Xref: csiph.com comp.lang.forth:50910 albert@cherry.spenarnc.xs4all.nl (Albert van der Horst) writes: > so as far as the garbage collector is concerned there > is no such thing as a "root set". So please explain. gc.fs has some words where you tell the gc what the root set is. The data stack contents are also in the root set. The return stack contents are not, since there's no standard way to get at them, but it seems worth doing that if your Forth has a way. If you look at small Lisp implementations, their gc's also scan a predefined root set. I've been looking at uLisp (ulisp.com) lately and you might find it educational. It's about 3 kloc about 1/3 of which is Arduino specific.