[V3dot9] Re: About condenseChanges and Traits
Stéphane Ducasse
stephane.ducasse at univ-savoie.fr
Thu Aug 24 13:17:00 UTC 2006
I took 7053
- run
VersionsBrowser new
scanVersionsOf:
(TraitDescription>>#noteRecategorizedSelectors:oldComposition:)
class: TraitDescription
meta: false
category: nil
selector: #noteRecategorizedSelectors:oldComposition:.
-> OK
- run
problems := Dictionary new.
>>> Smalltalk allClassesAndTraitsDo: [:class |
>>> {class. class class} do: [:behavior |
>>> behavior selectorsDo: [:selector |
>>> (behavior sourceCodeAt: selector) ifNil: [
>>> problems add: behavior -> selector ] ] ] ].
>>> ^problems
- > ok dictionary is Empty
========================================================================
====
I took 7053
- did a condenseChanges
- run
VersionsBrowser new
scanVersionsOf:
(TraitDescription>>#noteRecategorizedSelectors:oldComposition:)
class: TraitDescription
meta: false
category: nil
selector: #noteRecategorizedSelectors:oldComposition:.
breaks.
problems := Dictionary new.
>>> Smalltalk allClassesAndTraitsDo: [:class |
>>> {class. class class} do: [:behavior |
>>> behavior selectorsDo: [:selector |
>>> (behavior sourceCodeAt: selector) ifNil: [
>>> problems add: behavior -> selector ] ] ] ].
>>> ^problems
- > ok dictionary is Empty
So it seems to me that the test of philippe does not cover the
problem I identified with condenseChanges
Now in the image where I did the condenseChanges I get methods that
have decompiled code
such as
TraitDescription>>addAndClassifySelector: t1 withMethod: t2
inProtocol: t3 notifying: t4
| t5 |
t5 := self
compiledMethodAt: t1
ifAbsent: [].
self addSelectorSilently: t1 withMethod: t2.
SystemChangeNotifier uniqueInstance
doSilently: [self organization classify: t1 under: t3].
t5 isNil
ifTrue: [SystemChangeNotifier uniqueInstance
methodAdded: t2
selector: t1
inProtocol: t3
class: self
requestor: t4]
ifFalse: [SystemChangeNotifier uniqueInstance
methodChangedFrom: t5
to: t2
selector: t1
inClass: self
requestor: t4]
I check and in 7053 without doing the condenseChanges this method is
normal so the condenseChanges is trashing some methods.
addAndClassifySelector: selector withMethod: compiledMethod
inProtocol: category notifying: requestor
| priorMethodOrNil |
priorMethodOrNil _ self compiledMethodAt: selector ifAbsent: [nil].
self addSelectorSilently: selector withMethod: compiledMethod.
SystemChangeNotifier uniqueInstance
doSilently: [self organization classify: selector under: category].
priorMethodOrNil isNil
ifTrue: [SystemChangeNotifier uniqueInstance methodAdded:
compiledMethod selector: selector inProtocol: category class: self
requestor: requestor]
ifFalse: [SystemChangeNotifier uniqueInstance methodChangedFrom:
priorMethodOrNil to: compiledMethod selector: selector inClass: self
requestor: requestor].
Stef
More information about the V3dot9
mailing list