[Vm-dev] Why do superclassSend ensureBehaviorHash:

Nicolas Cellier nicolas.cellier.aka.nice at gmail.com
Tue Apr 26 21:43:43 UTC 2016


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?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20160426/bc73102f/attachment.htm


More information about the Vm-dev mailing list