About some changes in 3.8

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

About some changes in 3.8

stéphane ducasse-2
Hi andreas

following our discussions about changes, I loaded tweak updated it  
and browse the references to CSqueak3Point8Detected
I put the code here so that people can follow.

Do you have fixes? Again if you would have point that to the 3.8 team  
(not me you know)
may be they would have fixed that.

Stef

> I just browsed Tweak and looked at references of the exception
> CSqueak3Point8Detected as mentioned by andreas
>
> I report here the stuff he is checking I let you judge.
>
>
> ProtoObject class>>addSelectorSilently: selector withMethod: newMethod
> | oldMethod result done |
> CSqueak3Point8Detected signal. "Only used from 3.8"
> oldMethod := self compiledMethodAt: selector ifAbsent:[nil].
> done := false.
> [result := super addSelectorSilently: selector withMethod: newMethod]
> on: CSqueak3Point8Detected do:[:ex| done := true. ex resume].
> done ifFalse:[self methodChanged: selector from: oldMethod to:  
> newMethod].
> ^result
>
>
> addSelector: selector withMethod: newMethod
> | oldMethod result done |
> oldMethod := self compiledMethodAt: selector ifAbsent:[nil].
> done := false.
> result := [super addSelector: selector withMethod: newMethod]
> on: CSqueak3Point8Detected do:[:ex| done := true. ex resume].
> done ifFalse:[self methodChanged: selector from: oldMethod to:  
> newMethod].
> ^result
>
> addSelector: selector withMethod: newMethod notifying: requestor
> | oldMethod result |
> CSqueak3Point8Detected signal. "Only used from 3.8"
> oldMethod := self compiledMethodAt: selector ifAbsent:[nil].
> result := super addSelector: selector withMethod: newMethod  
> notifying: requestor.
> self methodChanged: selector from: oldMethod to: newMethod.
> ^result
>
>
> basicRemoveSelector: selector
> | oldMethod result |
> CSqueak3Point8Detected signal. "Only used in 3.8"
> oldMethod := self compiledMethodAt: selector ifAbsent:[^nil].
> result := super basicRemoveSelector: selector.
> self methodChanged: selector from: oldMethod to: nil.
> ^result
>
> removeSelector: selector
> | oldMethod result done |
> oldMethod := self compiledMethodAt: selector ifAbsent:[^nil].
> done := false.
> result := [super removeSelector: selector]
> on: CSqueak3Point8Detected do:[:ex| done := true. ex resume].
> done ifFalse:[self methodChanged: selector from: oldMethod to: nil].
> ^result
>
>
>
>
>
>


Reply | Threaded
Open this post in threaded view
|

Re: About some changes in 3.8

Andreas.Raab
stéphane ducasse wrote:
> following our discussions about changes, I loaded tweak updated it  and
> browse the references to CSqueak3Point8Detected
> I put the code here so that people can follow.
>
> Do you have fixes? Again if you would have point that to the 3.8 team  
> (not me you know) may be they would have fixed that.

Really, it's not worth breaking an existing release to undo a particular
change for which a functioning workaround exists. That code is ugly like
hell but as with other workarounds its only requirement is to do the
job. And since I'm planning on bootstrapping an alternative meta class
hierarchy anyway this will be a non-issue before too long.

Cheers,
   - Andreas