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

add constant pool reference to class containing inlined constants

    Details

    • Type: Enhancement
    • Status: Closed
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 8
    • Fix Version/s: 8
    • Component/s: tools
    • Labels:
      None
    • Subcomponent:
    • Resolved In Build:
      b68
    • CPU:
      generic
    • OS:
      generic
    • Verification:
      Verified

      Description

      We are increasingly analysing class files to find the dependencies between them. One dependency that is currently hard (i.e. impossible) to track with just the info in class files is when javac has inlined references to constants defined in other classes.

      A partial solution would be to include a reference to the defining class in the class file. This does not change the existing compilation strategy in any way, nor does it affect runtime performance in any way, other than adding an otherwise unused reference to the constant pool.

      Note that such an unused reference is likely to be optimized away by pack200 anyway, but up until that point, the extra reference will help class file analyzers detect the dependence.
      One important use case for this feature is the Ant <depend> task, used to minimize compilation time by helping to eliminate unnecessary compilations. See, for example,
      http://ant.apache.org/manual/Tasks/depend.html

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                vromero Vicente Arturo Romero Zaldivar
                Reporter:
                jjg Jonathan Gibbons
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: