Re: C -> Java Bytecode (Mohd-Hanafiah Abdullah)
1 Aug 1999 23:04:53 -0400

          From comp.compilers

Related articles
Re: C -> Java Bytecode (1999-08-01)
Re: C -> Java Bytecode (1999-08-02)
Re: C -> Java Bytecode (1999-08-04)
| List of all articles for this month |

From: (Mohd-Hanafiah Abdullah)
Newsgroups: comp.compilers
Date: 1 Aug 1999 23:04:53 -0400
References: <7o0gsb$>
Keywords: C, Java, GCC

Trent Waddington <> wrote:
>Hi.. I'm currently working on a gcc backend to produce java bytecode
>from lowlevel c input files (which are the intermediate language of a
>binary translator).

I have been thinking about the same thing, i.e., targeting C source to
the JVM. Maybe we could get into the discussion of how feasible this
kind of effort could be. For one thing there's a lot of C code out
there that could benefit from recompilation to Java bytecode.

Maybe the following points could be considered in order to enhance the
practicality of the retargeting effort in order to be widely accepted:

1. Strictly C source translation to bytecode (no assembler code).

2. C source code must be POSIX compliant for UNIX platforms.

3. C source code must be compliant to Windows API standard/convention for
      Windows platform.

4. Port all standard C libraries to Java bytecode.

5. Have access to third party library source code in C one way or another
      to port to bytecode; if it's not already available in bytecode.

6. JVMs/JiTs and CPUs are getting better all the time to address the
      performance issue, hopefully.

The issue of Java's sandbox concept, transparent memory architecture, and
others related to Java security need to be addressed.

I would guess this TOOL shouldn't be viewed as the answer-to-all C
port to JVM problems. It could very well be seen as addressing a
hopefully large niche market. It is a fast-track porting of C
applications to the increasingly popular JVM without having to go
through the cumbersome and error-prone source-to-source translation.


Post a followup to this message

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