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: 109fba,14f3fa9fb2c63b2d X-Google-Attributes: gid109fba,public X-Google-Thread: f678f,14f3fa9fb2c63b2d X-Google-Attributes: gidf678f,public X-Google-Thread: 102b75,14f3fa9fb2c63b2d X-Google-Attributes: gid102b75,public X-Google-ArrivalTime: 1993-12-14 14:49:46 PST Xref: gmd.de comp.lang.misc:5277 comp.lang.c++:40570 comp.arch:18159 comp.unix.osf.misc:829 Path: gmd.de!xlink.net!howland.reston.ans.net!europa.eng.gtefsd.com!uunet!olivea!decwrl!parc!boehm From: boehm@parc.xerox.com (Hans Boehm) Newsgroups: comp.lang.misc,comp.lang.c++,comp.arch,comp.unix.osf.misc Subject: Re: ANDF - some (mis)information Date: 14 Dec 1993 22:38:16 GMT Organization: Xerox Palo Alto Research Center Message-ID: <2elf8o$1bk@news.parc.xerox.com> References: <2el49dINN638@network.ucsd.edu> <1993Dec14.201142.26562@midway.uchicago.edu> NNTP-Posting-Host: siria.parc.xerox.com dave@blackjoke.bsd.uchicago.edu (Dave Griffith) writes: >In article <2el49dINN638@network.ucsd.edu> mbk%anl433.uucp@Germany.EU.net (Matt >Kennel) writes: >> There are also claims that the semantics of C are insufficient as an output >> code for some other kinds of languages, which is probably true. >Not "probably". Manifestly and utterly. There are about a half-dozen >important things required for non-C languages that simply cannot be done >efficiently when compiling by way of portable C. My list includes GC, >arithmetic with traps, non-local exceptions, and (god help us) BCD arithmetic. >More stuff can only be done if the target C compiler is quite smart indeed >(bit-rotates, for example). Some of these don't seem like a big deal. My guess is that BCD arithmetic can be moved into the run-time system with minimal performance loss. Arithmetic traps can be handled with some overhead, or by assuming gcc like facilities and a tiny amount of architecture specific code. I have yet to see evidence that these are addressed by ANDF (with the exception of arithmetic traps). And I have looked at some descriptions. ... >> Making the C garbage-collector friendly would also be a good idea. >A garbage-collector friendly C would require breaking _huge_ amounts of >existing code. No. Guaranteeing the safety of a conservative garbage collector is a minimal added requirement on the code generator. With considerably more work, you could guarantee very precise identification of pointers, assuming "well-behaved" source code. In either case, I don't think anybody would advocate requiring all C code to run with a garbage collector. It's sufficient to make suitably generated code safe with a collector. (In the case of a fully conservative collector, "suitably generated" is basically implied by "strictly conforming ANSI C". Empirically, the vast majority of hand-written C programs are "suitably generated".) The situation in ANDF seems to be principally the same, except that it appears to be missing some of the hooks provided by gcc. (Please correct me if I'm wrong.) Hans-J. Boehm (boehm@parc.xerox.com) Standard disclaimer ...