Re: A question about Self (Mark Leone)
Thu, 27 Jan 1994 22:02:48 GMT

          From comp.compilers

Related articles
A question about Self (1994-01-27)
Re: A question about Self (1994-01-27)
Re: A question about Self (1994-01-29)
Re: A question about Self (1994-01-31)
| List of all articles for this month |

Newsgroups: comp.lang.misc,comp.compilers
From: (Mark Leone)
Keywords: Self, report, optimize
Organization: School of Computer Science, Carnegie Mellon
References: 94-01-113
Date: Thu, 27 Jan 1994 22:02:48 GMT

Graham Matthews <> wrote:
>So I am a little confused. Does Self do dynamic code generation at all, or
>are all their optimisation techniques static? If the answer to this
>question is "no" would anyone know any languages which do do dynamic code

Yes, to a limited extent:

    "customized compilation [...] means that the dynamic compilation of a
    given source method is customized by important characteristics of the
    calling site [...] In the current implementation, we customize the
    [dynamically] compiled method by the map of the message's receiver;
    only members of the receiver's clone family may use the customized method."

[From "Customization: Optimizing Compiler Technology for SELF...",
  Chambers & Ungar, PLDI '89]

SELF also does in-line method caching, which could be viewed as a kind of
dynamic specialization. I'm not sure if it does dynamic inlining or other
forms of optimization.

The Concert compiler (for a fine-grained concurrent object-oriented
language) also performs dynamic compilation, although it's not clear
exactly what optimizations are performed at run time. See "The Concert
System - Compiler and runtime support for efficient, fine-grained
concurrent object-oriented programs", by Chien, Karamcheti, and Plevyak,
University of Illinois technical report UIUC DCS R-93-1815. Available by
FTP at as /pub/csag/ (Also accessible
on the World-Wide Web via file://

Run-time code generation for more conventional languages has been
investigated by Keppel, Eggers, and Henry, who obtain impressive speedups
for some realistic C programs by hand-coding "application specific
compilers" that perform run-time "constant" folding, loop unrolling, and
dead code elimination. See "Evaluating Runtime-Compiled Value-Specific
Optimizations", University of Washington TR 93-11-02. Available by FTP at as /tr/1993/11/UW-CSE-93-11-02.PS.Z.

Peter Lee and I are working on the automation of run-time code generation,
particularly for functional languages (although our techniques may be
applicable to a wide range of languages). We are investigating a wide
range of run-time optimizations, including "constant" folding, inlining,
loop unrolling, register allocation, etc. We reduce the high cost of
general-purpose run-time compilation by compile-time specialization. This
yields numerous code generators that are customized to optimize small
portions of the source program based on run-time information. No
intermediate representations or code templates are manipulated at run

Some preliminary results are described in "Deferred compilation: The
automation of run-time code generation", by Mark Leone and Peter Lee, CMU
technical report CMU-CS-93-225. Available by FTP on as
/afs/ (Also accessible via the
World-Wide Web as
Mark Leone <>
School of Computer Science, Carnegie Mellon University
Pittsburgh, PA 15213 USA

Post a followup to this message

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