Re: Possible to write compiler to Java VM?

david.hopwood@lady-margaret-hall.oxford.ac.uk (David Hopwood)
29 Jan 1996 17:44:46 -0500

          From comp.compilers

Related articles
[4 earlier articles]
Re: Possible to write compiler to Java VM? bwilson@shasta.stanford.edu (Bob Wilson) (1996-01-25)
Re: Possible to write compiler to Java VM? clodius@sst.lanl.gov (William Clodius) (1996-01-27)
Re: Possible to write compiler to Java VM? tdunbar@gserver.grads.vt.edu (Thomas Dunbar) (1996-01-27)
Re: Possible to write compiler to Java VM? tore@lis.pitt.edu (1996-01-27)
Re: Possible to write compiler to Java VM? sam@inf.enst.fr (Samuel Tardieu) (1996-01-28)
Re: Possible to write compiler to Java VM? hbaker@netcom.com (1996-01-29)
Re: Possible to write compiler to Java VM? david.hopwood@lady-margaret-hall.oxford.ac.uk (1996-01-29)
Re: Possible to write compiler to Java VM? darius@phidani.be (Darius Blasband) (1996-01-29)
Re: Possible to write compiler to Java VM? stt@copperfield.camb.inmet.com (1996-01-29)
Re: Possible to write compiler to Java VM? ncohen@watson.ibm.com (1996-01-29)
Re: Possible to write compiler to Java VM? RLS@psu.edu (1996-01-30)
Re: Possible to write compiler to Java VM? mg@asp.camb.inmet.com (1996-01-30)
Re: Possible to write compiler to Java VM? jeff@uh.edu (Jeff M Younker) (1996-01-30)
[17 later articles]
| List of all articles for this month |

From: david.hopwood@lady-margaret-hall.oxford.ac.uk (David Hopwood)
Newsgroups: comp.lang.java,comp.compilers
Date: 29 Jan 1996 17:44:46 -0500
Organization: Oxford University, England
References: 96-01-037 96-01-049 96-01-089
Keywords: interpreter, translator

Tore Joergensen <tore@lis.pitt.edu> wrote:
>[...deleted...]
>: The very idea that a compiler (cross compiler, actually) can be built
>: to emit Java byte-codes from a foreign langauge stems from the idea
>: that the essence of the language is its syntax. This may be true of
>: some languages, but Java has at its core an extensive class
>: library. When a Java applet is written, the programmer reuses the code
>: in those libraries. A compiler which merely translates a legacy app
>: written in another language can take very little advantage of the Java
>: libraries. As a result, the executable will be large and cumbersome.


So the library has to be callable from many languages. This is nontrivial,
but it's not impossible either.


>: In fact, it may not be possible at all to automatically generate
>: byte-codes which will pass the security checks for code that was not
>: designed to operate within the security constraints of the Java model.
>[...deleted...]


Here is my estimation of how hard it would be to translate various languages
to the JVM. YMMV.


Relatively straightforward:
    Ada95, Modula-3, most Basics


More difficult (problems are MI and genericity):
    Eiffel, Sather


Requires extensive VM changes:
    Smalltalk, Scheme, CLOS, other Lisps, Dylan, Self


Impossible automatically:
    C, C++


David Hopwood
david.hopwood@lmh.ox.ac.uk


--


Post a followup to this message

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