Re: Java virtual machine as target language for C/C++

"Daniel C. Wang" <dw3u+@andrew.cmu.edu>
5 May 1996 17:46:50 -0400

          From comp.compilers

Related articles
Java virtual machine as target language for C/C++ Drinie@xs4all.nl (1996-05-04)
Re: Java virtual machine as target language for C/C++ roedy@BIX.com (Roedy Green) (1996-05-05)
Re: Java virtual machine as target language for C/C++ dw3u+@andrew.cmu.edu (Daniel C. Wang) (1996-05-05)
Re: Java virtual machine as target language for C/C++ tmb@best.com (1996-05-06)
Re: Java virtual machine as target language for C/C++ albaugh@agames.com (1996-05-06)
Re: Java virtual machine as target language for C/C++ dodd@csl.sri.com (1996-05-06)
Re: Java virtual machine as target language for C/C++ brauch@hpp.stanford.edu (Rupert Brauch) (1996-05-06)
Re: Java virtual machine as target language for C/C++ kik@zia.cray.com (1996-05-08)
Re: Java virtual machine as target language for C/C++ billms@nixon.icsl.ucla.edu (1996-05-08)
[21 later articles]
| List of all articles for this month |

From: "Daniel C. Wang" <dw3u+@andrew.cmu.edu>
Newsgroups: comp.lang.c++,comp.compilers,comp.lang.java
Date: 5 May 1996 17:46:50 -0400
Organization: Compilers Central
Keywords: C, Java

Drinie@xs4all.nl (Rinie Kervel) writes:
> I know that Java does not support pointer arithmetic.
>
> But as the Java virtual machine gets integrated in many OSes it would
> be nice to use it as a target language for other languages.


It be nice, if the JVM weren't so "JavaCentric"...


> Is it possible (and will Sun allow it) to extend the JVM to support
> pointer arithmetic. ... Does anyone know if proposals for such
> extensions have been made/ are considered.


Adding pointer arithmetic has some serious negative garbage collection
implementations issues too. That's reason enough not to add such an
extension. BTB right now you can compile C to JVM. Just simulate
pointers as indexes into an array that represents the C heap/stack. Or
why not just write an assembly language simulator in JVM and have it
interpret your favorite assembly language emitted by your favoriate C
compiler. :)


I'd personally be more interested in seeing a pointer safe GCable
version of C that just happens to compile to the JVM without all the
OO cruft that Java, the language, has.




--


Post a followup to this message

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