inefficient use of local variable slots

XMLWordPrintable

    • Type: Bug
    • Resolution: Won't Fix
    • Priority: P5
    • None
    • Affects Version/s: 0.9
    • Component/s: tools
    • 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

            Assignee:
            Frank Yellin (Inactive)
            Reporter:
            Arthur Hoff (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: