Re: Re: Requirements for Just-in-time Compilation

bonzini@gnu.org (Paolo Bonzini)
7 Jun 2001 17:12:46 -0400

          From comp.compilers

Related articles
Re: Requirements for Just-in-time Compilation jp@demonseed.net (jason petrone) (2001-04-29)
Re: Re: Requirements for Just-in-time Compilation bonzini@gnu.org (2001-06-07)
| List of all articles for this month |
From: bonzini@gnu.org (Paolo Bonzini)
Newsgroups: comp.compilers
Date: 7 Jun 2001 17:12:46 -0400
Organization: Mailgate.ORG Server - http://www.Mailgate.ORG
References: 01-04-144
Keywords: code
Posted-Date: 07 Jun 2001 17:12:45 EDT

> I am aware of the NJ-MC-TK, but I'm thinking about
> trying GNU Lightning first(www.gnu.org/software/lightning).


I'd like to use NJ-MC-TK to generate lightning's assemblers...


> I'm thinking extra passes since I would need to have an architecture
> independent intermediate representation, like RTL.


A real JIT compiler is actually a recompiler (from bytecode or from a
foreign assembly). There is an efficient technique called delayed
code generation that generates very good code -- I have reached
80% of ParcPlace Smalltalk JIT's speed with GNU lightning (which
has some penalty for being retargetable) and without performing
any kind of type inferencing yet.


This paper applies it to parse trees, instead I applied it to bytecode
recompilation by reparsing the bytecodes into a tree first:
http://www.wolczko.com/mushroom/theses/piumarta.ps.gz


@PhdThesis{Piumarta:phd:1992,
    author = "Ian K. Piumarta",
    title = "Delayed Code Generation in a Smalltalk-80 Compiler",
    school = "University of Manchester",
    month = sep,
    year = "1992",
    source = "Dept. Library",
    pages = "174",
    sjb = "Surprisingly there is hardly any reference to the work
                                  of the Self group",
    abstract = "This thesis argues and demonstrates that it is possible
                                  to compile Smalltalk-80 directly into machine code for
                                  stock hardware, and to do this efficiently in terms of
                                  both compiler performance (the compiler must be small
                                  and fast) and generated code performance. The
                                  techniques developed for ``delayed code generation'' in
                                  single-pass recursive descent compilation (or code
                                  generation by walking a parse tree) are applicable to
                                  almost any language, and some discussion of the
                                  application of delayed code generation to the
                                  compilation of C is also presented.",
}




Microsoft also has a few interesting papers at


http://www.research.microsoft.com/pls/


Paolo


Post a followup to this message

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