[self-interest] resends

Jecel Assumpcao Jr jecel at lsi.usp.br
Mon Aug 9 23:42:11 UTC 1999

I have been thinking about resends, lately. I don't like them as
they are. Here is the statistics for the bytecodes for the 26339
methods in the standard snapshot:

      implicitSend   81590
      send           62233
      literal        27795
      pushSelf        4639
      return          4158
      index           3233
      resendOp         598
      delegatee         17

This means we have 581 undirected resends and 17 directed ones.
Given the small number of directed resends and their awkwardness
(two bytecodes), I had worried the most about them.

But now I am thinking if we really need the undirected resends?
They were certainly important when we had parent priorities in
early Selfs and complex tie breaker rules. But in modern Self
it would be no big deal to always specify in which parent the
lookup should proceed. Moving slots around so that this parent
would change is much less likely to happen now.

The reason I am thinking about this is that I would like to
replace resends with a more general explicit delegation
mechanism. Where we now have

           comparisonParent.isLessThan: arg

we could do

           (helpers at: i).isLessThan: arg

Hmm... I remember that it was possible to do this with primitives
in early Selfs, but can find nothing like it in either Self 3 or
Self 4. Anyway, the use of the "." for the resend syntax was
a needless complication. Maybe the more popular "::" would be
easier to parse?

Anyway, directed resends fit in perfectly with the semantics
of delegation (lookup in another object but use me as "self")
while undirected resends do not (lookup in me bu skipping any
slots with the same name).

-- Jecel

More information about the Self-interest mailing list