Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-1184986

inefficient use of local variable slots

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P5
    • Resolution: Won't Fix
    • Affects Version/s: 0.9
    • Fix Version/s: None
    • Component/s: tools
    • Subcomponent:
    • CPU:
      sparc
    • OS:
      solaris_2.4

      Description

      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

        Attachments

          Activity

            People

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

              Dates

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: