From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f891f,14f3fa9fb2c63b2d X-Google-Attributes: gidf891f,public X-Google-Thread: f4fd2,98945d3dc397bdb1,start X-Google-Attributes: gidf4fd2,public X-Google-Thread: f678f,14f3fa9fb2c63b2d X-Google-Attributes: gidf678f,public X-Google-Thread: fac41,98945d3dc397bdb1,start X-Google-Attributes: gidfac41,public X-Google-Thread: 102b75,14f3fa9fb2c63b2d X-Google-Attributes: gid102b75,public X-Google-Thread: f4ea4,98945d3dc397bdb1,start X-Google-Attributes: gidf4ea4,public X-Google-ArrivalTime: 1993-12-11 02:49:44 PST Xref: gmd.de comp.lang.misc:5259 comp.arch:18071 comp.unix.osf.misc:813 comp.lang.dylan:1552 comp.lang.eiffel:2101 comp.lang.lisp:5017 Path: gmd.de!newsserver.jvnc.net!howland.reston.ans.net!pipex!uunet!decwrl!parc!boehm From: boehm@parc.xerox.com (Hans Boehm) Newsgroups: comp.lang.misc,comp.arch,comp.unix.osf.misc,comp.lang.dylan,comp.lang.eiffel,comp.lang.lisp Subject: Re: ANDF - some information Date: 10 Dec 1993 20:08:27 GMT Organization: Xerox Palo Alto Research Center Message-ID: <2eakvr$is4@news.parc.xerox.com> References: <1993Dec2.134838.8047@webo.dg.com> <2e9sel$2in@disun41.epfl.ch> NNTP-Posting-Host: siria.parc.xerox.com monnier@di.epfl.ch (Stefan Monnier) writes: [Problems with using C as intermediate language for garbage collected source language, e.g. finding pointer locations in stack(s).] >sml2c avoids the problem by using a fixed set of variables >("registers") declared globally and pushes frames on its own >explicitely handled "stack" (it's a heap). It is highly portable, but >twice as slow as assembly (and as hard as assembly to generate) I think sml2c is in the minority here. By doing this, it gets space usage guarantees that are stronger than those provided by almost all other language implementations, and it can probably afford to be a bit sloppier about allocating short-lived objects. If you are willing to settle for the customary lack of guarantees (as with all C or Lisp implementations that I know of), you can conservatively scan the stack for bit patterns that look like pointers. This is done by the SRC Modula-3 compiler, the Sather compiler, AKCL, Bartlett's Scheme compiler, etc., and even by some compilers that generate native code (e.g. D-machine Cedar, and SRC Modula-2+, I believe.) This avoids the factor of 2 execution time cost, but it still requires minimal support from the optimizer (including the instruction scheduler) to guarantee safety. Such support happens to be accidentally provided by some C compilers (e.g. lcc, or most compilers without optimization, or gcc with suitable gcc-specific tweaking of the generated C code). Based on a quick look at some of the documentation, I see no indication that ANDF installers can be expected to support either generation of pointer location information, or to guarantee this weak form of safety. Hans-J. Boehm (boehm@parc.xerox.com) Standard disclaimer ...