This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: values types for Java
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. 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.
2. This is overly conservative compared to Per's suggestion (I'm not
sure if you're proposing it as a replacement for stack allocation
or just an intermediate step).
- a
--
"Education is not filling a bucket but lighting a fire." -- WB Yeats