[squeak-dev] The Trunk: System-cmm.600.mcz

commits at source.squeak.org commits at source.squeak.org
Thu Oct 3 19:50:51 UTC 2013


Chris Muller uploaded a new version of System to project The Trunk:
http://source.squeak.org/trunk/System-cmm.600.mcz

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

Name: System-cmm.600
Author: cmm
Time: 3 October 2013, 2:49:50.903 pm
UUID: 1dc3ab37-822a-4ac0-93d0-c06542622247
Ancestors: System-fbs.599

- RecentMessages can now temporarily suspend, so it'll be able to avoid being blown away just from loading MC packages.
- API consistency.
- Test methods moved to Tests.

=============== Diff against System-fbs.599 ===============

Item was changed:
  Object subclass: #RecentMessages
+ 	instanceVariableNames: 'methodReferences size maximumSubmissionCount isSuspended'
- 	instanceVariableNames: 'methodReferences size maximumSubmissionCount'
  	classVariableNames: 'Default NumberOfRecentSubmissionsToStore'
  	poolDictionaries: ''
  	category: 'System-Support'!

Item was changed:
  ----- Method: RecentMessages>>initialize (in category 'initialize-release') -----
  initialize
+ 	self initializeWithSize: self defaultSize!
- 	maximumSubmissionCount := self defaultSize.
- 	methodReferences := OrderedCollection new.!

Item was added:
+ ----- Method: RecentMessages>>leastRecent (in category 'accessing') -----
+ leastRecent
+ 	^ methodReferences
+ 		ifEmpty: [nil]
+ 		ifNotEmpty: [methodReferences first].!

Item was removed:
- ----- Method: RecentMessages>>oldest (in category 'accessing') -----
- oldest
- 	^ methodReferences
- 		ifEmpty: [nil]
- 		ifNotEmpty: [methodReferences first].!

Item was removed:
- ----- Method: RecentMessages>>purge: (in category 'accessing') -----
- purge: aMethodReference 
- 	methodReferences remove: aMethodReference.!

Item was removed:
- ----- Method: RecentMessages>>purgeMissingMethods (in category 'accessing') -----
- purgeMissingMethods
- 	methodReferences := methodReferences select: [:mref | |cls|
- 		cls := mref actualClass.
- 		cls notNil
- 			and: [cls isInMemory]
- 			and: [mref selector == #Comment or: [(cls compiledMethodAt: mref selector ifAbsent: [nil]) notNil]]].!

Item was changed:
  ----- Method: RecentMessages>>recordSelector:forClass:inEnvironment: (in category 'accessing') -----
  recordSelector: aSelector forClass: aClass inEnvironment: anEnvironment
  	| ref |
+ 	isSuspended = true ifTrue: [ ^ self ].
  	ref := MethodReference
  			class: aClass
  			selector: aSelector
  			environment: anEnvironment.
  	aClass wantsChangeSetLogging ifFalse: [^ ref].
  	^ methodReferences
  		detect: [:mref | mref = ref]
  		ifNone: [methodReferences addLast: ref.
  			self size > self maximumSubmissionCount
  				ifTrue: [methodReferences removeFirst].
  			ref].!

Item was added:
+ ----- Method: RecentMessages>>suspendWhile: (in category 'accessing') -----
+ suspendWhile: aBlock
+ 	| priorSuspended |
+ 	priorSuspended := isSuspended.
+ 	isSuspended := true.
+ 	aBlock ensure: [ isSuspended := priorSuspended ]!



More information about the Squeak-dev mailing list