The Trunk: System-mt.1053.mcz

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

The Trunk: System-mt.1053.mcz

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

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

Name: System-mt.1053
Author: mt
Time: 24 January 2019, 2:13:52.854611 pm
UUID: 3877b382-e5b6-634b-944f-d484544f0542
Ancestors: System-mt.1052

Found a better API for the pragma-clean-up. Accidentally removed the removal of obsolete preferences in the previous commit. Fix that, too.

=============== Diff against System-mt.1052 ===============

Item was changed:
  ----- Method: Preferences class>>cleanUp (in category 'class initialization') -----
  cleanUp
- "Synchronize the cache for pragma preferences. Note that the actual preferences values are stored in class variables. So, no such value gets lost if we remove all such preferences from that cache."
 
+ "Synchronize the cache for pragma preferences. Note that the actual preferences values are stored in class variables. So, no such value gets lost if we remove all such preferences from that cache."
+ self removeAllPreferencesSuchThat: [:preference |
+ preference isPragmaPreference].
- "1/2 - Remove all pragma-preference objects from the dictionary of preferences."
- self atomicUpdatePreferences: [:copyOfDictionaryOfPreferences |
- copyOfDictionaryOfPreferences keys do: [:key |
- (copyOfDictionaryOfPreferences at: key) isPragmaPreference
- ifTrue: [copyOfDictionaryOfPreferences removeKey: key]]].
-
- "2/2 - Re-create all those pragma-preference objects."
  SystemNavigation default allSelectorsAndMethodsDo: [:behavior :selector :method |
+ method pragmas do: [:pragma |
+ self addPragmaPreference: pragma]].
+
+ "Remove obsolete (non-pragma) preferences."
+ self removeObsolete.
+ !
- method pragmas do: [:pragma | self addPragmaPreference: pragma]].!