values types for Java

Andrew Haley aph@redhat.com
Tue Oct 21 19:50:00 GMT 2003


Adam Megacz writes:
 > 
 > Andrew Haley <aph@redhat.com> writes:
 > >  > 1. They use interprocedural analysis, which is not compatible with
 > >  >    separate compilation.
 > > 
 > > Why is that a problem?  You want intraprocedural optimzation, you
 > > compile the files together.
 > 
 > public class Main
 >    public static void main(String[] s) {
 >        new Foo().bar();
 >    }
 > }
 > 
 > gcj -c Main.java
 > gcj -c Foo.java
 > ld Main.o Foo.o
 > 
 > When the first command is executed, gcj doesn't know if Foo.bar()
 > stashes a copy of the this pointer somewhere.

You're doing it wrong.

gcj -c Main.java Foo.java -o bar.o

Andrew.



More information about the Java mailing list