Hi Nicolas,

On Tue, Apr 26, 2016 at 2:43 PM, Nicolas Cellier <nicolas.cellier.aka.nice@gmail.com> wrote:
 
Hi,
I see that superclassSend sends:
    objectMemory ensureBehaviorHash: superclass.
and just after it does
    lkupClassTag := objectMemory classTagForClass: superclass.

But classTagForClass:  is doing the same as above:
    <api>
    self assert: (coInterpreter addressCouldBeClassObj: classObj).
    ^self ensureBehaviorHash: classObj

So we are sending ensureBehaviorHash: twice...
It sounds un-ncecessary or is there a tricky reason to this?

Moreover, it sounds like ensureBehaviorHash: will begin with
    self assert: (coInterpreter addressCouldBeClassObj: aBehavior).

So again, we are asserting twice the same thing, aren't we?

Yes.  Good catch.  The send in superclassSed is clearly superfluous; but I would change the method to comment that classTagForClass: ensures there is a hash.



--
_,,,^..^,,,_
best, Eliot