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
--
Return to the
comp.compilers page.
Search the
comp.compilers archives again.