harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrew Cornwall" <andrew.pack...@gmail.com>
Subject [classlib][pack200] Computing inner classes
Date Thu, 24 Jan 2008 19:03:33 GMT
I'm in the process of looking at inner classes. The pack200 spec has an
algorithm for calculating which classes are relevant for a specific class.
Part of that algorithm is:

   - ic_Relevant(X) is initially empty.
   - Every four-tuple from ic_All which mentions the current class
   (defined by X) as an outer class is added to ic_Relevant(X).
   - For every class constant K referenced from both ic_this_class and
   cp(X), the corresponding four-tuple from ic_All is selected, and added
   to ic_Relevant(X), if not already there.
   - The previous step is repeated until closure. (That is, until
   ic_Relevant(X) no longer changes.)
   - The set ic_Relevant(X) is ordered into a sequence, so that its order
   is consistent with ic_All. (I.e., it is a subsequence of ic_All.)

I don't understand step 4 - it doesn't look as if step 3 will not change
anything after the first time it runs. (In other words, it looks as if
multiple iterations aren't necessary). Perhaps that's because I don't
understand inner classes well enough - does anyone have any idea which
classes need to be added to the InnerClasses attribute for a specific class?

    Andrew Jr.

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message