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

Frank Shearar frank.shearar at gmail.com
Fri Oct 4 07:46:00 UTC 2013


On 04 Oct 2013, at 8:37, commits at source.squeak.org wrote:

> 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]]].!

I don't understand why you've ripped out purging. You now allow RecentMessages to have MethodReferences that will blow up whenever you try to resolve them.

I mean, the brokenness of #actualClass aside (*) why the removal?

(*) #actualClass and friends make no sense in a multi-Environment world: what a class name means depends on the context nowadays.

frank

> 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