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

JavaCompiler: replace desugarLater by compileStates

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 7
    • 7
    • tools
    • None
    • b33
    • generic
    • generic
    • Verified

        This is a follow-on to "6325201: make erasure non-destructive". The issue is that TransTypes is destructive, and can destroy info in the supertypes for a class. The fix was to defer desugaring a class until all its supertypes have passed through flow and attr.

        The fix interferes with the ability to process all the classes in a file before writing out class files, in an effective manner, since the deferral puts a class back on the to-do queue, at the end, to processed after the supertypes have been processed.

        Here is the webrev for the earlier fix:
        http://sa.sfbay.sun.com/projects/langtools_data/mustang/6325201.2/

        Instead of deferring the desugaring, it would be better to ensure that attr and flow have been called on any supertypes, doing the processing on demand as needed, if it has not been done already. This can be done by tracking the compilation state of each class, noting if the class has been through attr and flow. Then, the processing of the todo list can skip running attr and flow on any class that has already been done.

              jjg Jonathan Gibbons
              jjg Jonathan Gibbons
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: