-
Bug
-
Resolution: Won't Fix
-
P5
-
None
-
0.9
-
sparc
-
solaris_2.4
Local variable slot allocation is non-optimal. Both variables should be mapped
to the same slot:
public static void main(String argv[]) {
{
int x = 3;
System.out.println(x);
}
{
int y = 4;
System.out.println(y);
}
}
Method void main(oak/lang/String [])
0 iconst_3
1 istore_1 <<= x
2 getstatic #5 <Field oak/lang/System.out Loak/io/PrintStream;>
5 iload_1 1 <<= x
6 invokevirtual #7 <Method oak/io/PrintStream.println(I)V>
9 iconst_4
10 istore_2 <<= y
11 getstatic #5 <Field oak/lang/System.out Loak/io/PrintStream;>
14 iload_2 2 <<= y
15 invokevirtual #7 <Method oak/io/PrintStream.println(I)V>
18 return
to the same slot:
public static void main(String argv[]) {
{
int x = 3;
System.out.println(x);
}
{
int y = 4;
System.out.println(y);
}
}
Method void main(oak/lang/String [])
0 iconst_3
1 istore_1 <<= x
2 getstatic #5 <Field oak/lang/System.out Loak/io/PrintStream;>
5 iload_1 1 <<= x
6 invokevirtual #7 <Method oak/io/PrintStream.println(I)V>
9 iconst_4
10 istore_2 <<= y
11 getstatic #5 <Field oak/lang/System.out Loak/io/PrintStream;>
14 iload_2 2 <<= y
15 invokevirtual #7 <Method oak/io/PrintStream.println(I)V>
18 return