implementing escape analysis

Tom Tromey tromey@redhat.com
Tue Feb 21 00:17:00 GMT 2006


>>>>> "Andrew" == Andrew Haley <aph@redhat.com> writes:

Andrew> Indeed, yes.  But there's no reason not to start small: if you know
Andrew> that the args of System.out.println() don't escape, for example, then
Andrew> you can handle just that.

This is an unfortunate example due to System.setOut, where the
argument can be any stream, including ones that violate this part of
the contract.  But the point holds, eg considering StringBuffer --
which is a nice candidate for both stack allocation and for lock
removal.

Tom



More information about the Java mailing list