This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: GCC Release Status (2003-10-03)
- From: Anthony Green <green at redhat dot com>
- To: Andrew Haley <aph at redhat dot com>
- Cc: java at gcc dot gnu dot org
- Date: 06 Oct 2003 11:11:57 -0400
- Subject: Re: GCC Release Status (2003-10-03)
- Organization: Red Hat, Inc.
- References: <200310032250.h93Moti1003175@doubledemon.codesourcery.com> <16254.35447.363059.520841@cuddles.cambridge.redhat.com>
On Sat, 2003-10-04 at 04:53, Andrew Haley wrote:
> So, what else must be in 3.4?
It would be nice to fix a class init optimization problem. The compiler
should recognize that calls to constructors and calls to static methods
always initialize the called class, so we can force our
class-init-tracking local flag to `true' whenever we do these.
public class A
{
// This method should never call _Jv_InitClass on B.
public int foo ()
{
B b = new B();
return B.bar;
}
// Neither should this.
public int foo2 ()
{
B.plus6(5);
return B.bar;
}
}
public class B
{
public static int plus6(int x) { return x + 6; }
public static int bar = 555;
}
I don't think the fix is very difficult (I hope!).
Is it too late to put this kind of change in for 3.4?
AG
--
Anthony Green <green@redhat.com>
Red Hat, Inc.