The Trunk: Kernel-mt.1014.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

The Trunk: Kernel-mt.1014.mcz

commits-2
Marcel Taeumel uploaded a new version of Kernel to project The Trunk:
http://source.squeak.org/trunk/Kernel-mt.1014.mcz

==================== Summary ====================

Name: Kernel-mt.1014
Author: mt
Time: 12 April 2016, 6:54:04.593201 pm
UUID: b82ee689-f086-bc41-a438-f9c5b7e383c9
Ancestors: Kernel-mt.1013

Fixes uni-class clean-up by adding the check for #isSystemDefinied.

=============== Diff against Kernel-mt.1013 ===============

Item was changed:
  ----- Method: ClassDescription>>removeUninstantiatedSubclassesSilently (in category 'accessing class hierarchy') -----
  removeUninstantiatedSubclassesSilently
  "Remove the classes of any subclasses that have neither instances nor subclasses.  Answer the number of bytes reclaimed"
+ "self removeUninstantiatedSubclassesSilently"
- "Player removeUninstantiatedSubclassesSilently"
 
+ | oldFree |
- | candidatesForRemoval  oldFree |
-
  oldFree := Smalltalk garbageCollect.
+
+ self subclasses
+ select: [:c | (c isSystemDefined not and: [c instanceCount = 0]) and: [c subclasses isEmpty]]
+ thenDo: [:c | c removeFromSystem].
+
+ ^ Smalltalk garbageCollect - oldFree!
- candidatesForRemoval :=
- self subclasses select: [:c |
- (c instanceCount = 0) and: [c subclasses size = 0]].
- candidatesForRemoval do: [:c | c removeFromSystem].
- ^Smalltalk garbageCollect - oldFree!