This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: values types for Java
Adam Megacz writes:
>
> Andrew Haley <aph@redhat.com> writes:
> > J.-D. Choi, M. Gupta, M. Serrano, V. C. Sreedhar, and S. Midki.
> > Escape analysis for Java. In Object-Oriented Programming, Systems,
> > Languages, and Applications (OOPSLA), 1999. Languages (POPL), 2002.
> > http://www.research.ibm.com/jalapeno/publication.html#oopsla99_escape
>
> > I would like to add this to gcj.
>
> Two problems for use with GCJ:
>
> 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.
> In a JVM, the compiler can trace through the implementations of
> all methods which are called; gcj cannot do that at compile time
> -- so you have no way of knowing if calling foo.bar() causes foo
> to stash a reference to itself somewhere else. A JVM can simply
> inspect the implementation of the bar() method.
And so can we.
Andrew.