[squeak-dev] The Inbox: Collections-cwp.484.mcz

commits at source.squeak.org commits at source.squeak.org
Mon Aug 13 22:57:27 UTC 2012


A new version of Collections was added to project The Inbox:
http://source.squeak.org/inbox/Collections-cwp.484.mcz

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

Name: Collections-cwp.484
Author: cwp
Time: 13 August 2012, 3:57:08.399 pm
UUID: 6e37e40a-c863-44bd-be92-561231a1e429
Ancestors: Collections-fbs.483

Make Character>>tokenish to accept $_ if the global preference is enabled.

=============== Diff against Collections-fbs.483 ===============

Item was changed:
  ----- Method: Character>>tokenish (in category 'testing') -----
  tokenish
  	"Answer whether the receiver is a valid token-character--letter, digit, or 
  	colon."
  
+ 	self == $_
+  		ifTrue: [ Scanner prefAllowUnderscoreSelectors ]
+  		ifFalse: [ self == $: or: [ self isLetter or: [ self isDigit ] ] ]!
- 	^self isLetter or: [self isDigit or: [self = $:]]!

Item was added:
+ ----- Method: WeakRegistry class>>migrateOldRegistries (in category 'migrating registry') -----
+ migrateOldRegistries
+ 	Smalltalk at: #WeakFinalizationRegistry ifAbsent: [ ^ self "already done" ].
+ 	
+ 	Smalltalk recreateSpecialObjectsArray.
+ 	WeakArray restartFinalizationProcess.
+ 	
+ 	Smalltalk garbageCollect; garbageCollect.
+ 	
+ 	"leave no chance to interrupt migration"	
+ 	Compiler evaluate: '
+ 	[ | old new oldClass newClass |
+ 		old := OrderedCollection new.
+ 		new := OrderedCollection new.
+ 		WeakRegistry allInstancesDo: [:registry | | newr |
+ 			old add: registry.
+ 			newr := WeakFinalizationRegistry basicNew initialize.
+ 			registry migrateTo: newr.
+ 			new add: newr ].
+ 		old asArray elementsForwardIdentityTo: new asArray.
+ 		
+ 		oldClass := WeakRegistry.
+ 		newClass := WeakFinalizationRegistry.
+ 		
+ 		Smalltalk forgetClass: newClass logged: false.
+ 		newClass superclass removeSubclass: newClass.
+ 		newClass setName: #WeakRegistry.
+ 		oldClass becomeForward: newClass.
+ 	] forkAt: Processor highestPriority.
+ 	'.
+ !



More information about the Squeak-dev mailing list