DescriptionEliminate all but one top-level class per library.
Each script has an associated top-level class in which the top-level functions and fields are stored, and the reference to the script. All other fields in the TL class are unused. There are 380 TL classes in corelib alone; eliminating them saves space.
This CL eliminates all TL classes but one per library. All TL functions and fields in the library are stored in that TL class. Because scripts are not stored directly in functions and fields, but are accessible via their owner class, the owner of TL entities are now PatchClasses, rather than classes.
Before:
Size of vm isolate snapshot = 930813
New space (0k of 0k) Old space (1184k of 1624k)
VM Isolate: Number of symbols : 14909
Size of isolate snapshot = 261873
New space (0k of 2048k) Old space (987k of 1024k)
After:
Size of vm isolate snapshot = 931101
New space (0k of 0k) Old space (713k of 1156k)
VM Isolate: Number of symbols : 14907
Size of isolate snapshot = 256956
New space (0k of 1024k) Old space (514k of 768k)
R=iposva@google.com
Committed: https://github.com/dart-lang/sdk/commit/ad0f14e0ce54efb62a297b259156face55708100
Patch Set 1 #Patch Set 2 : Fix metadata #Patch Set 3 : Cleanup #
Total comments: 7
Patch Set 4 : Address review comments #
Total comments: 10
Patch Set 5 : Address Review Comments #
Messages
Total messages: 13 (6 generated)
|