First gcc-compiled Java program runs!

Erik Schnetter erik.schnetter at student.uni-tuebingen.de
Tue Jun 17 01:41:11 PDT 1997


On Sat, 14 Jun 1997, Per Bothner wrote:

> The following little Java program compiles under "cc1java"
> (the Gcc front-end for Java that reads a .class file and
> emits assembly code).  It runs correctly, using Kaffe (a
> modified pre-0.9.1 snapshot) as the run-time engine.
> It took 16 seconds to execute.  In comparison, the
> same programs compiled by Kaffe's JIT takes 26 seconds,
> and Sun's JDK 1.1 takes 88 seconds to run the same program.
> In all cases, this is under Solaris 2.5.
> 
> NOTE: THE CC1JAVA COMPILER IS *NOT* USABLE YET.  A NUMBER OF
> BYTECODES HAVE NOT BEEN IMPLEMENTED AND NEITHER HAS
> EXCEPTION HANDLING.

Fine!  May I ask a few questions?

Some time ago I thought about writing a front end for gcc, but could find
(almost) no information about the "interface".  The best source of
information were the existing front ends (C, C++, Ada) and a header file
with some comments I could make nor heads nor tails of.  (That may have
well been my mistake.) Is there such information available now?  Or are
you (cygnus!) simply drawing from your years of experience with the gnu
tools? 

Another issue is that I compared programs written in a high level language
(Sather) that were compiled either through C or through Java class files. 
It seemed to me that one bottleneck of the JVM is the lack of stack
allocation.  One optimization therefore would be to determine in advance
that certain objects can safely be allocated on the stack.  Is such a 
thing feasible in your compiler?

-erik

-----
Erik Schnetter, erik.schnetter at student.uni-tuebingen.de

Arthur C. Clarke saw the future.
	He knew it would be run by huge computers.
		And he was right.		Just not about the size.



More information about the kaffe mailing list