[review needed] Better structure for CleanBlock Hierachy

MD
Marcus Denker
Tue, May 17, 2022 5:45 AM

Hi,

For now, CleanBlockClosure was a subclass of FullBlockClosure, which is not nice (as CleanBlockClosure is not a FullBlockClosure)

The PR https://github.com/pharo-project/pharo/pull/11225 improves that a bit:

• make CleanBlockClosure a subclass of BlockClosure
• BlockClosure is now tagged abstract
• override #receiver in CleanBlockClosure
• push down #sender
• Improve comments ( fixes Check BlockClosure comments for mention of startpc  #11217 )

Both CleanBlockClosure and FullBlockClosure add the ivar “receiver”, as the vm needs it (it is nil for CleanBlockClosure).
This we should look at that later.
e.g. have it defined in BlockClosure once, but that has to be done as it’s own PR as it is not a change doable from the image.

The change should be save to merge, as CleanBlockClosure is, for now, just used in the tests that turn it on explicitly.

PR for review:    https://github.com/pharo-project/pharo/pull/11225

Marcus
Hi, For now, CleanBlockClosure was a subclass of FullBlockClosure, which is not nice (as CleanBlockClosure is not a FullBlockClosure) The PR https://github.com/pharo-project/pharo/pull/11225 improves that a bit: • make CleanBlockClosure a subclass of BlockClosure • BlockClosure is now tagged abstract • override #receiver in CleanBlockClosure • push down #sender • Improve comments ( fixes Check BlockClosure comments for mention of startpc #11217 ) Both CleanBlockClosure and FullBlockClosure add the ivar “receiver”, as the vm needs it (it is nil for CleanBlockClosure). This we should look at that later. e.g. have it defined in BlockClosure once, but that has to be done as it’s own PR as it is not a change doable from the image. The change should be save to merge, as CleanBlockClosure is, for now, just used in the tests that turn it on explicitly. PR for review: https://github.com/pharo-project/pharo/pull/11225 Marcus