This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
need help on virtual method compilation
- To: java at gcc dot gnu dot org
- Subject: need help on virtual method compilation
- From: Dachuan Yu <dachuan dot yu at yale dot edu>
- Date: Tue, 25 Sep 2001 15:49:44 -0400
- Organization: Yale University
I want to test a new scheme of statically compiling
Java souce files by hacking GCJ. Basicly we
introduce another level of indirection for each
method invocation. At compile time, each class is
compiled to have an "offset table" as well as the
traditional vtable. While at runtime, these offset
tables gets filled in somehow by the dynamic linker.
In this scheme each method invocation would go
through the offset table first to get back an offset
to the vtable. Then it goes through the vtable by
the offset to get to the method body.
First of all I have to find out how "jc1" generates
the vtable for each class and how this is written
into the target .s file of the compilation. I was
wondering if someone can give me some hints on which
methods to look at. It would save me a lot of
gdbing.
BTW: parse.c and parse-scan.c seem to have lots of
debug information which refers to the absolute path
"/nfs/gandalf/u2/mitchell/gcc-3.0/gcc-3.0/gcc/java/...".
Is this because they are generated from the .y
files? It seems that my gdb is having trouble
finding the right file because of this. (For gcj,
I'm using gcc i686-pc-linux-gnu 3.0). Anyway, if
this is not a problem or it's already fixed in later
versions, please ignore me.
Regards,
Dachuan