Re: Possible to write compiler to Java VM?

stt@henning.camb.inmet.com (Tucker Taft)
30 Jan 1996 22:50:26 -0500

          From comp.compilers

Related articles
[14 earlier articles]
Re: Possible to write compiler to Java VM? jeff@uh.edu (Jeff M Younker) (1996-01-30)
Re: Possible to write compiler to Java VM? mw@ipx2.rz.uni-mannheim.de (1996-01-30)
Re: Possible to write compiler to Java VM? salomon@silver.cs.umanitoba.ca (1996-01-30)
Re: Possible to write compiler to Java VM? bothner@cygnus.com (1996-01-30)
Re: Possible to write compiler to Java VM? tmb@best.com--Internet (1996-01-30)
Re: Possible to write compiler to Java VM? hbaker@netcom.com (1996-01-30)
Re: Possible to write compiler to Java VM? stt@henning.camb.inmet.com (1996-01-30)
Re: Possible to write compiler to Java VM? dewar@cs.nyu.edu (1996-01-31)
Re: Possible to write compiler to Java VM? rfg@monkeys.com (1996-02-01)
Re: Possible to write compiler to Java VM? ok@cs.rmit.edu.au (1996-02-01)
Re: Possible to write compiler to Java VM? gmckee@cloudnine.com (1996-02-02)
Re: Possible to write compiler to Java VM? darius@phidani.be (Darius Blasband) (1996-02-04)
Re: Possible to write compiler to Java VM? salomon@silver.cs.umanitoba.ca (1996-02-09)
[5 later articles]
| List of all articles for this month |
From: stt@henning.camb.inmet.com (Tucker Taft)
Newsgroups: comp.lang.java,comp.compilers
Followup-To: comp.lang.java,comp.compilers
Date: 30 Jan 1996 22:50:26 -0500
Organization: Intermetrics, Inc.
References: 96-01-109
Keywords: Ada, translator, interpreter, OOP

Tore Joergensen <tore@lis.pitt.edu> wrote:


>: 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.
>:...


David Hopwood (david.hopwood@lady-margaret-hall.oxford.ac.uk) wrote:
: 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. ...


Although the verifier is picky, it is certainly possible to generate
code that passes it starting with source languages other than Java.
Our AdaMagic/Java compiler does this. See
http://www.inmet.com/java.html We also support full access to the Java
standard library of classes from Ada 95.


: 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


I don't think Smalltalk would require VM changes, thanks to the
"checkcast" and "invokeinterface" byte codes. It might not be
terribly efficient, though, unless the interpreter made more of an
effort to speed up checkcast and invokeinterface calls.


: Impossible automatically:
: C, C++


I agree otherwise, based on what I know of the languages mentioned.


-Tucker Taft stt@inmet.com http://www.inmet.com/~stt/
Intermetrics, Inc. Cambridge, MA USA
--


Post a followup to this message

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