[squeak-dev] Reducing ActiveWorld dependencies (was: The Trunk: Morphic-cmm.1408.mcz)

David T. Lewis lewis at mail.msen.com
Fri Apr 6 03:12:35 UTC 2018


On Thu, Apr 05, 2018 at 10:59:07AM +0200, Marcel Taeumel wrote:
> Well, "ActiveWorld" is a dynamic variable that provides dynamic scope. Just like "ActiveEvent" and "ActiveHand". Useful and powerful in some cases. To be applied with caution. Yet, we have no alternative at the moment. Personally, I think we do not need any.
> 
> "World" is a global variable that we do not need anymore since the addition of "Project" and the projects concept some time ago.
> 
> Then, each visible morph has its own reference to a world. Usually, code should refer to this world when passing an instance as message argument.
> 
> ---
> 
> Currently, we have 6 senders of "World" left. We should make it 0.

There should 0 senders of "World" already. The results of #browseAllCallsOn:
are misleading, is that what you are looking at?

I am seeing this:

  (CompiledMethod allInstances select: [ :e |
      (e literals select: [ :lit | (lit isKindOf: Global)
          and: [lit key == #World]]) isEmpty not]) size ==> 0


> We also have 219 senders of "ActiveWorld" left. We should reduce that number to 10 or so in the core Morphic framework. Most of the other cases do not require ActiveWorld.
> 

Yes!

  (CompiledMethod allInstances select: [ :e |
      (e literals select: [ :lit | (lit isKindOf: Global)
          and: [lit key == #ActiveWorld]]) isEmpty not]) size ==> 219


I think that should be the next thing to go after. But I am not clear on
the meanings. Before actually changing anything, I would want to try to
get a clear understanding of the intended meaning of "ActiveWorld" and how
it differs from "World". In particular I would want to be able to explain
the cases where ActiveWorld is something other than Project current world.

I suspect (but I am not sure) that these cases will be related to world-in-world
handling, and that most other references to ActiveWorld are not really necessary
as you are suggesting.

Maybe Bob Arning can give us some guidance here if it is not clear.

Dave



More information about the Squeak-dev mailing list