Re: executable intermediate languages

wilson@cs.utexas.edu (Paul Wilson)
Tue, 11 Jul 1995 03:07:52 GMT

          From comp.compilers

Related articles
executable intermediate languages magnus@im.lcs.mit.edu (1995-07-03)
Re: executable intermediate languages ckuethe@ersys.edmonton.ab.ca (1995-07-06)
Re: executable intermediate languages wilson@cs.utexas.edu (1995-07-11)
Re: executable intermediate languages toconnor@vcd.hp.com (1995-07-15)
| List of all articles for this month |

Newsgroups: comp.compilers
From: wilson@cs.utexas.edu (Paul Wilson)
Keywords: interpreter
Organization: CS Dept, University of Texas at Austin
References: 95-07-046
Date: Tue, 11 Jul 1995 03:07:52 GMT

Daniel Risacher <magnus@mit.edu> wrote:
>I'm intending to develop and implement a language for cellular
>automata as my master's thesis. I'd like to know more about
>what sort of executable intermediate languages have been used for
>other projects. For instance, both GNU Emacs and Perl can
>'compile' the source language into a fast 'p-code' representation,
>but neither does so into code which is machine native.
>
>I'm looking for info or references on what these 'p-code languages'
>look like and how they work. Anyone care to enlighten me?


Why not compile straight to C, compile that with a C compiler, and run
a lot faster? It's about as easy as compiling to bytecodes and writing
a bytecode interpreter. It's typically not as convenient a programming
environment as using an interpreter (harder to build a good debugger,
etc.) but I'd think that for cellular automata the speed difference
would be well worth it.


You might want to look at the notes on our Scheme compiler on our ftp
site, in the repository directory pub/garbage. (pub/garbage has all
kinds of goodies about garbage collecton, persistence and whatnot too.)


Compiling Scheme to C is a little tricky, but if you don't have dynamic
typing and closures in your language, it should be pretty straightforward.
(It's a lot easier to *generate* C than it is to recognize and compile
it.)


--
Paul R. Wilson, Comp. Sci. Dept., U of Texas @ Austin (wilson@cs.utexas.edu)
Recent papers on garbage collection, memory hierarchies, persistence and
Scheme interpreters and compilers available via ftp from ftp.cs.utexas.edu
(128.83.120.44), in pub/garbage or http://www.cs.utexas.edu/users/oops/)
--


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.