Re: Runtime retargeting of code generator
3 Aug 91 14:09:45 GMT

          From comp.compilers

Related articles
Runtime retargeting of code generator (1991-08-01)
Re: Runtime retargeting of code generator (1991-08-03)
| List of all articles for this month |

Newsgroups: comp.compilers
Keywords: code, smalltalk, interpreter
Organization: Dept of Comp and Info Sci, Univ of Mass (Amherst)
References: 91-08-009
Date: 3 Aug 91 14:09:45 GMT

It's not exactly the same, but PARC Place Smalltalk-80 does something similar.
Smalltalk compiles to *byte codes*, i.e., code for a stack oriented virtual
machine. At run-time, the PARC Place system translates byte codes to machine
code for the current target, one method (procedure) at a time, on demand. A
similar approach could work for you. Since the machine code can always be
regenerated, and since the byte coded representation is fairly compact, you
get good space performance (since code is generated only on demand and if
memory pressure becomes a problem you can start throwing cached translations
away) and good time performance (the most frequently used methods will be in
machine code). This partly hinges on the translator being fast. Perhaps you
should generate such virtual machine code (though maybe for a virtual register
machine rather than a virtual stack machine, but it's up to you) from your
parse trees, and then do the final code generation at run time.

J. Eliot B. Moss, Assistant Professor
Department of Computer Science
Lederle Graduate Research Center
University of Massachusetts
Amherst, MA 01003
(413) 545-4206, 545-1249 (fax);

Post a followup to this message

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