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:
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.