Xref: utzoo comp.arch:6451 comp.lang.c:13062 comp.lang.misc:1950 Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!cwjcc!gatech!rutgers!bellcore!faline!thumper!ulysses!gamma!sword!arrow!yba From: yba@arrow.bellcore.com (Mark Levine) Newsgroups: comp.arch,comp.lang.c,comp.lang.misc Subject: Re: Machine-independent intermediate languages Message-ID: <905@sword.bellcore.com> Date: 4 Oct 88 15:09:40 GMT References: <853@goofy.megatest.UUCP> Sender: news@sword.bellcore.com Reply-To: yba@sabre.bellcore.com (Mark Levine) Organization: Bellcore, Red Bank, NJ Lines: 29 In article <853@goofy.megatest.UUCP> djones@megatest.UUCP (Dave Jones) writes: >From article , by eric@snark.UUCP (Eric S. Raymond): >Even if it is possible to define a language which will serve as both >an HLL and an MIIL, (an "MIHLL"), it sure would be nice to have the MIIL >to boot strap it with. Perhaps the MIIL would turn out to be a >subset of the HLL with "checking turned off", I dunno. An old bootstrapping technique I have seen used well is to have a "virtual machine", say a single stack machine, which you implement on each target using whatever the best tools on the target allow. The bootstrap compiler produces output in the virtual machine's instruction set, and you write your code generator in the HLL of the compiler itself, followed by compiling the compiler. If you happen to produce RISC machines and put your virtual machine into real hardware, you get to skip some steps.... Cross-compilers are replaced by implementing the virtual machine (which is kept deliberately simple). Is there resistance to the idea of writing the language first, then seeing what it takes to execute it efficiently, and _then_ designing the hardware? It seems designers are still fond of assembler, and providing many ways to do operations for a compiler writer who only needs one fast way. On the other hand, the LISP machines and the SCHEME chip don't seem to be setting the world on fire. What does the current folklore hold? I have never really talked with a RISC designer about languages. I have this fear they would all want to do an ADA machine first :-). Eleazor bar Shimon, once and future Carolingian yba@sabre.bellcore.com